Skip to content

JP-3139: Add support for DQ flag propagation in the resample step#10234

Open
mcara wants to merge 1 commit intospacetelescope:mainfrom
mcara:propagate-dq
Open

JP-3139: Add support for DQ flag propagation in the resample step#10234
mcara wants to merge 1 commit intospacetelescope:mainfrom
mcara:propagate-dq

Conversation

@mcara
Copy link
Member

@mcara mcara commented Feb 6, 2026

Resolves JP-3139

Closes #7766

This PR adds support for propagating all DQ flags (not just saturation) in resample. If users are interested only in one flag such as SATURATED, then it is possible to filter these out using bitwise AND on the resampled image's DQ:

from stdatamodels.jwst.datamodels import dqflags

saturated = np.bitwise_and(resampled_model.dq, dqflags.pixel["SATURATED"]).astype(bool)

Regression test: https://github.com/spacetelescope/RegressionTests/actions/runs/21736872626

Tasks

  • If you have a specific reviewer in mind, tag them.
  • add a build milestone, i.e. Build 12.0 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see changelog readme for instructions)
      • if your change breaks step-level or public API (as defined in the docs), also add a changes/<PR#>.breaking.rst news fragment
    • update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly

@mcara mcara requested a review from tapastro February 6, 2026 02:47
@mcara mcara self-assigned this Feb 6, 2026
@mcara mcara requested a review from a team February 6, 2026 02:47
@mcara mcara added the resample label Feb 6, 2026
@mcara mcara requested a review from braingram as a code owner February 6, 2026 02:47
@mcara mcara added this to the Build 12.3 milestone Feb 6, 2026
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.53%. Comparing base (bbf1e5f) to head (72014f9).
⚠️ Report is 65 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10234      +/-   ##
==========================================
+ Coverage   85.98%   86.53%   +0.55%     
==========================================
  Files         368      366       -2     
  Lines       38457    38459       +2     
==========================================
+ Hits        33066    33281     +215     
+ Misses       5391     5178     -213     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track saturated pixels into combined mosaics

1 participant