Skip to content

Validation: slacs1430+4105 ACS reduction vs trusted legacy dataset #17

Description

@Jammy2211

Overview

Validate PyAutoReduce's HST/ACS path on a second SLACS lens: reduce slacs1430+4105 (J1430+4105) from archival ACS/WFC F814W data through the production pipeline and compare the modeling-ready product against the trusted legacy dataset at /mnt/c/Users/Jammy/Science/subhalo/dataset/slacs/slacs1430+4105 (collaborator-provided, used for years in subhalo work). Goes beyond the pixel-level parity of reduce_slacs0008.py (issue #2) by adding lens-model parity fits driven through autolens_assistant — the question is not just "do the pixels match" but "does the science answer change". Methodology settled here carries to the PJ011646 WFC3 follow-up task.

Plan

  • Inspect the legacy slacs1430+4105 dataset (real-data gate: plot data/noise/PSF; it ships positions.json, extra_galaxies_centres.json, mask_extra_galaxies.fits — that extra-galaxy treatment is reused identically on both datasets).
  • Query MAST at J1430+4105 (RA 217.5171°, Dec +41.0992°) for ACS/WFC F814W exposures; confirm the SLACS proposal ID(s) from the archive rather than assuming slacs0008's 10886.
  • Write scripts/reduce_slacs1430.py adapted from scripts/reduce_slacs0008.py; run the production pipeline end-to-end (outputs to gitignored scripts/output/).
  • Pixel-level parity: autoreduce.validation.registered_ratios (sub-pixel registration) + side-by-side data / noise / S-N / PSF-profile comparison plots.
  • Lens-model parity: identical model, mask, positions and priors fit to both datasets; compare posteriors, residuals and evidence, and check against literature values (θ_E = 1.52", q = 0.68, PA = 111.7°, σ = 322 km/s).
  • Verdict on this issue: is the PyAutoReduce product scientifically interchangeable with the legacy reduction? Pipeline defects found escalate as new PyAutoMind prompts (PyAutoReduce source is claimed by frame-products; no source edits here).
Detailed implementation plan

Work classification

Workspace (scripts + analysis; no library source edits). Autonomy: safe effective (--auto launch 2026-07-09; plan approved in-session by the human before launch). The Brain Feature Agent suggested re-homing the prompt as research/; the human explicitly classified it test at intake — kept, dissent recorded here.

Affected repositories

  • PyAutoReduce (primary — new scripts/reduce_slacs1430.py + parity-fit script)
  • autolens_assistant (driver only: skills, real-data gate, API grounding; no commits — it is a generic public template, scratch outputs go to its gitignored scripts/scratch/)

Branch survey (2026-07-09)

Repository Current Branch Dirty?
./PyAutoReduce main 2 untracked (output/, prototypes/b1938_lens_fit.py — keck-ao task's parked analysis)
./autolens_assistant main 1 untracked (james.bib)

Suggested branch: feature/slacs1430-acs-parity (created only at ship time)

Claim handling: PyAutoReduce's worktree is held by frame-products (library-dev). This task follows the keck-ao-acceptance-checks pattern: analysis runs on the PyAutoReduce main checkout with no worktree claim — reductions write only to gitignored scripts/output/; the script commit/PR is deferred until the claim releases (or ships via coordination). Registered in active.md with worktree: none.

Implementation steps

  1. Phase 0 — orient. Read docs/design/hst_acs_pipeline.md (validation section). Plot the legacy dataset (data/noise/PSF + extra-galaxy mask overlay) via the assistant's al_prepare_imaging_data procedure; record pixel scale, shape, PSF stamp sizes. Post dataset.png + the extra-galaxy/artefact review to this issue (the real-data gate checkpoint — treatment is pinned by the legacy dataset's own mask files, flagged here for human review rather than blocking).
  2. Phase 1 — reduce. MAST query at (217.517083, +41.099194) → SLACS proposal ID(s) → TargetSpec(name="slacs1430+4105", ra=..., dec=..., proposal_ids=(...,))reduce_target(...) with ~/venv/PyAuto/bin/python, mirroring reduce_slacs0008.py (cache under scripts/cache/, output under scripts/output/slacs1430+4105/). Write parity_summary.json (registered_ratios, correlated_noise_factor, PSF diagnostics).
  3. Phase 2 — pixel comparison. Registered data/noise ratio maps, S/N histograms, PSF radial-profile overlay (legacy psf.fits/psf_full.fits vs new), grid/orientation/centering checks. Plots via assistant scratch; key figures attached to this issue.
  4. Phase 3 — model parity. Same model both datasets: SIE + external shear, lens light (Sersic/MGE per assistant guidance), same source parameterisation, legacy positions.json, 3.5" circular mask (per legacy info.json), identical extra-galaxy handling. Nautilus, identical priors/settings. Compare θ_E, q, PA, source properties, residual maps, log-evidence; reference literature values above.
  5. Phase 4 — report + ship. Verdict comment on this issue; reduce_slacs1430.py + parity-fit script committed to feature/slacs1430-acs-parity and PR opened behind the four-leg autonomous-ship gate once the PyAutoReduce claim allows (else parked uncommitted like keck-ao, with resume notes here). Calibration-log row appended at PR-open/park. Methodology notes → PJ011646 WFC3 follow-up prompt.

Key files

  • PyAutoReduce/scripts/reduce_slacs0008.py — template: production reduction + registered_ratios parity vs a legacy dataset in the same /mnt/c/.../subhalo/dataset/slacs/ tree
  • PyAutoReduce/autoreduce/validation.pyregistered_ratios sub-pixel registration comparison
  • PyAutoReduce/docs/design/hst_acs_pipeline.md — authoritative ACS stage design + validation bar
  • /mnt/c/Users/Jammy/Science/subhalo/dataset/slacs/slacs1430+4105/ — legacy dataset (data, noise_map, psf, psf_full, positions.json, extra_galaxies_centres.json, mask_extra_galaxies.fits, info.json)
  • autolens_assistant/skills/al_prepare_imaging_data.md, al_build_imaging_model.md — assistant procedures driving phases 0 and 3

Original Prompt

Click to expand starting prompt

PyAutoReduce validation: slacs1430+4105 ACS reduction vs trusted legacy dataset

Type: test
Target: workspaces
Repos:

  • autolens_assistant
  • PyAutoReduce
    Difficulty: medium
    Autonomy: safe
    Priority: normal
    Status: formalised

Validate PyAutoReduce against a trusted legacy reduction: reduce the SLACS lens slacs1430+4105 from archival HST/ACS data using PyAutoReduce, then compare the resulting modeling-ready dataset (data, noise map, PSF) to the long-used collaborator-provided dataset at /mnt/c/Users/Jammy/Science/subhalo/dataset/slacs/slacs1430+4105 (used for many years in subhalo work). Comparison is a science project driven through autolens_assistant: image/noise/PSF residuals plus lens-model parity fits on both datasets.

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