Skip to content

Conversation

lacoak21
Copy link
Contributor

@lacoak21 lacoak21 commented Sep 4, 2025

Change Summary

Overview

Update ena map attributes to include efficiency, geometric function, and positional uncertainty.

Updated Files

  • imap_processing/cdf/config/imap_enamaps_l2-common_variable_attrs.yaml
    • Add shared attribute values
  • imap_processing/cdf/config/imap_enamaps_l2-healpix_variable_attrs.yaml
    • Add healpix attrs
  • imap_processing/cdf/config/imap_enamaps_l2-rectangular_variable_attrs.yaml
    • Add rectangular attrs
  • imap_processing/tests/ultra/unit/test_ultra_l2.py
    • Keep obs date range and std ( IT request)
  • imap_processing/ultra/l2/ultra_l2.py
  • rename any scatter theta or scatter phi vars to positional uncertainty

Testing

@lacoak21 lacoak21 added this to the September 2025 milestone Sep 4, 2025
@lacoak21 lacoak21 self-assigned this Sep 4, 2025
@lacoak21 lacoak21 added this to IMAP Sep 4, 2025
@@ -196,6 +196,50 @@ exposure_factor: &exposure_factor
DISPLAY_TYPE: no_plot
DICT_KEY: SPASE>TemporalDescription:Exposure,Qualifier:Directional,CoordinateSystemName:HAE,CoordinateRepresentation:Spherical

geometric_function:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be geometric factor?

Suggested change
geometric_function:
geometric_factor:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same thought but apparently they want geometric function. Will that be going against the grain? Maybe it is worth it to have a separate ultra l2 map yaml file.

DISPLAY_TYPE: no_plot
DICT_KEY: SPASE>Particle>ParticleType:Atom,ParticleQuantity:GeometricFactor,Qualifier:Directional,CoordinateSystemName:HAE,CoordinateRepresentation:Spherical

efficiency:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these are ultra-specific and will be different for Lo/Hi I believe. Do we want to add a separate file like enamaps_l2-ultra and similar for some of these?

On Lo, our efficiency is per pointing (so not on the map), and it has a dependence on energy. I'm not sure if yours does or not (looks like no here)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the energy depend was defined in the specific healpix/latlon files. I guess that could be brought out here since it is the same for all of them, but it doesn't really matter. I guess you can ignore this comment for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting. So the efficiency just has energy as a depend for lo?

Comment on lines +543 to +548
# Rename positional uncertainty variables if present
if "scatter_theta" in map_dataset and "scatter_phi" in map_dataset:
map_dataset = map_dataset.rename(
{"scatter_theta": "positional_uncertainty_theta"}
)
map_dataset = map_dataset.rename({"scatter_phi": "positional_uncertainty_phi"})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't fail if the variables aren't present, so you can just call the rename directly and it will work if they are there.

Suggested change
# Rename positional uncertainty variables if present
if "scatter_theta" in map_dataset and "scatter_phi" in map_dataset:
map_dataset = map_dataset.rename(
{"scatter_theta": "positional_uncertainty_theta"}
)
map_dataset = map_dataset.rename({"scatter_phi": "positional_uncertainty_phi"})
# Rename positional uncertainty variables if present
map_dataset = map_dataset.rename({"scatter_theta": "positional_uncertainty_theta", "scatter_phi": "positional_uncertainty_phi"})

Copy link
Contributor

@subagonsouth subagonsouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only comment is that Ultra IT is adding some variables to the L2 definition a bit ad hoc. I guess in the name of progress, that is OK with me.

@@ -220,6 +264,18 @@ obs_date_range:
DISPLAY_TYPE: image
TIME_SCALE: Terrestrial Time

obs_date_for_std:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The product definition agreed to by the IMWG named this obs_date_range. Is Ultra requesting a change in that variable name? Here is the spreadsheet with the current definition: https://o365coloradoedu-my.sharepoint.com/:x:/g/personal/plummert_colorado_edu/EX8IRmgRKw5Hpik9wPAXZQABBgOemDqOv-uLMlRxZLJaTw

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess I am confused what this is vs. obs_date and obs_date_range.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have made some assumptions here. They made this note

Screenshot 2025-09-05 at 10 31 09 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I'm not sure what to do for this. Probably move forward with what you have. I will send out an email to the IMWG noting that I am seeing lots of variables being added to L2 products last minute here. All the ENA ITs agreed to the spreadsheet and this is causing quite a bit of churn.

Copy link
Contributor Author

@lacoak21 lacoak21 Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I also just messaged Nick Dutton for more info. Yeah sorry about that - I didnt realize these are unexpected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least for this issue im wondering if they will be ok with just obs_date and obs_date range, knowing now that obs_date_range seems to be the std already.

Copy link
Contributor

@laspsandoval laspsandoval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question about the uncertainty name. Everything looks good after you respond to Greg and Tim.

LABL_PTR_2: longitude_label
LABL_PTR_3: latitude_label

positional_uncertainty_theta:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the recent Slack messages should this now be uncert instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants