# Independent image-noise audit — 2026-10-04

Status: complete bounded audit; no training, science image, fit, or production code changed. Owner: noise_audit under the final ePSF closure campaign. This directory and its report are linked by the parent campaign record/index.

## Headline / conclusion

The supplied FFI errors are not globally too small on independently selected sky support. All five current A3 scene noise arrays exactly reproduce the native FFI ERR array at their valid pixels. In F1, changing sky noise over two epochs has normalized RMS 0.656–0.658, below the supplied combined error. However, a weak detector-column component persists across hundreds of pixels. A local covariance bound cannot calibrate a global stacked residual test. Static template defects, source-dependent shot-noise errors, and kernel/background/model uncertainty are not bounded by this sky-only temporal test. The appropriate interpretation is conditional significance plus coordinate-aware covariance sensitivity, not blanket scalar error inflation and not automatic intrinsic-ePSF attribution.

## Inputs and provenance

Current five-field checks use `/astro/armin/koji/syndiff/dev_runs/paper_dataset_20261001/{F1,F2,S22,C1,C4}/scene_boot/scene_bundle.npz`, each scene's `scene_meta.json` bootstrap hp_d pointer, bootstrap native FFI, and workspace `gaia_catalog_pipeline.csv` plus `shared_mask.fits.fz`. Exact paths are in `noise_results.json`.

The F1 temporal check is deliberately the exact earlier faint-target generation used by the significance worker, from `/astro/armin/koji/syndiff/dev_runs/faint_target_photometry_20261002/extraction_production/input_manifest.json`. It compares two raw FFIs and their corresponding hp_d images separated by 0.3124957235 days. It is not a second epoch of the current five-field bootstrap scene.

Audited production checkout HEAD: `473ef11bc757e24e5af9e484d386f77093c6e69a`; pyhotpants HEAD: `dfe011164657ad4286062b0deb8a10237f31c281`. Scene/loss code read from the campaign's immutable `models/pin`. Measurements use only archived arrays plus the scripts here; no fitter import or modification. No stochastic Monte Carlo is used in this audit.

Reproduction:

```bash
eval "$(mamba shell hook --shell bash)"
mamba activate syndiff
OPENBLAS_NUM_THREADS=1 python /astro/armin/koji/syndiff/dev_runs/epsf_model_closure_20261004/noise/audit_noise.py
OPENBLAS_NUM_THREADS=1 python /astro/armin/koji/syndiff/dev_runs/epsf_model_closure_20261004/noise/covariance_audit.py
OPENBLAS_NUM_THREADS=1 python /astro/armin/koji/syndiff/dev_runs/epsf_model_closure_20261004/noise/long_lags.py
```

## Units and missing contributions

The raw calibrated image and ERR extension both state `electrons/s`. FFI crop is rows 0:2048, columns 44:2092. Scene builder copies hp_d extensions 1 and 2 at identical integer pixels. Loss uses

$$V_p=\sigma_p^2+10^{-6}.$$

Here $V_p$ is the fitted pixel variance in $(\mathrm{electron}/\mathrm{s})^2$; $\sigma_p$ is the saved noise value at pixel $p$ in electrons/s, and the numerical floor is the code constant in variance units. The equality below excludes any units conversion or sigma-versus-variance confusion in these artifacts.

| Field | Valid scene noise minus sampled hp noise, max absolute | hp noise / native ERR over all 4,194,304 pixels | Selected sky pixels | hp spatial pair MAD sigma range, lags 1–8, both axes |
|---|---:|---:|---:|---:|
| F1 | 0 | 1 exactly | 376,209 | 0.746–0.902 |
| F2 | 0 | 1 exactly | 377,554 | 0.603–0.729 |
| S22 | 0 | 1 exactly | 548,670 | 0.588–0.688 |
| C1 | 0 | 1 exactly | 657,124 | 0.719–0.833 |
| C4 | 0 | 1 exactly | 180,084 | 0.670–0.851 |

Production Hotpants is given `t_error=zeros(template.shape)` and `i_error=FFI ERR`; template convolution is forced, and native science/error pixels are not resampled. Pyhotpants combines science variance and propagated template variance, but the latter is zero under this input contract. The errors therefore omit PS1 statistical uncertainty after template resampling/convolution, fitted kernel uncertainty, background-estimate uncertainty, source-removal/catalogue errors, and ePSF/model uncertainty. These omissions may create correlated or coherent errors. Their existence does not imply that all should be represented by a scalar multiplier of FFI ERR.

## Independent support and measurements

Support requires static physical mask exactly zero, finite image/error values, positive error, a 16-pixel edge exclusion, and catalogue exclusions: rounded Gaia positions with TESS magnitude below 17 within 3 pixels, below 13 within 8 pixels, and below 9 within 20 pixels. The cuts and figure patch positions use no residual amplitude. Figure patches maximize selected-support count among fixed 64-pixel tiles. No measured values are clipped. Catalogue positions match scene coordinates to median offsets below 0.051 pixels across the five fields. This is catalogue-selected sky, not a claim of perfect absence of unknown/faint sources or wings.

For spatial pairs,

$$q_{p,\Delta}=\frac{I_p-I_{p+\Delta}}{\sqrt{\sigma_p^2+\sigma_{p+\Delta}^2}}.$$

Here $I_p$ is either raw FFI or hp_d intensity in electrons/s, $\Delta$ is a pixel offset of 1, 2, 4 or 8 along a CCD axis, and both pixels must pass the independent support. The reported robust width is $1.4826022$ times the median absolute deviation about the median of the dimensionless $q$. Raw spatial differences contain astrophysical structure; they are not estimates of white noise alone. hp_d suppresses much of that structure, with all measured pair widths below one.

![Actual five-field hp_d images, selected support, and spatial difference widths](sky_noise_audit.png)

For the temporal check,

$$u_p=\frac{I_{2p}-I_{1p}-b_{t(p)}}{\sqrt{\sigma_{1p}^2+\sigma_{2p}^2}}.$$

Here subscripts 1 and 2 identify the two archived epochs, $t(p)$ is the 64-pixel tile containing pixel $p$, and $b_t$ is the selected-sky median temporal intensity difference in that tile, in electrons/s. The dimensionless $u_p$ retains pixel and column noise but removes tile-scale changing background. The same support is used for raw and hp_d differences.

| Measurement | Raw FFI | Exact earlier faint-target hp_d |
|---|---:|---:|
| Selected pixels | 376,209 | 376,209 |
| MAD sigma of normalized temporal difference | 0.63896 | 0.63862 |
| RMS of normalized temporal difference | 0.65582 | 0.65803 |
| 64-pixel tile MAD-sigma p10 / median / p90 | 0.557 / 0.642 / 0.750 | 0.554 / 0.643 / 0.749 |
| Tiles with at least 50 selected pixels | 1,015 | 1,015 |

These tile quantiles show spatial variation, not a confidence interval. Subtracting one median per tile has minor fitted-location suppression but cannot explain a reduction from unit scatter to 0.64 with hundreds of selected pixels per typical tile. The subunit scatter may include conservative pipeline uncertainty terms or temporal covariance; do not reduce bright-star errors from this measurement.

![Underlying temporal-difference images and selected-sky distributions](f1_temporal_noise.png)

## Correlations and local sensitivity

The empirical stationary covariance is

$$C(\Delta)=\left\langle(u_p-\bar u)(u_{p+\Delta}-\bar u)\right\rangle_{p,p+\Delta\in B},\qquad \rho(\Delta)=C(\Delta)/C(0).$$

Here $B$ is the independent sky support, $\bar u$ is its global mean after tile-median removal, $\Delta$ is a two-dimensional pixel lag, and the average is over valid pairs at that lag. Covariance and pair counts for every lag from −20 to +20 pixels are stored in `covariance_results.json`. Covariance is in squared supplied-error units, not a correlation matrix with forced unit marginal.

| Local 21×21 stationary model | Raw | hp_d |
|---|---:|---:|
| Marginal variance | 0.43010 | 0.43300 |
| Neighbour rho, x / y | 0.00815 / 0.05674 | 0.01098 / 0.05802 |
| Matrix minimum eigenvalue | 0.32503 | 0.32373 |
| Matrix maximum eigenvalue | 0.97950 | 1.01830 |
| Maximum-mode sigma / nominal independent ERR sigma | 0.98969 | 1.00911 |
| Absolute-row-sum variance bound | 1.59030 | 1.62743 |
| Square root of absolute-row-sum bound | 1.26107 | 1.27571 |

Both finite patch matrices are positive definite without PSD projection. For the estimated stationary matrix on one 21×21 patch, the eigenvalue is the exact maximum variance factor over all normalized linear modes; the absolute-row-sum bound is a conservative algebraic bound on that same estimated matrix. These are **not statistical upper confidence limits** and are **not global stack bounds**. Pair supports vary with lag, covariance sampling uncertainty has not been propagated, and blank-sky stationarity/transfer to source cores is unproved. If the marginal variance is conservatively forced to one while retaining the measured hp_d correlation structure, the local row-sum sigma sensitivity becomes 1.939. No such factor is adopted as the true source uncertainty.

![Empirical covariance maps and underlying temporal-difference image](f1_covariance.png)

The long-lag check is essential: hp_d same-column rho is 0.03595 at 64 pixels, 0.04003 at 128, 0.03895 at 256, 0.02761 at 512, and 0.05525 at 1024. Raw FFIs behave similarly. A detector-column changing component therefore reaches well beyond one stellar stamp. Its observed covariance is approximately 0.015–0.024 in supplied-ERR squared units at those sampled lags. This supports a coordinate-aware column-common *sensitivity model* near variance 0.025, as passed to the significance worker; it is not an independently established variance upper bound. Sparse long-lag differences across columns require caution too. A global test must retain actual pixel coordinates and common column noise rather than multiplying all independent errors by the local patch bound.

![Long-lag column correlations and underlying temporal-difference image](f1_long_lags.png)

## Figure inspection and interpretation limits

All four PNGs were opened and inspected before this report. Five-field patches show obvious stars and subtraction structure outside selected support; the side-by-side mask makes their exclusion visible. C4 is visibly more structured and has substantially less clean support. F1 raw and hp temporal patches are similar at pixel scale, with extra smooth hp structure near excluded sources. The covariance maps show a narrow vertical correlation stripe, and the long-lag plot confirms that it persists far beyond 20 pixels.

The variance of an actual science residual includes changing science noise, reused-template error, operator/calibration errors and model mismatch, with cross-covariances when components are fitted from the same data. Static template and scene defects can cancel in temporal differences while remaining significant in a one-frame residual stack. Thus these measurements cannot isolate template random variance, certify a source-core shot-noise model, or justify attributing any detected signal entirely to the ePSF. They also cannot establish temporal photometric precision.

**Conclusion:** the input-noise chain is numerically and dimensionally verified; independent sky data provide no evidence for a large missing scalar stochastic variance. Modest but long-range column noise warrants coordinate-aware significance sensitivity. Fixed-template and source-dependent model errors remain plausible coherent residual sources and must be separated by model comparisons and held-out tests, not absorbed into an empirical chi-square rescaling.
