Skip to content

ULTRA l2 map duration descriptor #3024

Merged
lacoak21 merged 2 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:ultra_l2_map_cadence_descriptor
Apr 20, 2026
Merged

ULTRA l2 map duration descriptor #3024
lacoak21 merged 2 commits into
IMAP-Science-Operations-Center:devfrom
lacoak21:ultra_l2_map_cadence_descriptor

Conversation

@lacoak21
Copy link
Copy Markdown
Contributor

Change Summary

closes #3019

Overview

Pass the cadence label from the input job descriptor to the output map descriptor. ULTRA code was recalculating the cadence label (e.g. 3mo, 6mo ect.) based on the actual psets passed into the job. This can cause unintended consequences (see linked issue).

This is updating the ULTRA code to follow what Hi and Lo are doing.

File changes

imap_processing/ultra/l2/ultra_l2.py

  • pass the duration label along from the input desc.

Testing

Update the input descriptor in the test to check that the output contains the same descriptor.

@lacoak21 lacoak21 self-assigned this Apr 20, 2026
@lacoak21 lacoak21 added this to IMAP Apr 20, 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

Updates ULTRA L2 map metadata to keep the duration/cadence label from a provided input descriptor rather than recalculating it from the PSET epoch span (fixing the mismatch described in #3019).

Changes:

  • Capture the duration token from the parsed descriptor and use it for Logical_source/related formatted metadata.
  • Fall back to the previous “compute duration from PSET epochs” behavior only when no descriptor is provided.
  • Update the ULTRA L2 descriptor unit test to validate that output metadata retains the descriptor’s duration label even when the PSETs span a different duration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
imap_processing/ultra/l2/ultra_l2.py Prefer descriptor-provided duration label for output map naming/metadata; fallback to computed duration otherwise.
imap_processing/tests/ultra/unit/test_ultra_l2.py Adjust descriptor-based test to assert output Logical_source matches the descriptor duration label.

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

Comment thread imap_processing/ultra/l2/ultra_l2.py
@lacoak21 lacoak21 requested a review from ahotasu April 20, 2026 17:08
Copy link
Copy Markdown
Contributor

@tmplummer tmplummer left a comment

Choose a reason for hiding this comment

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

LGTM!

@lacoak21 lacoak21 merged commit 980821d into IMAP-Science-Operations-Center:dev Apr 20, 2026
14 checks passed
@lacoak21 lacoak21 deleted the ultra_l2_map_cadence_descriptor branch April 20, 2026 19:55
@github-project-automation github-project-automation Bot moved this to Done in IMAP Apr 20, 2026
lacoak21 added a commit to lacoak21/imap_processing that referenced this pull request May 4, 2026
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.

L2 MAP cadence descriptor label

3 participants