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_fitsstr

The fully reduced datacube Pampelmuse has been run on

Kwargs:
pathstr (optional, default: current directory)

I/O path

elementobj:list (optional)

list of elements the linemaps shall be produced

wavelengthlist (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_listlist

The list of specific linemaps to be used to mosaic

namestr

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:

rafloat

RA coordinates of the stars

decfloat

Dec coordinates of the stars

magfloat

magnitudes of the stars

filterstr

filter used for the magnitudes

Kwargs:

idxfloat (optional, defaultcounting up from 1)

catalog index of the stars

sat:obj`float` (optional, default: 0)

value assigned to saturated sources in the catalog

mag_satfloat (optional, default: None)

magnitude that replaces saturated sources in the catalog

pathstr (optional, default: current directory)

path of the output file

mag_limitfloat (optional, default: None)

the magnitude at which the output catalog should be truncated

regsizefloat (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, output_path=None, out_frame=None, in_frame=None, correct_flux=False, spec_folder='stars', spec_path=None, hst_filter=['ACS', 'F814W'], AB_zpt=None, Vega_zpt=None, correctiontype='shift', save_output=True, debug=False, spec_snr=5.0, dqs=[2, 4, 8])[source]
Args:
inputfitsstr

The fully reduced datacube, whose WCS has to be corrected

offset_inputstr

The prm file produced by Pampelmuse or the OFFSET_LIST.fits file from the exp_align routine

Kwargs:
pathstr (optional, Default: current directory)

I/O path

offset_pathstr (optional, default: current directory)

I/O path of prm file

output_filestr (optional, default: input file name +_cor)

outputfile name

output_pathstr (optional, default: current directory)

output path. If not provided the I/O folder is identical

output_framestr (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_framestr (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_fluxbool (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.

save_outputbool (optional, default: True)

If set False the corrected cube will not be saved. This can be used to just obtain the correction factors

spec_folderstr (optional, default: stars)

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_pathstr (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

hst_filter:obj:`list’ (optional, default: [‘ACS’, ‘F814W’])

The HST filter used when convolving the spectra to measure the fluxes. It is used with STSYNPHOT to obtain the correct zeropoint conversion.

AB_zptfloat (optional, default: None)

AB zeropoint for any filter that is not part of SYNPHOT. If provided the Vega_zpt must be provided as well. hst_filter will be overwritten

Vega_zptfloat (optional, default: None)

Vega zeropoint for any filter that is not part of SYNPHOT. If provided the AB_zpt must be provided as well. hst_filter will be overwritten

correctiontypestr (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.

debugbool (optional, default: False)

If set True tadditional information will be printed

spec_snrfloat (optional, default: 5.0)

the S/R limit when a spectra is used to calculate the flux correction. This limit might need to be lowered for low S/R obsverations

dqslist (optional, default: [2,4,8])

list of DQ flags where source as dicarted.

4.1. History

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

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

Added in version 0.2.0: cubes.wcs_cor() can now also be used with any zeropoints of any filter. This is especially important if we match to Gaia DR3 directly

Added in version 0.2.0: minor bugfixes