# Phase-aware residual stacks — completed 2026-10-03

[Canvas](http://localhost:18888/faint-target-photometry/#phase-stacks).

Question: does 4x subpixel-phase registration reveal a common structural residual hidden in the native stacks?

Inputs: unchanged first-epoch comparison sample, 760 targets in extraction_production; saved physical masks, full joint residuals, saved profile positions, and fixed PS1 catalogue flux normalization. No refitting or residual-value clipping. Full inputs/hashes, coordinate checks and group numbers are in provenance.json; exact membership/halves in sample.csv.

Method: reuse the self-contained rasterize_packed_values function from dev/forward_epsf_wcs/diagnostics/stacked_temporal_residuals.py (source snapshot and hash retained), 4x grid, half-width3 pixels, discard splat coverage<0.05. Equal-star mean and median; min8 contributors/full,4/half. Split stars deterministically with seed20261003, stratified by broad magnitude/colour/CCD cell, randomly assigning the odd member. Output cells are correlated. Stamps can share FFI pixels, so disjoint star halves are not independent noise realizations. Bootstrap median uncertainty:200 whole-star resamples, seed20261004. Noise/model/calibration correlations are not corrected.

Counts: T13–15:161, T15–17:331, T17–19:268. Core median contributor counts per output cell:35,66,52. Median-map RMS within2 pixels:0.000499,0.001063,0.005476 of predicted total flux per sampled native-pixel amplitude. Median empirical bootstrap SE:0.000388,0.000972,0.005713. Half-map correlations:0.227,0.165,−0.109. These are descriptive; they are not global significances or integrated flux errors.

Figures: phase_median.png and phase_median_uncertainty.png support median claims; phase_stacks.png, phase_uncertainty.png show un-clipped mean/outlier sensitivity; phase_coverage.png shows actual joint observations/models, count maps and phase distribution; phase_colour.png and phase_cell.png show T13–17 heterogeneity. Every figure was visually inspected. Mean and median retain the same targets. Median residual is stacked directly, not formed by subtracting independently computed medians.

Validation: saved data/model/residual arithmetic closure <1e-9 in normalized raster units; constant preservation, empty masked output, fractional impulse-centroid checks passed. Analytic signed ring at actual phase positions gives correlation0.999589 against the continuous pattern; this tests raster alignment only, not extraction/PSF correctness. Test record alignment_test.json.

Reproduction: activate syndiff, run `OPENBLAS_NUM_THREADS=1 python /home/kshukawa/syndiff_pipeline/dev/.claude/worktrees/codex-faint-target-photometry/forward_epsf_wcs/faint_targets/phase_stack.py`. Generator copied here; dev branch codex/faint-target-photometry-20261002. Saved arrays include per-star rasters, support and stacked products. Only this follow-up's /astro outputs and owned diagnostic sources were changed.

Conclusion: a weak central positive/negative pattern appears in the bright median stack, but half-sample reproducibility is modest and amplitudes are comparable to empirical uncertainty. The mean is strongly sensitive to outliers; the faintest group has no clear repeating structure. This qualifies the earlier individual-star assessment: a common weak shape is tentative, not ruled out, but there is no secure attribution to ePSF mismatch or proof of pure Poisson noise. Next discriminating test would need a larger independent-star sample and a fitted-noise null. No temporal/full-sector conclusions follow.

Final backup: dev commit `a6296c2` pushed; owned worktree clean. Alignment test reproducible with `check_phase_alignment.py`. Portal figure and stack-array downloads verified HTTP200; all local HTML links checked. No jobs remain from this diagnostic. Conclusion remains tentative bright structure, not a secure defect detection or a Poisson-noise certification.

Cleanup: diagnostic sources are now on dev main (`c6ee827`) at `/home/kshukawa/syndiff_pipeline/dev/forward_epsf_wcs/faint_targets/`; replace the historical feature-worktree prefix in reproduction commands with this canonical path. See parent CLEANUP.json.
