Skip to content
GSPICE

Concepts

Glossary

Each entry below defines a term used in the GSPICE documentation and maps it to its mathematical symbol or code identifier. Symbols lists every symbol of the pages.

artifact

A corruption of the data, such as a cosmic ray, a bad column or a shifted segment. gspice.repair() finds artifacts that no mask marks.

bad pixel

A pixel that the input marks: a nonzero mask or ivar == 0. GSPICE never reads flux or ivar there, and never conditions on it, except in the pixelwise prediction, which uses its interpolated value.

block

A run of width consecutive pixels that the block scan tests together, AA. gspice.Blocks holds the first pixel of each block and their thresholds.

block scan

The comparison of each block of a spectrum with its prediction from the pixels beyond its guard window, by the statistic χA2\chi^2_A of Detection.

χ²

One number that compares several observed values with their prediction: rTC−1rr^\mathsf{T} C^{-1} r, with rr the residuals and CC their conditional covariance. It counts correlated errors once. Its number of degrees of freedom is the number of values, Repaired.dof (Prediction).

clean spectrum

A spectrum without an artifact. gspice.fit_blocks() sets its thresholds from clean spectra.

clipping ceiling

The value that the in-sample ∣z∣|z| of an outlier of any amplitude approaches in a clipping pass, in a spectrum of typical leverage. A pass whose threshold exceeds it flags few pixels, or none (Fitting).

clipping pass

One round of fit. It fits a covariance, computes the in-sample z-score of every training pixel, and flags the pixels above a threshold, nsigma[n - 1] for pass nn.

conditional distribution

The Gaussian distribution of the pixels GG of a spectrum, given the values of its conditioning pixels OO. Its mean is the prediction, and its covariance the uncertainty of the prediction.

conditional mean

The mean of the conditional distribution: the average of all spectra in the model that agree with the conditioning pixels. It is the prediction, and it is smoother than any one spectrum. infill returns it in Repaired.flux.

conditional variance

The variance of the conditional distribution at one pixel: the uncertainty of its prediction, noise included. pixelwise and infill return it in var, in flux².

conditioning pixels

The pixels whose values a prediction uses, OO: all pixels outside GG. The paper calls this set kk, and NkN_k counts it.

constant center

A constant cc, in flux units, that a model subtracts from the flux instead of the mean of the training spectra (fit(center=c)).

correlation

The covariance of two pixels divided by the square root of the product of their variances, Cii′/CiiCi′i′C_{ii'} / \sqrt{C_{ii} C_{i'i'}}: a number from −1 to 1.

counting set

The pixels RR whose runs step 4 of repair counts: M∪IM \cup I with count_on="all" (Detection).

covariance

How the fluxes of two pixels vary together across the spectra. It is positive if they tend to rise together, and negative if one tends to rise as the other falls. The covariance matrix CC holds it for every pair of pixels, and its diagonal holds the variances.

dilation

The widening of a set of flagged pixels FF to dil(F)\mathrm{dil}(F): FF plus every pixel within a given number of pixels of a pixel of FF along the spectrum.

draw

A random sample of the replaced pixels from their conditional distribution, in Repaired.draws. It scatters like an observed spectrum, unlike the conditional mean.

finite-sample factor

fsf_s: the factor by which the error of an estimated mean and covariance widens the residuals of a held-out spectrum, E[Z2]/N∗E[Z^2] / N_* (Held-out uncertainty).

flagged pixel

A pixel that gspice.repair() detects as an artifact. It becomes a replaced or an ignored pixel.

guard window

The pixels within nguard of a predicted pixel or block. A prediction does not condition on them, and reports only the predicted pixels among them.

held-out spectrum

A spectrum that the model was not fitted to.

ignored pixel

A pixel in GG that is not replaced: it is not conditioned on, and keeps its input value. repair reports its ignored pixels as II.

in-sample

Computed on the training spectra of the model, as the z-scores of the clipping passes of fit are.

ivar

The inverse variance of the noise of each pixel, 1/σ21/\sigma^2, in flux⁻². Every function takes it as the array ivar, and ivar == 0 marks a bad pixel.

low-rank model

A model whose covariance is VΛVT+DV \Lambda V^\mathsf{T} + D: KK components and a diagonal DD (fit(rank=K), gspice.LowRank).

marginalize

To leave pixels out of a prediction without conditioning on them. Their values do not enter, and the covariance of the reported pixels includes their uncertainty.

multivariate Gaussian

A Gaussian distribution of several variables at once, here the fluxes of all pixels. A mean vector and a covariance matrix define it.

noise-aware model

A model of the noise-free flux, in flux units, whose prediction adds the noise of each spectrum from its ivar (fit(noise=True)). Its opposite is a scaled model.

noise-free flux

The flux that a spectrum would have without noise, tt. gspice.simulate returns it as truth.

outlier

A pixel whose flux is many standard deviations from its prediction: a large ∣z∣|z|.

pattern

The pixel sets GG, MM and TT of an infill. Spectra of one S/N bin with one pattern share one factorization within each chunk of spectra.

precision matrix

The inverse of the covariance, P=C−1P = C^{-1}. GSPICE computes the conditional distribution from its blocks PGGP_{GG} and PGOP_{GO}.

prior

The distribution N(0,C)\mathcal{N}(0, C) of the working vector, without conditioning pixels. A prediction whose GG holds all pixels returns it.

replaced pixel

A pixel of the set MM, whose value an infill replaces by its conditional mean.

S/N

The signal-to-noise ratio of a spectrum: the median of fivarf \sqrt{\mathrm{ivar}} over its good pixels (gspice.snr()).

S/N bin

A range of S/N with its own mean and covariance (fit(snr_bins=...)), with the index bb.

scaled model

A model in scaled units, whose one covariance holds both the variation between spectra and the noise. Every model is a scaled model except a noise-aware model.

scaled units

Flux multiplied by asa_s, the square root of the mean inverse variance of the good pixels of the spectrum. The noise of a spectrum with equal ivar at every pixel then has the variance 1.

shifted segment

An artifact in which a run of pixels has a shifted wavelength scale, so that its lines are recorded a few pixels off.

threshold

For the block scan, the percentile of χA2\chi^2_A of a block over clean spectra of one S/N bin, from gspice.fit_blocks(). For z-scores, a limit on ∣z∣|z|, such as nsigma_replace.

training spectra

The spectra that gspice.fit() estimates the model from.

working units

The units of the working vector: scaled units, or flux units for a noise-aware model.

working vector

The vector xsx_s that the model describes: the interpolated flux of spectrum ss in working units. The mean of its S/N bin, or a constant center, is subtracted from it.

z-score

The difference between the flux of a pixel and its prediction, divided by the square root of the conditional variance, zz.

The symbols follow the paper (Finkbeiner et al., 2025). A subscript set, as in CGOC_{GO}, selects those rows and columns.

SymbolMeaning
GGThe pixels that a prediction does not condition on: predicted, ignored, guard and bad pixels
OOThe conditioning pixels, all pixels outside GG; the paper’s kk
MMThe replaced pixels; in calibration, the hidden pixels. M1M_1 and MblkM_{\mathrm{blk}} are those of steps 1 and 2 of repair
TTThe replaced pixels that are good in the input
IIThe ignored pixels of repair; I1I_1 those of step 1
RRThe counting set of step 4 of repair
AAA block of the block scan
ggThe guard window of one pixel
BnB_nThe mask of clipping pass nn of fit
FnF_nThe pixels that pass nn flags
dil(F)\mathrm{dil}(F)The dilation of the set FF
SymbolMeaning
ff, f~\tilde f, f^\hat fThe flux, the flux interpolated over bad pixels, and its prediction; fsif_{si} is pixel ii of spectrum ss
ttThe noise-free flux
xsx_sThe working vector of spectrum ss; XX is the matrix whose rows are the xsx_s, and x^\hat x a prediction of xx
xblkx_{\mathrm{blk}}The working vector after the replacements of the block pass of repair
ysy_sThe scaled spectrum asf~sa_s \tilde f_s
mbm_bThe mean of S/N bin bb
μ\muThe mean of a noise-aware model, in flux units
CCThe covariance of the working vector; CbC_b of bin bb, CsC_s of spectrum ss of a noise-aware model
SSThe sample covariance, before a low-rank approximation
PPThe precision matrix C−1C^{-1}
VV, Λ\Lambda, DDThe components, their variances and the diagonal of a low-rank covariance
Σ\Sigma, Σ+\Sigma_+The covariance of the noise-free flux, and the same with its negative eigenvalues set to 0
νs\nu_sThe noise variances of spectrum ss in a noise-aware model
rrResiduals: values minus their conditional mean
SymbolMeaning
asa_sThe scale of spectrum ss: the square root of its mean ivar over good pixels, in flux⁻¹
ccA constant center, in flux units
NsN_sThe number of training spectra of a model or bin
NkN_kThe number of conditioning pixels
N∗N_*The number of predicted pixels
NcN_cThe number of clean spectra of a bin in fit_blocks
KKThe rank of a low-rank model
nnThe number of hidden pixels of calibration; also the index of a clipping pass, and the number of bins in snr_bins=n
ppThe percentile of the block thresholds
qqA quantile of Calibration.tail
wsw_sThe weight of spectrum ss in fit
fsf_sThe finite-sample factor
zz, Z2Z^2The z-score of one pixel, and the χ² of several pixels of a held-out spectrum
χA2\chi^2_AThe block statistic of block AA
τr\tau_r, τi\tau_iThe thresholds nsigma_replace and nsigma_ignore of repair
ρi\rho_i, ηi\eta_i, eie_iThe noise audit of pixel ii, its noise term and its prediction term
κ\kappa, κW\kappa_WA condition number, and its bound for a low-rank covariance
ϵ\epsilonThe float64 machine epsilon, 2.2×10−162.2 \times 10^{-16}
ss, bbThe indices of a spectrum and of an S/N bin
ii, i′i'The indices of two pixels
jjThe index of a block, in the docstrings of Blocks and fit_blocks