DAP LOGCUBE File Construction¶
Analysis class: mangadap.dapfits.construct_cube_file
File Root: $MANGA_SPECTRO_ANALYSIS/$MANGADRP_VER/$MANGADAP_VER/[PLATE]/[IFUDESIGN]
File Template: manga-[PLATE]-[IFUDESIGN]-LOGCUBE-[DAPTYPE].fits.gz
- Important class dependencies:
Main full-spectrum modeling classes:
mangadap.util.fitsutil.DAPFitsUtil
: Contains many convience methods that, e.g., reconstruct a set of maps or datacubes based on input data sorted by bin ID and a map with the location of each bin ID.
- Algorithm:
- Check the input types
- Construct the 3D cubes for the binned spectra using
mangadap.proc.spatiallybinnedspectra.SpatiallyBinnedSpectra.construct_3d_hdu()
, for the stellar continuum models usingmangadap.proc.stellarcontinuummodel.StellarContinuumModel.construct_3d_hdu()
, and for the emission-line models usingmangadap.proc.emissionlinemodel.EmissionLineModel.construct_3d_hdu()
and the provided objects. - Initialize the primary header by copying over the DRP header and adding the DAP version information.
- Construct the FLUX, IVAR, MASK, WAVE, and REDCORR extensions using
the 3D binned spectra cube and
mangadap.dapfits.construct_cube_file.binned_data_cube()
. The reddening vector is used to ‘’remove’’ the reddening correction, such that the returned spectra match the observed flux in the DRP files. - Construct the MODEL, MODEL_MASK, EMLINE, STELLAR, and STELLAR_MASK
extensions using the model data and
mangadap.dapfits.construct_cube_file.model_cubes()
. - Combine the BINID extensions from the
mangadap.proc.spatiallybinnedspectra.SpatiallyBinnedSpectra
,mangadap.proc.stellarcontinuummodel.StellarContinuumModel
, andmangadap.proc.emissionlinemodel.EmissionLineModel
objects andmangadap.dapfits.combine_binid_extensions()
. This does ‘’not’’ include the emission-line moment and spectral-index bin IDs; those channels in the BINID extension are blank unlike theMAPS
file. - Finalize the DAP primary header, which primarily constructs the
MANGA_DAPQUAL bit using
mangadap.dapfits.finalize_dap_primary_header()
.