Skip to content

JP-4370: Unset S_REGION if wcs is not sky-like#10586

Merged
tapastro merged 5 commits into
spacetelescope:mainfrom
melanieclarke:jp-4370
Jun 4, 2026
Merged

JP-4370: Unset S_REGION if wcs is not sky-like#10586
tapastro merged 5 commits into
spacetelescope:mainfrom
melanieclarke:jp-4370

Conversation

@melanieclarke

@melanieclarke melanieclarke commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Resolves JP-4370

NIRSpec lamp exposures are resampled in the MSA frame, not in RA/Dec, so they should not have a celestial S_REGION assigned after assign_wcs.

This PR uses a utility that checks the output coordinate frame for the WCS to see if any of its units are sky-like (degrees or arcsec). This utility was previously in the resample module; I moved it to the assign_wcs.util module, near the s_region utility functions used in multiple places.

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

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.58%. Comparing base (2e5290f) to head (5cceb00).

Files with missing lines Patch % Lines
jwst/resample/resample_spec_step.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10586   +/-   ##
=======================================
  Coverage   86.58%   86.58%           
=======================================
  Files         374      374           
  Lines       40443    40453   +10     
=======================================
+ Hits        35018    35027    +9     
- Misses       5425     5426    +1     

☔ View full report in Codecov by Harness.
📢 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.

@melanieclarke melanieclarke added this to the Build 13.0 milestone Jun 1, 2026
@melanieclarke

Copy link
Copy Markdown
Collaborator Author

Regtests:
https://github.com/spacetelescope/RegressionTests/actions/runs/26840478323

Results are as expected. NIRSpec lamp exposures no longer have S_REGION keywords after assign_wcs. Other products are not affected.

@melanieclarke melanieclarke marked this pull request as ready for review June 2, 2026 20:12
@melanieclarke melanieclarke requested a review from a team June 2, 2026 20:12
Comment thread jwst/assign_wcs/util.py
Comment thread jwst/assign_wcs/util.py
@tapastro tapastro enabled auto-merge (squash) June 4, 2026 14:38
@tapastro tapastro disabled auto-merge June 4, 2026 15:12
@tapastro tapastro merged commit e90ba7a into spacetelescope:main Jun 4, 2026
29 of 30 checks passed
@melanieclarke melanieclarke deleted the jp-4370 branch June 4, 2026 16:14
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.

3 participants