Skip to content

I-ALiRT - Hit data access#2909

Merged
laspsandoval merged 2 commits into
IMAP-Science-Operations-Center:devfrom
laspsandoval:hit_data_access
Apr 2, 2026
Merged

I-ALiRT - Hit data access#2909
laspsandoval merged 2 commits into
IMAP-Science-Operations-Center:devfrom
laspsandoval:hit_data_access

Conversation

@laspsandoval
Copy link
Copy Markdown
Contributor

This pull request updates the process_hit function in imap_processing/ialirt/l0/process_hit.py to improve how hit groups with zero status values are handled and logged, and adjusts the corresponding unit test. The main changes group all hit groups with zero status values and log them together as a warning, rather than logging each occurrence individually and skipping processing. The test is updated to reflect the new behavior and expected output.

Improvements to hit group status handling:

  • Modified process_hit to collect all hit groups with zero status values in a status_groups list and log them together as a warning at the end, instead of logging and skipping each group immediately. This change improves logging clarity and ensures all groups are processed. [1] [2] [3]
  • Removed redundant status checks and logging for each group, simplifying the code and reducing unnecessary log output.
  • Updated import statements to remove unused met_to_utc import, as it is no longer needed for per-group logging.

Unit test updates:

  • Updated the test_process_hit unit test to expect 15 processed hits (instead of 1), and to match the new expected values for the hit product, reflecting the changes in how hit groups with zero status values are handled.

@laspsandoval laspsandoval added this to the April 2026 milestone Apr 2, 2026
@laspsandoval laspsandoval requested a review from lacoak21 April 2, 2026 21:23
@laspsandoval laspsandoval self-assigned this Apr 2, 2026
@laspsandoval laspsandoval added Ins: HIT Related to the HIT instrument I-ALiRT labels Apr 2, 2026
@laspsandoval laspsandoval added this to IMAP Apr 2, 2026
Copy link
Copy Markdown
Contributor

@lacoak21 lacoak21 left a comment

Choose a reason for hiding this comment

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

Nice looks good and makes sense to me.

grouped_data["hit_met"][(grouped_data["group"] == group).values].values[0]
)

status_values = grouped_data["hit_status"][
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting was this a duplicate check here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. But also they want to produce data even if the status is not nominal. So that's what this ticket is about.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cool yeah that part makes sense.

@laspsandoval laspsandoval merged commit a1a8f60 into IMAP-Science-Operations-Center:dev Apr 2, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this to Done in IMAP Apr 2, 2026
@laspsandoval laspsandoval deleted the hit_data_access branch April 2, 2026 22:02
sapols pushed a commit to sapols/imap_processing that referenced this pull request Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-ALiRT Ins: HIT Related to the HIT instrument

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants