Inputs¶
Helpers for coercing user inputs (NumPy arrays, astropy CCDData, FITS HDUs) into the
data/variance/mask layers the pipeline works with, and for synthesizing a variance map
from a detector noise model.
as_layers
¶
Coerce an image input to contiguous (data float32, variance, mask uint8).
Explicit variance / mask arguments override anything carried by the
object. A boolean mask is interpreted as True == bad (-> kMaskBad).
Source code in python/delta/_inputs.py
synth_variance
¶
Synthesize a per-pixel variance map from gain and read noise (SPEC §3.6).
In ADU, Var = max(data, 0) / gain + read_noise**2 (read_noise in ADU): the Poisson term from the source/sky plus the read-noise floor.