Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JP-3796: Store slit scales in slit datamodel #379

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

melanieclarke
Copy link
Contributor

@melanieclarke melanieclarke commented Jan 22, 2025

Partially resolves JP-3796
Partially resolves JP-1341

Adding a couple metadata values relevant to NIRSpec MOS data to the slit and spec datamodels.

The slit_xscale and slit_yscale attributes will hold the scale factor to convert from slit coordinates relative to the open MSA shutter area (DMS style) to coordinates relative to the full shutter pitch (PPS style). These values will be derived from data in one of the NIRSpec WCS reference files (the MSA file), and are necessary to convert DMS-style slit coordinates, such as source_xpos and source_ypos, to sky coordinates (JP-1341). Barshadow corrections also require an accurate slit_yscale value to scale correctly to large slits like NIRSpec MOS data in longslit mode (JP-3796).

The scale values are different for each MSA quadrant, so it would be helpful for users to also store the quadrant value for the slit. The quadrant is already defined in the slit datamodel (without a FITS keyword) but is not defined at all in the spectral datamodel. I added it to the spectral datamodel and added a FITS keyword for both.

Proposed new FITS keywords for SCI extensions in SlitModel or MultiSlitModel data or EXTRACT1D extensions in MultiSpecModel data are: MSAQUAD, SLTXSCL, SLTYSCL. They should be populated only for NIRSpec MOS data, and should not need to be searchable in the archive.

Tasks

  • update or add relevant tests
  • update relevant docstrings and / or docs/ page
  • Does this PR change any API used downstream? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • run jwst regression tests with this branch installed ("git+https://github.com/<fork>/stdatamodels@<branch>")
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

@melanieclarke melanieclarke changed the title Store slit scales in slit datamodel JP-3796: Store slit scales in slit datamodel Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.17%. Comparing base (788f7bd) to head (22025e1).
Report is 10 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #379       +/-   ##
===========================================
+ Coverage   67.59%   78.17%   +10.57%     
===========================================
  Files         115      115               
  Lines        5932     5146      -786     
===========================================
+ Hits         4010     4023       +13     
+ Misses       1922     1123      -799     

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

@melanieclarke
Copy link
Contributor Author

Running initial regression tests here:
https://github.com/spacetelescope/RegressionTests/actions/runs/12918138451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant