DAP LOGCUBE File Construction
Analysis class: construct_cube_file
File Root: see method_path;
$MANGA_SPECTRO_ANALYSIS/$MANGADRP_VER/$MANGADAP_VER/[METHOD]/[PLATE]/[IFUDESIGN] for MaNGA
File Template: see default_paths;
manga-[PLATE]-[IFUDESIGN]-LOGCUBE-[METHOD].fits.gz for MaNGA
Important class dependencies:
Main full-spectrum modeling classes:
DAPFitsUtil: Contains many convenience 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,LSF,WAVE, andREDCORRextensions using the 3D binned spectra cube andbinned_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, andSTELLAR_MASKextensions using the model data andmodel_cubes().Combine the
BINIDextensions from theSpatiallyBinnedSpectra,StellarContinuumModel, andEmissionLineModelobjects andcombine_binid_extensions(). This does not include the emission-line moment and spectral-index bin IDs; those channels in theBINIDextension are blank unlike theMAPSfile.Finalize the DAP primary header, which primarily constructs the MANGA_DAPQUAL bit using
finalize_dap_primary_header().