subtract_sky

ndmapper.lib.gmos.spec.ifu.subtract_sky(*args, **kwargs)[source] [edit on github]

Create an average sky spectrum over rows corresponding to the background IFU field and subtract it from each fibre spectrum (image row). This is done separately for each half of the fields (IFU “slit”) in 2-slit mode, to match the CCD gaps, wavelength range, detector regions & slit characteristics optimally.

Parameters:

inputs : DataFileList or DataFile

Input images, containing extracted, row-stacked fibre spectra with linearized wavelength co-ordinates.

out_names : str-like or list of str-like, optional

Names of output images, containing the sky-subtracted spectra and the 1D sky spectrum used for each slit [currently only on disk until DataFile propagates “extras” properly]. If None (default), the names of the DataFile instances returned will be constructed from those of the input files, prefixed with ‘s’ as in the Gemini IRAF package.

See “help gfskysub” in IRAF for more detailed information.

Returns:

outimages : DataFileList

The sky-subtracted spectra produced by gfskysub.