Fix hi goodtimes CDF to txt convertor#2888
Open
subagonsouth wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
Open
Fix hi goodtimes CDF to txt convertor#2888subagonsouth wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
subagonsouth wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates IMAP-Hi goodtimes interval extraction and TXT export so the generated TXT represents good time/bin regions (rather than writing out culled regions), matching the requested downstream “IBEX-style” goodtimes text format conversion workflow.
Changes:
- Reworked
GoodtimesAccessor.get_good_intervals()to group by ESA sweeps and emit intervals only for good bin regions. - Updated
write_txt()output formatting and updated unit tests to reflect sweep-based grouping and “good-only” intervals. - Adjusted tests to use
xarray.Dataset.sizeswhere appropriate.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
imap_processing/hi/hi_goodtimes.py |
Changes interval extraction to sweep-grouping and updates TXT writer formatting to output good-only intervals. |
imap_processing/tests/hi/test_hi_goodtimes.py |
Updates expectations for the new sweep-based grouping and good-only interval output, plus minor xarray API usage tweaks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
This PR only changes logic used to write CDF files to txt. This is not used in producing goodtimes products. It is only used by the IT to convert the CDF to a txt format used on IBEX so that Paul's tools will work with the goodtimes txt file.
The previous logic was not what Paul wanted. He wants the list to indicate the goodtimes only. I was previously writing out the culled times.