sysrem

tayph.sysrem(data, sigma, N, init=0, v=False, c_limit=0.001, a_limit=0.0001, return_steps=False)[source] [edit on github]

This runs Sysrem on a 2D frame of spectra; i.e. a time series of spectra or of a spectral order or of a cross-correlation function. These spectra need to be normalised before input; and need to be provided with an equivalent 2D array that describes the 1-sigma error on each spectral point.

Input:
data: A 2D array of spectral flux values. The x-dimension corresponds to the wavelength/velocity axis.

The y-dimension corresponds to time, orbital phase or simply the exposure number. This array must be normalised such that all columns have mean = 1.0 and all rows also have mean = 1.0.

sigma: A 2D array equivalent to data, carrying the 1-sigma errors (with normalisation propagated). N: int, the number of sysrem passes applied. init: list, dimension corresponding to the height (number of spectra in the time-series) of data.

This can be used to prime sysrem, e.g. assuming correlation with airmass. If set to 0, this is ignored and no time-correlation is assumed (default).

v: bool, verbose output to terminal. c_limit:float, the relative convergence limit on c. a_limit:float, the relative convergence limit on a.

Output: Depending on whether return_steps is set, the routine will either output the corrected data, or a list of all the correction steps. If N is set to zero, the data itself is automatically returned.

img: A 2D array corresponding to the input array data, with sysrem applied N times.

steps: list. A list of copies of data with length equal to N+1, from each of which is subtracted a subsequent sysrem pass. The last element in this

list contains the final output of sysrem.