Skip to content

feat: WFC3 (UVIS + IR) reduction support (phase 2) #4

Description

@Jammy2211

Overview

Phase 2: extend PyAutoReduce to HST/WFC3 (UVIS + IR) — the first real test of the instrument-adapter boundary built in phase 1 (#2, PR #3). Autonomous run (--auto, effective level supervised): plan recorded here, mechanical stretches proceed, judgment gates arrive as batched questions, run parks at ship sign-off.

Routing notes: (a) Brain Feature Agent heuristic again suggested research re-home; overridden — the WFC3 design delta is scoped in docs/design/roadmap.md and phase 1 established the architecture. (b) Work stacks on the unmerged feature/hst-acs-phase1 (PR #3): branch feature/wfc3-reduction from it; the PR will target main after #3 merges (or be re-based accordingly).

Plan

  • Two new instrument adapters, zero detector names outside instruments/: wfc3_uvis (ACS-like: _flc CTE-corrected, iref references, native 0.0396″/pix) and wfc3_ir (_flt, no CTE correction — up-the-ramp readout rejects CRs per read; native ~0.128″/pix; IR saturation/DQ semantics).
  • Whatever generalization the adapters force on phase-1 stage code lands with tests, and the ACS path must not change (53-test regression suite stays green).
  • New docs/design/wfc3.md: per-stage deltas vs ACS (products, references key, scale choices, IR sky/CR behaviour); audit coverage against the ajshajib/hst-lens IR+UVIS notebooks as a checklist.
  • Unit tests for adapter registry entries, per-channel drizzle-kwargs assembly, UVIS-vs-IR branch differences.
  • Integration: UVIS — reduce SDSS J0252+0039 F390W and check against the published Bayer et al. (arXiv:1803.05952) reduction (0.0396″/pix, pixfrac 1.0, σ_sky ≈ 0.002 e-/s): a literature anchor. IR — discover an F160W (or similar) lens dataset at J0252 or a nearby SLACS system via MAST; validate internally (noise closure vs empirical sky, WHT uniformity, PSF diagnostics). If no suitable IR dataset is discoverable, that leg parks as a batched question.
Detailed implementation plan

Affected Repositories

  • PyAutoReduce (primary, only)

Branch Survey

Repository Current Branch Dirty?
./PyAutoReduce feature/hst-acs-phase1 (pushed, PR #3 awaiting merge) clean

Suggested branch: feature/wfc3-reduction stacked on feature/hst-acs-phase1.

Implementation Steps

  1. instruments/adapter.py: add recommended_final_scale field (documentation + adapter-owned default recommendation; TargetSpec.final_scale stays the user dial).
  2. instruments/wfc3_uvis.py + instruments/wfc3_ir.py: registry entries with MAST names ("WFC3/UVIS", "WFC3/IR"), product suffixes (FLC / FLT), iref + references/hst/wfc3 CRDS subpath, saturation levels, per-channel default drizzle kwargs.
  3. docs/design/wfc3.md + roadmap tick.
  4. test_autoreduce/test_wfc3.py: registry, kwargs assembly, CTE flags, scale ratios, suffix differences; ACS suite untouched.
  5. scripts/reduce_j0252_uvis.py: F390W end-to-end + comparison against Bayer's published parameters.
  6. IR target discovery + scripts/reduce_<target>_ir.py (internal validation), or parked question.

Key Files

  • docs/design/roadmap.md — the WFC3 section being implemented
  • autoreduce/instruments/acs_wfc.py — the adapter pattern to follow

Original Prompt

Click to expand starting prompt

See PyAutoMind/issued/wfc3_reduction.md (filed from feature/pyautoreduce/wfc3_reduction.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions