# Paired stellar-signal transfer through actual background operators

**Follow-up:** `BACKGROUND_ANOMALY_LOCALITY_20261003.md` localizes the first
distant change to SEP-based anomaly repair after the filled/smoothed image.
The matched harmonic control here is a mitigation, not evidence that the
interpolator alone creates the nonlinear response. Exact stage, sealed-input
and independent-object controls now identify a deblending-associated pathway.

2026-10-03. **Conclusion:** the historical background route has a reproducible
nonlinear, nonlocal response to an injected extended stellar profile at the
tested S24 exposure. Exactly zero and fully masked-core injections produce
zero response. Replacing only the historical hole fill with harmonic filling,
on the same residual and mask, suppresses the distant response in this test.
This is a candidate remedy for this background failure, not a validated
full-chain repair or photon-limited light curves. Current RAW photometry is
unchanged and the main objective remains active.

Run: `/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/`.
Code: local `codex/temporal-raw-epsf` in
`/home/kshukawa/syndiff_pipeline/dev/.worktrees/temporal-raw-epsf`.
Owned scripts are `prepare_background_transfer.py`, `background_operator_replay.py`,
`background_transfer_probe.py`, `background_transfer_assessment.py` and
`background_transfer_spatial.py` under `temporal_raw_epsf/`. Nothing pushed.

## Reproduce the actual baseline first

The historical and paper generations were identified in `HPD_GENERATION_BRIDGE.md`.
The paper producer's recorded commit is
`a3d50a0070c504dd9ccc58d0c38236b58759f77f` in `paper-pin-diff`. The clean pinned
package loads the actual convolution input, shared/temporal masks and frozen
stage configuration. Its self-contained estimator module is copied and hashed
under `inputs/background_transfer/`, alongside frozen residual/mask/wing-exclusion
arrays and package versions. Later probes import this copy, not live source.

On FFI 602 (`tess2020120182919-s0024-2-2`), raw-minus-convolved-template agrees
with saved ks_d+ks_b within one float32-epsilon-scaled unit for both lanes.
Legacy biharmonic/default-mask and paper harmonic/magnitude-wing-mask replays
then match their archived background arrays **bit for bit over all 4,194,304
pixels**. This proves computational provenance, not true-sky background accuracy.

![Actual replayed backgrounds and their difference](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/background_transfer_probe/assessment/baseline_images.png)

Existing `localbg_20260930` and `maskfoot_20261001` already tested star-wing
contamination at mask rims and alternative masking/filling. Those studies
are reused as context. This test adds explicit known-input signal transfer
and remote-aperture checks to the actual historical/paper operators.

## Injection and fixed measurement

Let

$$\delta B=\mathcal B(D+\epsilon J)-\mathcal B(D),\qquad
\delta f_s=\sum_p w_{s,p}(\epsilon J_p-\delta B_p).$$

Here $D$ is the frozen RAW-minus-convolved-template residual, in electrons/second
per pixel; $\mathcal B$ is the complete frozen background estimator, including
its nonlinear rejection and strap steps. The pixel index is $p$, and $s$
labels a measured source. The injected profile $J$ is in electrons/second
per pixel and is normalized so its existing r3 aperture/sky measurement equals
the selected target's measured RAW r3 rate. The dimensionless $\epsilon$ is
0, ±0.001, or +0.01. The fixed dimensionless $w$ are the existing aperture/sky
weights. The recovered increment $\delta f$ is in electrons/second. The
background-induced photometric error is $-\sum_p w_{s,p}\delta B_p$; dividing
by that source's RAW aperture rate and multiplying by $10^6$ gives ppm.

Gaia 1629810213318424704 is selected because it had the largest science
generation difference, before examining injection results. This is one
target/exposure, not a population sample. Its core is taken from the archived
RAW ePSF. Its 3–30-pixel polar wing uses the earlier F1 empirical wing fit,
with its one negative fitted bin explicitly clipped to zero. The profile is
conditional, not a certified physical PSF; light beyond 30 pixels is absent.
The convolved template, catalogue masks, source positions and all background
settings except the declared fill control remain fixed. No Poisson draw or
stellar trend fit is used in this deterministic difference measurement.

![Injected source and actual background-fit boundaries](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/background_transfer_probe/assessment/injection_geometry.png)

## Necessary controls and numerical qualification

Initial legacy probes reused a baseline computed on another host. Their
interpretation was marked provisional until every legacy amplitude/sign was
repeated with baseline and perturbation recomputed in the **same process**.
The full response images and aperture-input stamps match the earlier results
exactly. Both zero injection and compact-core injection give exactly zero
background response everywhere. A separate positive-signal repeat also matches
exactly. The nonlocal effect is therefore not inferred merely from cross-host
baseline subtraction. Final verification: `spatial_paired/summary.json`.

Harmonic solves must converge; an unsuccessful CG solve raises instead of
being accepted. Tightening the paper solve from relative tolerance 1e-6 to
1e-10 changes the target error by 8.93e-7 ppm and the largest auxiliary-source
error by 2.15e-6 ppm. Tight solves reach residuals below 1e-10. These are
numerical-sensitivity checks, not physical uncertainty bounds.

## Measured target response

| Operator / injection | Background-induced target error [ppm of baseline RAW r3] |
|---|---:|
| Historical, +10 ppt | −0.4361 |
| Historical, +1 ppt | +2.7415 |
| Historical, −1 ppt | +3.4911 |
| Historical input/mask, harmonic fill only, +1 ppt | −0.07305 |
| Paper, tight solve, +1 ppt | −0.007259 |
| Historical zero/core-only controls | exactly 0 |

The historical response is neither a simple scaling nor odd in the injected
amplitude. This characterizes the **complete background route**, not the
linear biharmonic interpolator in isolation. The precise downstream decision
responsible still needs stage-by-stage tracing.

![Actual paired background-response patches](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/background_transfer_probe/assessment/paired_background_images.png)

![Transfer and distant-aperture measurements](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/background_transfer_probe/assessment/transfer_measurements.png)

These earlier plotted legacy response arrays were validated bitwise by the
same-process reruns. None is used as a correction to the science candidate.

## Distant sources are the more serious failure

There are 163 science and 234 reference apertures more than 100 pixels from
the injected source. Every one receives **exactly zero injected counts**.
For a +1-ppt injection, the following errors arise solely through the
background calculation:

| Operator | Remote science p95 / maximum [ppm] | Remote reference p95 / maximum [ppm] |
|---|---:|---:|
| Historical | 3.276 / 29.766 | 10.440 / 97.186 |
| Same historical image/mask, harmonic fill | 3.92e-11 / 1.05e-9 | 1.77e-10 / 3.02e-5 |
| Paper, tight solve | 8.10e-9 / 4.69e-8 | 2.92e-8 / 6.96e-5 |

The negative historical injection produces the same remote summary values.
The paired arrays retain the full information. Tiny control values describe
this deterministic calculation and must not be reported as photometric noise
or universal error bounds.

![Full-CCD response, with the injected source and remote examples marked](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/background_transfer_probe/spatial_paired/global_background_response.png)

![Underlying images at the remote source apertures](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/background_transfer_probe/spatial_paired/remote_response_stamps.png)

## Baseline normalization is separate

The selected star's archived legacy/paper hp_d r3 rates are 0.976213/1.000245
of the same RAW r3 rate. Thus preserving the absolute injected increment
does not validate the amplitude after normalizing a light curve by its own
baseline. For example, the legacy +1-ppt recovered increment, divided by its
archived hp_d baseline, is 1.02718 times the injection defined relative to RAW
r3. This is a comparison of denominators, not a claim that RAW aperture light
is pure primary-star truth. Its component images are in the generation-bridge
report, and exact rates are retained in the assessment table.

## Reproducibility and next action

All jobs below ran on the plscience3 scheduler with task-owned `/astro` outputs:
preparation 1724; bit-exact baselines 1728/1729; initial probes 1745–1748,
1752/1753, 1767/1768; first assessment 1773; matched harmonic control 1780;
initial spatial assessment 1789; same-process zero/positive/negative/large/core
controls 1796–1800. All are terminal exit 0. Frozen commands/source hashes are
in their named `condor/` directories. Final paired spatial verification 1802 exited 0 after 18 seconds. All reported figures were inspected before publication.

The next test should trace the nonlinear background stages and test the
matched harmonic candidate on additional actual epochs and stars before
creating or accepting a replacement hp_d time series. Full Hotpants/kernel
and ePSF refits, source accounting, normalized signal recovery and the
multiscale magnitude/colour/spatial light-curve gates remain required.

**Conclusion:** a causal background-processing failure is established for
this controlled historical-operator probe, and a matched fill change suppresses
it. The current RAW extraction does not subtract that historical background,
so this does not explain its remaining systematics by itself. No production
or science candidate is replaced; the overall goal is still unmet.
