Skip to content

ULTRA l1b spectral cull #2940

Merged
lacoak21 merged 6 commits intoIMAP-Science-Operations-Center:devfrom
lacoak21:ultra_l1b_spectral_cull
Apr 9, 2026
Merged

ULTRA l1b spectral cull #2940
lacoak21 merged 6 commits intoIMAP-Science-Operations-Center:devfrom
lacoak21:ultra_l1b_spectral_cull

Conversation

@lacoak21
Copy link
Copy Markdown
Contributor

@lacoak21 lacoak21 commented Apr 8, 2026

Change Summary

closes #

Overview

Adds new ULTRA L1b culling/quality-flagging for upstream-ion contamination and spectral anomalies, and wires those flags into the extendedspin→goodtimes→filtering flow.

Changes:

Introduces upstream-ion and spectral spin-bin flagging functions and new culling constants (channels/thresholds).
Integrates the new flags into calculate_extendedspin and the downstream quality-flag filtering lists / goodtimes fill behavior.
Updates and extends unit tests + fixtures to cover the new flags and required input fields.

File changes

  • imap_processing/ultra/l1b/ultra_l1b_culling.py
    • Adds upstream-ion and spectral culling flag functions; minor energy-range bin edge indexing tweak.
  • imap_processing/ultra/l1b/extendedspin.py
    • Calls new culling functions, updates masking order, and emits new quality flag variables.
  • imap_processing/ultra/l1b/quality_flag_filters.py
    • Includes new quality flag arrays in the set used for energy/spin-dependent filtering.
  • imap_processing/ultra/l1b/goodtimes.py
    • Ensures new quality flags exist (fill values) when goodtimes is empty.
  • imap_processing/ultra/constants.py
    • Adds channel sets and sigma thresholds for the new culling steps.

Testing

Validation test using bobs data

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

Adds new ULTRA L1b culling/quality-flagging for upstream-ion contamination and spectral anomalies, and wires those flags into the extendedspin→goodtimes→filtering flow.

Changes:

  • Introduces upstream-ion and spectral spin-bin flagging functions and new culling constants (channels/thresholds).
  • Integrates the new flags into calculate_extendedspin and the downstream quality-flag filtering lists / goodtimes fill behavior.
  • Updates and extends unit tests + fixtures to cover the new flags and required input fields.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
imap_processing/ultra/l1b/ultra_l1b_culling.py Adds upstream-ion and spectral culling flag functions; minor energy-range bin edge indexing tweak.
imap_processing/ultra/l1b/extendedspin.py Calls new culling functions, updates masking order, and emits new quality flag variables.
imap_processing/ultra/l1b/quality_flag_filters.py Includes new quality flag arrays in the set used for energy/spin-dependent filtering.
imap_processing/ultra/l1b/goodtimes.py Ensures new quality flags exist (fill values) when goodtimes is empty.
imap_processing/ultra/constants.py Adds channel sets and sigma thresholds for the new culling steps.
imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py Adds fixture reuse and new validation tests for upstream-ion and spectral culls.
imap_processing/tests/ultra/unit/test_spacecraft_pset.py Extends test datasets with theta/phi fields.
imap_processing/tests/ultra/unit/conftest.py Extends mocked goodtimes dataset with the new quality flag variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lacoak21 lacoak21 marked this pull request as ready for review April 9, 2026 15:37
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 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@laspsandoval laspsandoval self-requested a review April 9, 2026 19:56
Copy link
Copy Markdown
Contributor

@laspsandoval laspsandoval left a comment

Choose a reason for hiding this comment

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

Looks good. One question.

@lacoak21 lacoak21 merged commit c899b14 into IMAP-Science-Operations-Center:dev Apr 9, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Apr 9, 2026
@lacoak21 lacoak21 deleted the ultra_l1b_spectral_cull branch April 9, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants