# Native RAW phase support and directional positive profiles

**2026-10-05 conclusion:** directional wing freedom improves held pixels in
two pairs but does not provide reliable source fluxes. One learned outer
lobe is driven predominantly by retained NGC 5985 light in a training stamp.
The larger basis can absorb scene contamination into the PSF. No photometry
or count-loss correction is adopted; a fixed-support training repair is
running separately. The full instrumental-systematics/photon-noise goal is unmet.

Run: `/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001`.
Worktree: `/home/kshukawa/syndiff_pipeline/dev/.worktrees/temporal-raw-epsf`,
branch `codex/temporal-raw-epsf`, `temporal_raw_epsf/pooled_positive_profile.py`.
Outputs: `results/pooled_positive_profile_wings/`. Code stays local.

The 144-component parent is preserved exactly. Add 160 positive Gaussian
components of width 0.5 TESS pixel, at integer offsets from −6 to +6 pixels
in each axis, excluding the central 3-by-3 offsets. Thus the new dictionary
has 304 components and allows directional structure in the wings. Components
are integrated over each detector pixel exactly, with unit whole-plane flux;
there is no truncation or stamp-dependent normalization. This is a nested
basis-capacity test, not an assertion of an accurate instantaneous PSF.

Use exactly the previous 64-star pools, kernel weights and source exclusion
rules at FFIs 1 and 601. All six target identities and any native training
stamp overlapping the target pair's 61-pixel region remain excluded. Keep
prior source eligibility, WCS, response-aware sky, fixed training weights,
and the parent's ridge scale (defined by its original 63 components).
Train source amplitudes and shared simplex-constrained profile coefficients
by the same alternating algorithm, from two starts: embedded parent and
the original broad start. Retain the original convergence tolerances/cap.

On targets, fit only two source amplitudes and four positive background
corner levels using one pixel half, then predict the other. Repeat both
halves. The parent profile arm is recomputed and must reproduce its saved
held-pixel predictions before comparing the new arm. No target time trend
or desired light-curve flatness selects the correction.

```bash
/home/kshukawa/syndiff_pipeline/syndiff_pipeline/common/orchestration/condor_wrapper.sh python temporal_raw_epsf/launch_diagnostics.py --local --job pooled_positive_profile_wings --cpus 2 --memory 6000 pooled_positive_profile.py --refine-core --expand-wings --pool-sizes 64 --save
```

The launcher freezes code and records host/PID/exit status. Local memory
hints are not enforced; the host's available memory and load were checked.
Separately inventory the actual two-epoch subpixel phase coverage and show
the normalized RAW training stamps in phase bins. Those bins diagnose
coverage, not effective resolution or independent sampling of identical PSFs.
The known colour/spatial extrapolation and other-star contamination remain
explicit limitations. Generate canonical residual grids after the fit.

## Model and completed comparison

The normalized training image is fitted as

$$D_{s,p}/F_s^0=a_s P_{s,p}(\mathbf c)+Q_{s,p}
\sum_{\ell=0}^{2}b_{s,\ell}B_\ell(p).$$

Here $s$ is a training source and $p$ a native detector pixel; $D$ is measured
calibrated rate in electrons/second/pixel; $F_s^0$ is its historical positive
reference rate in electrons/second; $a_s$ is a free dimensionless source
amplitude; $P$ is the pixel-integrated Gaussian-mixture flux fraction with
nonnegative coefficients $\mathbf c$ summing to one; $Q$ is the inherited
dimensionless background-response image; $B_\ell$ are the constant and two
normalized stamp-coordinate plane terms; and $b_{s,\ell}$ are fitted sky
coefficients in the normalized-image convention. Profiles are shared within
each fixed target-specific pool; individual amplitudes and sky terms are free.
The training objective uses the inherited normalized radial shape weights,
not the archived photon likelihood. The small coefficient ridge is unchanged
from the parent prescription. All held target scores below use archived
pixel uncertainty on identical support.

All 12 profiles and both starts meet the unchanged stopping criteria. The
largest coefficient difference between starts is 0.0202, so coefficient
uniqueness is not established by convergence. Parent target predictions
replay within the declared numerical tolerance. Five focused tests pass,
including nested dictionary identity and whole-plane positivity/normalization.

| Pair, auxiliary indices | Parent native RMS | Directional-wing native RMS |
|---|---:|---:|
| 134 / 138 | 122.61 | 125.95 |
| 359 / 358 | 94.21 | 69.18 |
| 191 / 190 | 115.33 | 67.14 |

Each entry is the median of four held-pixel scores (two epochs, two halves),
in units of archived pixel uncertainty. The overall median changes
108.18→72.54. These are large remaining image discrepancies, not pure-Poisson
significances. Pair 134/138 worsens. Every original target is retained.

![Pair 134/138 actual pixels and residuals](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/pooled_pixels_pair0.png)
![Pair 359/358 actual pixels and residuals](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/pooled_pixels_pair1.png)
![Pair 191/190 actual pixels and residuals](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/pooled_pixels_pair2.png)
![Saved selected-start convergence histories](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/convergence/training_histories.png)

## Source-rate consistency still fails

Refit the target source amplitudes and sky on each disjoint pixel half with
the profile fixed. The resulting model predictions reproduce the saved
held-pixel predictions. Define the same-exposure discrepancy as

$$d=200\frac{F_1-F_0}{F_1+F_0}.$$

Here $F_h$ is the fitted source rate in electrons/second from half $h$ of
one measured exposure; $d$ is percent of their mean. Neither half is truth;
this is not a time-variability measurement or a propagated noise interval.

| Source | Parent $d$, FFI1 / FFI601 [%] | New $d$, FFI1 / FFI601 [%] |
|---|---:|---:|
| 134 | −3.33 / −3.20 | −2.61 / −2.42 |
| 138 | +4.01 / +3.83 | +3.51 / +3.54 |
| 359 | −11.42 / −11.06 | −7.97 / −7.39 |
| 358 | +8.22 / +7.69 | +13.61 / +13.05 |
| 191 | −1.04 / −0.76 | −1.58 / −1.37 |
| 190 | +1.91 / +1.74 | +2.68 / +2.46 |

Lower pixel RMS does not imply a better source-rate estimate. In particular,
source 358's discrepancy worsens even as its pair's aggregate pixel score
improves. No arm is selected by apparent light-curve flatness.

![All source rates and same-exposure discrepancies](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/half_consistency.png)

The subpixel profile images show directional shoulders and isolated outer
lobes. These are fitted coadded templates, not a validated instantaneous
optical PSF. Their positive whole-plane normalization does not establish
correct wing light or signal preservation.

![Profiles for 134](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/profile_134.png)
![Profiles for 138](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/profile_138.png)
![Profiles for 359](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/profile_359.png)
![Profiles for 358](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/profile_358.png)
![Profiles for 191](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/profile_191.png)
![Profiles for 190](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/assessment/profile_190.png)

## Which training pixels support the new components?

For target profiles 134 and 358, first remove the largest added Gaussian
component, transferring its coefficient to the strongest eligible core
component. Then refit only each training source's amplitude and sky.
The conditional preference for the removed component is the weighted
increase of squared pixel residuals. Sum positive preferences separately
from negative ones; the fractions below use the positive sum as denominator.
The complete nominal training objective replays to floating-point precision.
This is training attribution, not an independent significance or a reason
to reject a source automatically.

The largest added components are inner shoulders at (−2,0) and (0,+2)
pixels. Their strongest single contributors supply roughly 5% and 8% of
positive preference. They are not controlled by a single training stamp.
The separate outer-region audit restricts component centres to radius at
least four pixels before selecting the largest weight.

For profile 134, the outer component at (−6,−6) pixels is different:
auxiliary source 74 supplies **87.97% / 88.27%** of positive preference
at FFIs 1/601. Its kernel weight is only 1.56%. For profile 358's selected
outer component at (−4,−1), the strongest contributor supplies only
6.56% / 6.37%. The isolated dominant case must not be generalized to every wing.

![134 inner shoulder, FFI1](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/influence/contributors_134_1.png)
![134 inner shoulder, FFI601](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/influence/contributors_134_601.png)
![358 inner shoulder, FFI1](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/influence/contributors_358_1.png)
![358 inner shoulder, FFI601](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/influence/contributors_358_601.png)
![134 outer lobe, FFI1](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/outer_influence/contributors_134_1.png)
![134 outer lobe, FFI601](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/outer_influence/contributors_134_601.png)
![358 outer component, FFI1](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/outer_influence/contributors_358_1.png)
![358 outer component, FFI601](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/outer_influence/contributors_358_601.png)

## The dominant stamp contains retained galaxy light

The actual larger RAW cutout identifies the feature beside source 74 as
NGC 5985 light, with NGC 5982 on the other side. Independent positions from
the [NASA/IPAC NED05D table](https://w0.ned.ipac.caltech.edu/level5/NED05D/ned05D_5.html)
project onto both extended objects. The live NED API timed out; the saved
identification record explicitly cites the table transcription instead.
This is association at TESS image resolution, not new precise astrometry.

The historical point-source core masks replay: none of the retained pixels
lies inside a selected catalogue neighbour's radius-2.5 core. The problem is
extended scene light outside those point-source masks, not a demonstrated
self-ID or mask-origin bug. Direct S24 and S25 FFI reads match the cached
stamps exactly. The same detector region sees different sky in S25 and does
not show the same feature there. That comparison does not certify calibration.

![Independent galaxy positions on actual RAW images](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/lobe_trace/galaxy_identification.png)
![Larger S24/S25 detector context](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/lobe_trace/detector_context.png)
![Actual point-source masks and retained light](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/lobe_trace/native_mask_context.png)

## Canonical grids and reproducibility

The two required absolute/relative grid pairs were generated and inspected.
They contain six unique sources, five within canonical bins; no bin reaches
the unchanged minimum of five. Blank grids show insufficient population,
not zero residual. They were added to the existing shared portal gallery,
preserving earlier labels. The unavailable external Claude Artifact mirror
was not republished.

![Parent canonical grid](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/residual_grids/parent/resgrid_raw_pooled_positive_profile_wings_parent_20261005.png)
![Parent relative grid](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/residual_grids/parent/resgrid_raw_pooled_positive_profile_wings_parent_20261005_rel.png)
![Directional-wing canonical grid](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/residual_grids/pool64/resgrid_raw_pooled_positive_profile_wings_pool64_20261005.png)
![Directional-wing relative grid](/astro/armin/koji/syndiff/dev_runs/temporal_raw_epsf_20261001/results/pooled_positive_profile_wings/residual_grids/pool64/resgrid_raw_pooled_positive_profile_wings_pool64_20261005_rel.png)

All completed local jobs exit 0: `pooled_positive_profile_wings`,
`pooled_wings_assessment`, `pooled_wings_grids`, `pooled_wings_convergence`,
`pooled_wing_influence`, `pooled_outer_wing_influence`, `training_lobe_trace`
and `training_lobe_identification`. Exact commands, frozen source/hashes and
execution records are under `condor/`. The fit took approximately 32 minutes.
All supporting figures are inspected before reporting. Local memory hints
are not enforced. No production data or full-cadence science product changes.

The native phase inventory is separately recorded in
`NATIVE_PHASE_SUPPORT_20261005.md`. A controlled galaxy-footprint intervention
is in `GALAXY_TRAINING_CONTROL_20261005.md`: it changes training pixels only,
with every source identity, primary core and held evaluation pixel retained.
Its outcome must be validated before adoption. Beyond that local repair,
colour/spatial/brightness transfer, extended-scene modeling, readout-response
validation, WCS/calibration uncertainty and the complete light curves remain.

**Conclusion:** a larger positive basis reduces some image error but can
learn extended galaxy light as a stellar PSF feature. The identified
contamination motivates a concrete controlled repair; it does not establish
photon-noise-dominated or systematics-free stellar light curves.
