IDEX l1b cli logic#2859
Merged
lacoak21 merged 3 commits intoIMAP-Science-Operations-Center:devfrom Mar 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the IDEX CLI processing path so that when multiple IDEX science inputs are provided for L1B processing, only the most recent (by time) L1A dataset is passed into idex_l1b, and adds a CLI unit test intended to verify the sorting behavior.
Changes:
- Update
Idex.do_processing()(L1B) to load multiple candidate science CDFs and select the latest byepoch. - Add a CLI test that patches
idex_l1band asserts the newest dataset is selected.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
imap_processing/cli.py |
Load all IDEX L1B candidate science inputs and select the latest dataset by epoch before calling idex_l1b. |
imap_processing/tests/test_cli.py |
Add a unit test to validate that the CLI selects the newest dataset when multiple science files are present. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tech3371
approved these changes
Mar 23, 2026
Contributor
tech3371
left a comment
There was a problem hiding this comment.
I already forgot why we are using latest. Can you add comment about why that is the case?
3519f26 to
7ea8894
Compare
lacoak21
commented
Mar 23, 2026
|
|
||
| # Convert nominal_bins to int32 for indexing | ||
| spin_bins = nominal_bins.astype(np.int32) | ||
| spin_bins: npt.NDArray[np.int32] = nominal_bins.astype(np.int32) |
Contributor
Author
There was a problem hiding this comment.
@subagonsouth I was dealing with a mypy failure here on this line.
subagonsouth
approved these changes
Mar 23, 2026
b0fd87c
into
IMAP-Science-Operations-Center:dev
14 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Overview
Now that IDEX l1b dependencies may have multiple science files pass in from batch starter, we want to make sure that we are only passing in the latest l1a file.
File changes
imap_processing/cli.py
Testing
Add a test to make sure the sorting is working.