Kernel solution¶
KernelSolution
dataclass
¶
KernelSolution(
beta: float,
n_max: int,
radius: int,
knots: NDArray[float64],
theta: NDArray[float64],
n_components: int,
n_spatial: int,
lam: float,
gcv: float,
effective_dof: float,
rss: float,
component_sums: NDArray[float64],
direction: str,
shape: tuple[int, int],
reduced_chi2: float = float("nan"),
n_stamps_used: int = 0,
n_stamps_rejected: int = 0,
stamp_x: NDArray[int32] | None = None,
stamp_y: NDArray[int32] | None = None,
stamp_chi2: NDArray[float64] | None = None,
stamp_accepted: NDArray[uint8] | None = None,
)
A spatially-varying matching-kernel + differential-background solution.
Holds the Gauss-Hermite basis parameters, the thin-plate knots, the fitted
coefficient vector theta (ordered [c_0 | ... | c_{nc-1} | b]) and GCV
diagnostics. direction is which image was convolved ("reference" or
"science"); shape is the full-frame (height, width).
photometric_scale
¶
Per-pixel photometric scale field sum_n a_n(x,y) S_n, shape (H, W).
photometric_scale_at
¶
Photometric scale at (m, 2) pixel coordinates.
Source code in python/delta/solution.py
save
¶
Serialize to a .npz file. Optional per-stamp diagnostics are stored as empty arrays when absent.
Source code in python/delta/solution.py
load
classmethod
¶
load(path: str) -> KernelSolution
Load a solution saved with :meth:save.
Source code in python/delta/solution.py
header_cards
¶
Provenance key/value pairs for FITS headers (SPEC §8).