-
Notifications
You must be signed in to change notification settings - Fork 22
2576 lo star sensor l1b #2615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2576 lo star sensor l1b #2615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for Lo L2 star sensor product processing by implementing star sensor L1B data product generation and adding a utility function for converting epochs to fractional day-of-year.
Changes:
- Added
epoch_to_fractional_doy()function to convert TTJ2000ns epochs to floating-point day-of-year values - Implemented star sensor L1B processing pipeline including filtering, grouping, and profile averaging
- Added comprehensive test coverage for both the new time conversion function and star sensor processing
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| imap_processing/spice/time.py | Added epoch_to_fractional_doy function for fractional DOY calculations using SPICE timout |
| imap_processing/tests/spice/test_time.py | Comprehensive test suite for epoch_to_fractional_doy including edge cases and array inputs |
| imap_processing/lo/l1b/lo_l1b.py | Implemented star sensor L1B processing functions: filtering, profile calculation, grouping, and dataset creation |
| imap_processing/tests/lo/test_lo_l1b.py | Extensive test coverage for all star sensor processing functions and integration test |
| imap_processing/cdf/config/imap_lo_l1b_variable_attrs.yaml | Added CDF variable attributes for star sensor data products (met, spin_angle, avg_amplitude, count_per_bin) |
| imap_processing/cdf/config/imap_lo_global_cdf_attrs.yaml | Added global CDF attributes for imap_lo_l1b_star data product |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
greglucas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great to me! A few minor comments that can be ignored as you see fit.
| repoint_df = interpolate_repoint_data(shcoarse_sec) | ||
| # Exclude times where repoint_in_progress is True | ||
| repoint_mask = ~repoint_df["repoint_in_progress"].values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a cool use of this function! If I'm understanding right, the repoint_df will grow to the size of whatever shcoarse values you have and do linear interpolation between items and you are then taking advantage of the fact that anything other than 0 will evaluate to True and thus give you repoint_in_progress during transitions. Is that the right interpretation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly right. The "interpolation" method is to find the repoint row for each input MET time such that repoint_start_time[i] <= MET < repoint_start_time[i+1]. Maybe a misnomer, but it is sort of nearest neighbor interpolation? Then repoint_in_progress is computed and is already a boolean.
| imap_lo_l1b_star: | ||
| <<: *instrument_base | ||
| Data_type: L1B_star>Level-1B Star Sensor Spin-Averaged Profile | ||
| Logical_source: imap_lo_l1b_star |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be imap_lo_l1b_prostar for pipeline processing. ~by Greg and Mitchell
Reimplement fractional DOY function
rename l1b_star to l1b_prostar
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
18031ec to
e558d37
Compare
a43fede
into
IMAP-Science-Operations-Center:dev
Change Summary
Overview
Add the Lo L2 star product.
Add epoch_to_fractional_doy function to time.py
Closes: #2576