Skip to content

Add new step slit_cube_build for building NIRSpec MSA cubes - #10818

Draft
jemorrison wants to merge 4 commits into
spacetelescope:mainfrom
jemorrison:MSA_Cubes
Draft

jemorrison wants to merge 4 commits into
spacetelescope:mainfrom
jemorrison:MSA_Cubes

Conversation

@jemorrison

@jemorrison jemorrison commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Helps to resolve JP-4388

This PR is a draft - submitted to get early feed back. There are some print statements that have been left to aid in testing that need to be removed and few other issue that need to be cleaned up.

This PR addresses add a new step, slit_cube_build, to create NIRSpec MSA cubes.
By default MSA cube build will weight by overlap volume and build cubes in a "drizzle fashion". There is a desire to
add read noise weighting. There is a module msa_cube_overlap.py that is just temporary. This code performs drizzle cube building weighting by overlap area and read noise. The cube_build C routines need to be updated to allow weighting by read noise. For this PR I can remove the option to weight by read noise and run this module. Or we can update the C cube build code
to allow this.

In addition we should create a new output model 'msacube'. Currently we are using the ifucube model, but there are some new
parameters (slit_frac) that are not part of the ifucube model that we need to record and we are creating a new plane called
ETIME (which can be used to find the effective exposure time of very spaxel).
There is a PR out for cube_build changing how the DQ plane is formed. Once that is merged we need to add some of the hooks
in the code (IF DESIRED) to send saturated data to the C code.

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

@jemorrison
jemorrison requested a review from a team August 24, 2026 17:55
@jemorrison
jemorrison marked this pull request as draft August 24, 2026 17:56
@jemorrison jemorrison changed the title Add to cube_build creating NIRSpec MSA cubes Add new step slit_cube_build for building NIRSpec MSA cubes Aug 24, 2026
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