feat: HST/ACS reduction pipeline (phase 1) - #3
Merged
Conversation
TargetSpec, ACS/WFC instrument adapter + registry, MAST acquisition with HAP-skycell query hygiene, CRDS sync, size-capped transient cache with provenance manifest, AstroDrizzle wrapper (pixfrac/kernel dials, single-exposure branch, WHT-uniformity diagnostic), noise map with Casertano R applied, tier-1 ePSF (star cuts + EPSFBuilder) with loud tier-2 fallback stop, WCS-intact cutouts + reduction.json, pipeline orchestrator. 52 numpy/astropy-only unit tests. Tests caught two real bugs: casertano_r fine-grid branch had p/s inverted (spike unaffected: it ran s=1 on the other branch), and the cache size cap counted its own manifest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…008-0004 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…mbine() Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…ost-extraction star check, loud manifest schema, offline cached re-runs, HDU close, units from drizzle kwargs, astropy sigma-clip Review verdict FINDINGS -> resolved; deliberate non-fixes (tier-2 hard stop, strict cutout) are the no-silent-guards rule. 53 tests green; end-to-end re-validated on slacs0008-0004 with identical parity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
This was referenced Jul 8, 2026
This was referenced Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the HST/ACS reduction pipeline designed under #1 and planned on #2 (autonomous run,
--autosupervised; parked at ship sign-off per the autonomy contract).What this adds
Production
autoreducepackage (spike → modules), all behind the ACS/WFC instrument adapter:target.py— declarativeTargetSpec(YAML-loadable): coords, filter, proposal filter, cutout/PSF shapes, and the user-facing drizzle dials (final_pixfracdefault 0.8,final_kernelsquare,final_scale0.05″).instruments/— adapter registry;acs_wfccarries native scale,_flcproducts,jref+ CRDS subpath, default drizzle kwargs, saturation.acquire/— MAST query with HAP-skycell hygiene + proposal/visit filtering; FLC download; CRDS bestrefs sync (skipped when cached + references present, so offline re-runs work); size-capped transientExposureCachewith provenance manifest (loud on spike-era schemas), per-target eviction sparing shared references.align/— a-priori WCS provenance recording; TweakReg behind a trigger.drizzle/— AstroDrizzle wrapper: cps/IVM/north-up, single-exposure branch (SLACS-V caveat), WHT RMS/median uniformity diagnostic, Casertano R recorded; lowercase-relative output root (drizzlepac lowercases paths — case-sensitive FS fix).noise/— σ = R·√(max(sci,0)/t_exp + 1/W); NaN on bad weights, hard failure if any land inside the packaged cutout.psf/— tier-1 ePSF: star cuts (point-like, unsaturated, uncrowded, edge-safe) +EPSFBuilder; 21×21 + 61×61 kernels;InsufficientStarsErrorhard stop with tier-2 as an explicit unimplemented interface (no silent degradation).package/— WCS/units/EXPTIME-intact cutout headers +reduction.json(full per-stage provenance incl. software versions).pipeline.py— the orchestrator: acquire → align → drizzle → noise → psf → package → evict.API Changes
New public API (nothing downstream consumes it yet):
autoreduce.TargetSpec,autoreduce.reduce_target,autoreduce.instruments.{get,register,InstrumentAdapter}, plus stage modules. No changes to any other PyAuto* repo; autoreduce imports none of them.Scripts Changed
scripts/reduce_slacs0008.py— integration/acceptance: production reduction of slacs0008-0004 + sub-pixel-registered parity vs the legacy dataset.prototypes/slacs_f814w_spike.py— Casertano fine-grid branch corrected ((p/s) → (s/p); spike results unaffected, it ran s=1).Gate legs (supervised — parked at sign-off)
mode="strict"cutouts are the no-silent-guards rule, not bugs. Deferred (noted, low stakes): O(N²) crowding rejection (fine at current N), crude FWHM diagnostic.Validation checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
Closes #2 discussion at ship; merge remains a human act.