Skip to content

refactor: post-phase-3 consolidation (behaviour-preserving) #8

Description

@Jammy2211

Overview

Consolidate structure debt from three fast instrument phases. Behaviour-preserving: identical products/provenance (modulo timestamps/version stamps) for identical inputs; public API unchanged. Plan approved in-session (default present-and-wait run; refactor cap is safe but no --auto was given).

Plan

  • Decompose pipeline.reduce_target into per-stage functions (record layout byte-identical).
  • Extract autoreduce/validation/parity.py (sub-pixel registration + ratio stats) — de-triplicates the integration scripts.
  • Extract drizzle/_common.py (chdir-scratch context manager + shared provenance fragment) used by both combine backends.
  • Vectorize psf/stars.reject_crowded (identical selection results; randomized equivalence test).
  • Hoist cheap function-local imports; tidy exptime coercion.

Out of scope: _fwhm_of upgrade, dial defaults, tier-2 PSF (behaviour-visible).

Witnesses

  1. 83-test unit suite per commit (+1 equivalence test).
  2. Offline cached end-to-end re-runs, ACS (slacs0008-0004) and JWST (F444W ring): products byte-compared, reduction.json compared modulo written_at/software. Baselines captured from main (f91d79c) before any edit.

RefactorDecision: API guard none-expected; witness registry gap overridden with the above evidence.

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