Skip to content

feat: JWST frame products — implement the 7 feasibility deltas #27

Description

@Jammy2211

Overview

Implements the GO-phased verdict of docs/design/jwst.md §"Per-exposure frame products — feasibility" (#24, merged dfa0d96): extend the frames → registration → PSF chain (#16/#19/#21) to JWST/NIRCam. Prompt: feature/pyautoreduce/jwst_frame_products.md; user launched "--auto" 2026-07-10.

Plan (the 7 deltas, plus what implementation scoping added)

  1. _crf capturejwst_combine runs image3 with outlier_detection.save_results=True, captures the *_crf.fits paths into drizzle provenance; _package_frames uses them for JWST (tweakreg-updated WCS + outlier flags), falling back to _cal with recorded absence.
  2. Units_units_to_cps gains a surface-brightness branch: MJy/sr kept native, recorded; manifest data_units becomes derived (loud on heterogeneous inputs) instead of hardcoded e-/s.
  3. Sky — read BKGLEVEL (skymatch level) when serialized; subtract + record, 0.0 recorded otherwise — mirroring the HST MDRIZSKY convention. Verified against real crf files during validation.
  4. CR/DQ semantics — the meaningful divergence: JWST ramps remove CRs during slope fitting, so JUMP_DET pixels are good data; only DO_NOT_USE (bit 0, which outlier_detection also sets) means bad. JWST masking = dq & DO_NOT_USE, vs HST's any-nonzero-bit; cr_method = "ramp-jump (stage 1) + image3 outlier_detection (crf)"; no deepCR (none exists, none needed); dq_semantics switches to the JWST flag table. This lands the per-observatory dq_bad_bits refinement the roadmap anticipated.
  5. WCS — v1 anchors target_pixel through the FITS-approx SIP the footprint filter already uses (gwcs upgrade recorded as follow-up); registration block's absolute-fit keywords record as absent (JWST keeps tweakreg fit info in datamodel meta, not FITS); the measured relative residuals carry over unchanged.
  6. Per-frame ePSFpeak_max=None for surface-brightness units (the mosaic convention); exposure time via EXPTIME→XPOSURE→EFFEXPTM fallback (also weights psf_from_frames); STPSF stays the tier-2b roadmap item.
  7. Guardframe_products/psf_from_frames allowed for observatory in ("hst", "jwst"); the loud non-supported case moves to ground-based (existing tests updated from nircam to nirc2).

Validation: COSMOS-Web ring F115W (undersampled SW) end-to-end with frame_products=True, psf_from_frames=True from the warm cal cache; LW spot-check if runtime allows.

Supervised: proceeds to implementation; ship sign-off parks per contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions