resample_to_cube

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

Resample fibre spectra onto a 3D “data cube”, interpolating spatially over the hexagonal/triangular grid of the IFU. The alignment between wavelength planes is also corrected for estimated atmospheric dispersion as part of the process, using a model from SLALIB.

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. If None (default), the names of the DataFile instances returned will be constructed from those of the input files, prefixed with ‘d’ as in the Gemini IRAF package.

bitmask : int, optional

Data quality bits used to exclude bad pixels from the interpolation, where available in the input file (default 8, for cosmic rays). Where multiple data quality bits are summed to produce a bitmask that is not a power of two, any one or more of those bits in the data quality plane will cause the corresponding pixel to be excluded. A value of 0 causes all the input pixels to be used. Since this step interpolates only in the spatial directions, features of approximately constant wavelength, such as chip gaps (16) and bad columns (1) are better dealt with by spectral interpolation at an earlier reduction step.

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

Returns:

outimages : DataFileList

The 3D images produced by gfcube, each containing a 3D “data cube” with 0.1” pixels spatially and the flux units of the input converted to values per square arcsecond.