-
Notifications
You must be signed in to change notification settings - Fork 22
ULTRA L1c deadtime correction fixes #2521
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
ULTRA L1c deadtime correction fixes #2521
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 pull request refactors the ULTRA L1c deadtime correction algorithm to determine sectored mode data by examining spin numbers in the rates dataset, rather than checking the params packet. The implementation now matches what the ULTRA instrument team uses and simplifies the codebase by removing the dependency on the params dataset.
Key Changes
- Updated deadtime calculation formula to match the algorithm document (instead of PowerPoint version)
- Changed sectored mode detection to use spin number analysis instead of params packet
- Removed params_dataset parameter from multiple functions across the L1c processing pipeline
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| imap_processing/ultra/l1c/ultra_l1c_pset_bins.py | Core algorithm changes: new sectored rates detection logic, updated deadtime ratio calculation with spin duration parameter, and direct spin phase calculation |
| imap_processing/ultra/l1c/ultra_l1c.py | Removed params_dataset parameter from function calls for helio and spacecraft pset calculations |
| imap_processing/ultra/l1c/spacecraft_pset.py | Removed params_dataset parameter from calculate_spacecraft_pset function signature and docstring |
| imap_processing/ultra/l1c/helio_pset.py | Removed params_dataset parameter from calculate_helio_pset function signature and docstring |
| imap_processing/tests/ultra/unit/test_ultra_l1c_pset_bins.py | Updated tests to match new function signatures, added manual test for sectored rates detection |
| imap_processing/tests/ultra/unit/test_ultra_l1c.py | Updated test fixtures to use rates_dataset instead of deadtime_datasets |
| imap_processing/tests/ultra/unit/test_spacecraft_pset.py | Updated test fixtures to use rates_dataset instead of deadtime_datasets |
| imap_processing/tests/ultra/unit/conftest.py | Removed deadtime_datasets fixture and cleaned up random_spin_data fixture |
💡 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.
Looks good, feel free to take/leave the comments as you see fit.
550dca9 to
ed7a306
Compare
098a804
into
IMAP-Science-Operations-Center:dev
Change Summary
Overview
Determine when the rates dataset was in sectored mode by looking at the spin numbers vs checking the params packet. This is more accurate / simpler/ and what the ULTRA IT does. They will be updating the algorithm document.
Updated Files
Testing
Fix tests, remove params datasets