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
maskorivar == 0. GSPICE never readsfluxorivarthere, and never conditions on it, except in the pixelwise prediction, which uses its interpolated value. - block
-
A run of
widthconsecutive pixels that the block scan tests together, .gspice.Blocksholds 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 of Detection.
- χ²
-
One number that compares several observed values with their prediction: , with the residuals and 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 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 . - conditional distribution
-
The Gaussian distribution of the pixels of a spectrum, given the values of its conditioning pixels . 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.
infillreturns it inRepaired.flux. - conditional variance
-
The variance of the conditional distribution at one pixel: the uncertainty of its prediction, noise included.
pixelwiseandinfillreturn it invar, in flux². - conditioning pixels
-
The pixels whose values a prediction uses, : all pixels outside . The paper calls this set , and counts it.
- constant center
-
A constant , 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, : a number from −1 to 1.
- counting set
-
The pixels whose runs step 4 of
repaircounts: withcount_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 holds it for every pair of pixels, and its diagonal holds the variances.
- dilation
-
The widening of a set of flagged pixels to : plus every pixel within a given number of pixels of a pixel of 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
-
: the factor by which the error of an estimated mean and covariance widens the residuals of a held-out spectrum, (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
nguardof 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 that is not replaced: it is not conditioned on, and keeps its input value.
repairreports its ignored pixels as . - in-sample
-
Computed on the training spectra of the model, as the z-scores of the clipping passes of
fitare. - ivar
-
The inverse variance of the noise of each pixel, , in flux⁻². Every function takes it as the array
ivar, andivar == 0marks a bad pixel. - low-rank model
-
A model whose covariance is : components and a diagonal (
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, .
gspice.simulatereturns it astruth. - outlier
-
A pixel whose flux is many standard deviations from its prediction: a large .
- pattern
-
The pixel sets , and 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, . GSPICE computes the conditional distribution from its blocks and .
- prior
-
The distribution of the working vector, without conditioning pixels. A prediction whose holds all pixels returns it.
- replaced pixel
-
A pixel of the set , whose value an infill replaces by its conditional mean.
- S/N
-
The signal-to-noise ratio of a spectrum: the median of 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 . - 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 , the square root of the mean inverse variance of the good pixels of the spectrum. The noise of a spectrum with equal
ivarat 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 of a block over clean spectra of one S/N bin, from
gspice.fit_blocks(). For z-scores, a limit on , such asnsigma_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 that the model describes: the interpolated flux of spectrum 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, .
Symbols
Section titled “Symbols”The symbols follow the paper (Finkbeiner et al., 2025). A subscript set, as in , selects those rows and columns.
Pixel sets
Section titled “Pixel sets”| Symbol | Meaning |
|---|---|
| The pixels that a prediction does not condition on: predicted, ignored, guard and bad pixels | |
| The conditioning pixels, all pixels outside ; the paper’s | |
The replaced pixels; in calibration, the hidden pixels. and are those of steps 1 and 2 of repair | |
| The replaced pixels that are good in the input | |
The ignored pixels of repair; those of step 1 | |
The counting set of step 4 of repair | |
| A block of the block scan | |
| The guard window of one pixel | |
The mask of clipping pass of fit | |
| The pixels that pass flags | |
| The dilation of the set |
Vectors and matrices
Section titled “Vectors and matrices”| Symbol | Meaning |
|---|---|
| , , | The flux, the flux interpolated over bad pixels, and its prediction; is pixel of spectrum |
| The noise-free flux | |
| The working vector of spectrum ; is the matrix whose rows are the , and a prediction of | |
The working vector after the replacements of the block pass of repair | |
| The scaled spectrum | |
| The mean of S/N bin | |
| The mean of a noise-aware model, in flux units | |
| The covariance of the working vector; of bin , of spectrum of a noise-aware model | |
| The sample covariance, before a low-rank approximation | |
| The precision matrix | |
| , , | The components, their variances and the diagonal of a low-rank covariance |
| , | The covariance of the noise-free flux, and the same with its negative eigenvalues set to 0 |
| The noise variances of spectrum in a noise-aware model | |
| Residuals: values minus their conditional mean |
Numbers
Section titled “Numbers”| Symbol | Meaning |
|---|---|
The scale of spectrum : the square root of its mean ivar over good pixels, in flux⁻¹ | |
| A constant center, in flux units | |
| The number of training spectra of a model or bin | |
| The number of conditioning pixels | |
| The number of predicted pixels | |
The number of clean spectra of a bin in fit_blocks | |
| The rank of a low-rank model | |
The number of hidden pixels of calibration; also the index of a clipping pass, and the number of bins in snr_bins=n | |
| The percentile of the block thresholds | |
A quantile of Calibration.tail | |
The weight of spectrum in fit | |
| The finite-sample factor | |
| , | The z-score of one pixel, and the χ² of several pixels of a held-out spectrum |
| The block statistic of block | |
| , | The thresholds nsigma_replace and nsigma_ignore of repair |
| , , | The noise audit of pixel , its noise term and its prediction term |
| , | A condition number, and its bound for a low-rank covariance |
| The float64 machine epsilon, | |
| , | The indices of a spectrum and of an S/N bin |
| , | The indices of two pixels |
The index of a block, in the docstrings of Blocks and fit_blocks |