# Paired coadd quantization and the current extraction noise budget

**2026-10-03 conclusion:** onboard requantization accounts closely for the
scale of the measured two-minute/FFI raw-count disagreement. An integer
upper-tie convention also accounts for its small signed offset without fitting
an additive parameter. For the current 165 eligible stars on 36 exposures,
the conditional fixed-profile quantization variance is median 5.25% of the
archived pixel-error variance propagated through the identical extraction.
It cannot supply a large missing independent-noise term in this comparison.
Its inclusion in the archive has not been established; no noise is added,
no light curve is changed, and the full photon-limited goal remains unmet.

Run: `/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/`.
Code: `/home/kshukawa/syndiff_pipeline/dev/.worktrees/temporal-raw-epsf/temporal_raw_epsf/`,
local branch `codex/temporal-raw-epsf`. Prior turn classification: progress,
because it completed current-channel evidence and the identical-pixel bridge.

## Inputs and distinction from earlier rounding tests

This tests lossy compression of already accumulated coadds, not rounding of
individual ADC readouts. The earlier individual-readout ADC null does not
answer this question. The [TESS Instrument Handbook, section 7.7](https://archive.stsci.edu/files/live/sites/mast/files/home/missions-and-data/active-missions/tess/_documents/TESS_Instrument_Handbook_v0.1.pdf)
describes per-pixel requantization before lossless differencing/Huffman encoding.
The actual official tables used here are cached and hashed under
`inputs/calibration_audit/`:

- `tess2018154223256-00002_405-0720-crm-ffi-requant-table.xml`, 65,536 entries.
- `tess2018154223256-00002_402-0048-crm-requant-table.xml`, 16,384 entries.

Every tested raw value exactly matches an interior reconstruction-table entry.
Input files, positions, fixed RAW offsets, timing and target-pixel membership
are those verified in `CALIBRATION_PIXEL_BRIDGE.md`. This pilot uses TIC
198208038, 36 preselected FFIs, 121 pixels per FFI and 15 matched TP coadds per
FFI. It retains diagnostic flagged intervals; the prior clean-coverage failure
remains failed.

## Continuous-cell prediction and integer control

For one decoded value the continuous uniform-cell model gives

$$\mu_e=\frac{d_- - d_+}{4},\qquad
V_e=\frac{(d_-+d_+)^2}{48}.$$

Here $e$ is decoded minus prequantized counts in ADU, $d_-$ and $d_+$ are
the positive separations to the adjacent lower and upper table entries in ADU,
$\mu_e$ is the conditional mean encoding error in ADU, and $V_e$ is its
variance in ADU squared. This assumes nearest-table assignment and locally
uniform true counts within the cell; it is an approximation, not measured
noise truth. For unequal spacings, the commonly used
$(d_-^2-d_-d_++d_+^2)/12$ is mean-square error, not centred variance. The code
explicitly checks the mean-square identity.

For the paired difference, independent-bin means subtract and variances add
across 15 TP samples and one FFI. All 4,356 observed differences lie within
the resulting cell-wise allowed bounds. The aggregate standardized RMS is
1.02255 and mean is 0.10664. Shared-photon quantization correlations are not
assumed absent in the physical detector merely because this approximation
matches the scatter.

![Paired differences and approximate uncertainty comparisons](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/requant_pixel_bridge/quantization_scores.png)

![Actual detector pixels behind those statistics](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/requant_pixel_bridge/quantization_pixels.png)

Prequantized coadds are integer counts, so continuous-cell moments are not
the full rounding test. For each tie convention, enumerate the inclusive
integer endpoints of the nearest-entry cell and use

$$\mu_e=L-\frac{a+b}{2},\qquad V_e=\frac{(b-a+1)^2-1}{12}.$$

Here $L$ is the decoded integer table value in ADU, and $a,b$ are the
smallest/largest integer prequantized counts assigned to it. The preceding
$\mu_e,V_e$ definitions and units remain unchanged. An independent nearest-
distance encoder exhaustively verifies 66 synthetic integer inputs across
nonuniform cells and both tie rules, including parity boundaries.

| Convention | Mean predicted paired offset [ADU] | Standardized residual mean | Standardized residual RMS |
|---|---:|---:|---:|
| Ties to lower value | -3.61077 | 0.20562 | 1.05765 |
| Ties to upper value | +3.11490 | 0.00789 | 1.00971 |

This is evidence consistent with upper ties, not independent verification of
flight-software code. No offset coefficient was fitted. It does not establish
a stellar flux correction or distinguish all possible upstream conventions.

## Projection through the actual current stellar estimator

All 172 science sources are computed, and results below use the unchanged
165-source eligible subset. All four readout gains and actual pixel flat
values are retained. For each of the 36 original raw FFIs, compute each
pixel's local table variance and project it through the current response-aware
profile-plus-sky least-squares operator:

$$V_{Q,s,t}=\sum_p K_{s,t,p}^2
 \left(\frac{g_{a(p)}}{E_t q_p}\right)^2 V_{e,t,p},\qquad
V_{U,s,t}=\sum_p K_{s,t,p}^2 U_{t,p}^2.$$

Here $s$ labels a star, $t$ an exposure and $p$ a detector pixel; $K$ is the
dimensionless flux-extraction weight with the recorded profile fixed; $g$
is the header gain for readout output $a(p)$ in electrons/ADU; $E$ is retained
integration time in seconds; $q$ is the dimensionless public pixel flat;
$V_e$ is the integer upper-tie quantization variance in ADU squared; and $U$
is the archived uncertainty in electrons/second/pixel. Both propagated
variances are in squared electrons/second. The gain conversion is first-order;
it does not reimplement the full nonlinear CAL Jacobian.

The operator has unit response to its source profile and zero response to
each fitted sky basis. Flux replay differs by at most 3.67e-8 fraction;
archived direct-variance replay against the existing latest-generation noise
calculation differs by at most 6.47e-8. Unchanged masks and source identities
are checked. This is the direct fixed-profile contribution: learned-profile,
global response, WCS and reference-calibration covariance remain separate.

Across eligible stars, the per-star median ratio $V_Q/V_U$ has minimum,
median, 95th percentile and maximum 3.161%, 5.248%, 5.628% and 5.737%.
The largest individual source/exposure ratio is 5.742%. If this term were
entirely absent and independent, even that largest addition would increase
the direct RMS by only 2.83%. This is a sensitivity bound within the stated
operator, not permission to add a potentially duplicated variance or a claim
about the complete nonlinear estimator.

![Integer control and all-star projected variance ratio](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/requant_followup/rounding_and_projection.png)

![Actual quantization/archived pixel errors and extraction weights](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/requant_followup/projection_pixels.png)

## What remains unknown in the archived uncertainty

The pilot's median pixel quantization variance is 2.863% of archived variance;
the stellar operator puts more weight on brighter pixels, explaining its
larger projected fraction. The pilot TP error variance divided by 15 is
approximately 1.044 times the FFI error variance. This is only an arithmetic
comparison: shared calibration uncertainty cannot be averaged as independent
noise. The simple stationary trimmed-photon/readout budget is smaller than
the archived variance, with strong illumination dependence. It omits other
calibration terms and cannot establish that the archive is wrong.

The [DR73 reprocessing note](https://archive.stsci.edu/missions/tess/doc/tess_drn/tess_reprocessing-sector_14_26_drn73_v01.pdf)
states that propagation of static two-dimensional bias-model uncertainty was
removed from later processing. That confirms the importance of separating
static calibration uncertainty from independent temporal noise; it does not
specify a replacement FFI delivery or prove the exact variance terms in these
DR35 files. No authoritative TESS-specific source inspected here established
whether the archived uncertainties already include the measured requantization
term. Generic Kepler CAL documentation is not substituted for that evidence.

## Execution and conclusion

Frozen jobs `condor/requant_pixel_bridge/` and `condor/requant_followup/`
both exit 0 on plscience3, two CPUs each, with 2,000/3,000-MB memory hints
(not enforced locally). Inputs were already local. Their scripts, SHA256
manifests, execution metadata, arrays, CSVs and summaries are retained.
All four figures were inspected before publication. No forward-ePSF training
occurred, so no new training residual grid is implied.

**Conclusion:** this explains a previously unassigned raw-product mismatch
and constrains one possible missing noise contribution. It does not explain
the long stellar/group trends, clear shared calibration errors or establish
photon-noise dominance. Next prioritize the remaining spatial/background/
reference and PSF effects, while separating static calibration covariance
from independent noise. Do not repeat an unchanged ADC/coadd-rounding test
or inflate the uncertainty floor to make the light curves pass.
