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
- input_fits
- Kwargs:
- 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
linemapsmodule
- 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:
Kwargs:
- idx
float(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_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
- idx
- 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:
- 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_path
str(optional, default: current directory) output path. If not provided the I/O folder is identical
- 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
Truethe 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_output
bool(optional, default:True) If set
Falsethe corrected cube will not be saved. This can be used to just obtain the correction factors- spec_folder
str(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_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- 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_zpt
float(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_zpt
float(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
- correctiontype
str(optional, default:shift) the type of distortion correction
full: the full 2D CD matrix, only possible if based on a .prm fileshift: shift in XY only.- debug
bool(optional, default:False) If set
Truetadditional information will be printed- spec_snr
float(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
- dqs
list(optional, default: [2,4,8]) list of DQ flags where source as dicarted.
- path
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