Skip to content

Fix hi goodtimes CDF to txt convertor#2888

Open
subagonsouth wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
subagonsouth:2879-bug---hi-goodtimes-text-convertor-write-out-goodtimes-only
Open

Fix hi goodtimes CDF to txt convertor#2888
subagonsouth wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
subagonsouth:2879-bug---hi-goodtimes-text-convertor-write-out-goodtimes-only

Conversation

@subagonsouth
Copy link
Copy Markdown
Contributor

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.

@subagonsouth subagonsouth requested a review from Copilot March 30, 2026 20:14
@subagonsouth subagonsouth self-assigned this Mar 30, 2026
@subagonsouth subagonsouth added the Ins: Hi Related to the IMAP-Hi instrument label Mar 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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.sizes where 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@subagonsouth subagonsouth added this to the April 2026 milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ins: Hi Related to the IMAP-Hi instrument

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants