cirrus¶
- sofia_redux.instruments.exes.cirrus.cirrus(data, header, abeams, bbeams, flat)[source]¶
Correct nod-off-slit data for residual sky noise.
Remove sky noise by subtracting (a + by) * B + (c + dy) / flat from A, where B is the sky nod array, A is the source array, and a, b, c, d are chosen to minimize the sum of (A - B)^2.
Note that sky noise depends on y because clouds can vary during an array readout.
This algorithm removes the average continuum along the slit. If this is not desired, background subtraction should be done during spectral extraction instead.
- Parameters:
- datanumpy.ndarray
Data cube of shape (nframe, nspec, nspat) or image (nspec, nspat).
- headerfits.Header
Header associated with the input data.
- abeams
list
of int List of frame indices corresponding to A frames in the data cube.
- bbeams
list
of int List of frame indices corresponding to B frames in the data cube.
- flatnumpy.ndarray
Flat image of shape (nspec, nspat).
- Returns:
- datanumpy.ndarray
The corrected data.