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)
_crf capture — jwst_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.
- 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.
- 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.
- 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.
- 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.
- Per-frame ePSF —
peak_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.
- Guard —
frame_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.
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)
_crfcapture —jwst_combineruns image3 withoutlier_detection.save_results=True, captures the*_crf.fitspaths into drizzle provenance;_package_framesuses them for JWST (tweakreg-updated WCS + outlier flags), falling back to_calwith recorded absence._units_to_cpsgains a surface-brightness branch: MJy/sr kept native, recorded; manifestdata_unitsbecomes derived (loud on heterogeneous inputs) instead of hardcoded e-/s.BKGLEVEL(skymatch level) when serialized; subtract + record, 0.0 recorded otherwise — mirroring the HST MDRIZSKY convention. Verified against real crf files during validation.JUMP_DETpixels are good data; onlyDO_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-observatorydq_bad_bitsrefinement the roadmap anticipated.target_pixelthrough 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.peak_max=Nonefor surface-brightness units (the mosaic convention); exposure time viaEXPTIME→XPOSURE→EFFEXPTMfallback (also weightspsf_from_frames); STPSF stays the tier-2b roadmap item.frame_products/psf_from_framesallowed forobservatory 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=Truefrom the warm cal cache; LW spot-check if runtime allows.Supervised: proceeds to implementation; ship sign-off parks per contract.