4. Cubes

cubes is a module that contains a collection of support functions for the analyses of data cubes, specifically MUSE data cubes.

Todo

A more detailed description will follow soon.

cubes.linemaps(input_fits, path=None, elements=None, wavelengths=None)[source]

This module is intended to create linemaps of specified lines/elements

Args:
input_fits : str
The fully reduced datacube Pampelmuse has been run on
Kwargs:
path : str (optional, default: current directory)
I/O path
element : obj:list (optional)
list of elements the linemaps shall be produced
wavelength : list (optional)
list of wavelength for givene elements, optional, must be given if elements is given
cubes.mosaics(input_list, name, path=None)[source]

This module is intended to create mosaics of specified lines/elements. linemaps should have been created beforehand using the linemaps module

Args:
input_list : list
The list of specific linemaps to be used to mosaic
name : str
Name of the created mosaic
Kwargs:
path: str (optional, default: current directory)
I/O path
cubes.pampelmuse_cat(ra, dec, mag, filter, idx=None, path=None, sat=0.0, mag_sat=None, ifs_sat=None, mag_limit=None, regsize=0.5)[source]

This modules uses input parameters to create a catalog that is compatible with pampelmuse

Args:

ra : float
RA coordinates of the stars
dec : float
Dec coordinates of the stars
mag : float
magnitudes of the stars
filter : str
filter used for the magnitudes

Kwargs:

idx : float (optional, default : counting up from 1)
catalog index of the stars
sat : :obj`float` (optional, default: 0)
value assigned to saturated sources in the catalog
mag_sat : float (optional, default: None)
magnitude that replaces saturated sources in the catalog
path : str (optional, default: current directory)
path of the output file
mag_limit : float (optional, default: None)
the magnitude at which the output catalog should be truncated
regsize : float (optional, default: :float:0.5)
the size of the regions in arcsec
cubes.wcs_cor(input_fits, offset_input, path=None, offset_path=None, output_file=None, out_frame=None, in_frame=None, correct_flux=False, spec_folder='stars', spec_path=None, correctiontype='shift')[source]
Args:
inputfits : str
The fully reduced datacube, whose WCS has to be corrected
offset_input : str
The prm file produced by Pampelmuse or the OFFSET_LIST.fits file from the exp_align routine
Kwargs:
path : str (optional, Default: current directory)
I/O path
offset_path : str (optional, default: current directory)
I/O path of prm file
output_file : str (optional, default: input file name +_cor)
outputfile name
output_frame : str (optional, default : input frame)
coordinate frame of the output cube in case one want to change. Is always set to default : input frame if corrections are not based on a .prm file
in_frame : str (optional, default: input frame)
coordinate frame of the output cube in case it cannot be determined from the header information or it has to be manually changed
correct_flux : bool (optional, default: False)
If set True the fluxes of the data cube will be corrected to match the input catalog to correct for calibration offsets. If the input file is a prm-file: This step is only recommended if the input fluxes can be trusted. CUBEFIT and GETSPECTRA have to executed again using the corrected data cube to correct the prm file and to extract the corrected spectra. If the input file is a ESO OFFSET-LIST.fits file: The fluxes will be scaled based on the ‘FLUX_SCALE’ entries.
spec_folder : str (optional, default: spectra)
The folder name, in which the the extracted stellar spectra are stored. This is only needed if correct_flux=:obj:True and the corrections are based on a .prm file
spec_path : str (optional, default: current directory)
I/O path of the spec_folder. This keyword is only need if the corrections are based on a .prm file
correctiontype : str (optional, default: shift)

the type of distortion correction

full: the full 2D CD matrix, only possible if based on a .prm file

shift: shift in XY only.

4.1. History

New in version 0.1.0: The functions cubes.wcs_cor(), cubes.pampelmuse_cat(), cubes.linemaps(), and cubes.mosaics() were added.

New in version 0.1.0: cubes.wcs_cor() also can be used with the OFFSET_LIST.fits file produced by ESORex