DAP MAPS File Construction
Analysis class: construct_maps_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]-MAPS-[METHOD].fits.gz for MaNGA
Important class dependencies:
All of the main DAP 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
Initialize the primary header by copying over the DRP header and adding the DAP version information.
Construct the
SPX_SKYCOO,SPX_ELLCOO,SPX_MFLUX,SPX_MFLUX_IVAR, andSPX_SNRmaps from theReductionAssessmentobject usingreduction_assessment_maps().Combine the
BINIDextensions from theSpatiallyBinnedSpectra,StellarContinuumModel,EmissionLineMoments,EmissionLineModel, andSpectralIndicesobjects usingcombine_binid_extensions().Construct the
BIN_LWSKYCOO,BIN_LWELLCOO,BIN_AREA,BIN_FAREA,BIN_MFLUX,BIN_MFLUX_IVAR,BIN_MFLUX_MASK, andBIN_SNRextensions from theSpatiallyBinnedSpectraobject usingbinned_spectra_maps().Construct the
STELLAR_VEL,STELLAR_VEL_IVAR,STELLAR_VEL_MASK,STELLAR_SIGMA,STELLAR_SIGMA_IVAR,STELLAR_SIGMA_MASK,STELLAR_SIGMACORR, andSTELLAR_FOMextensions using theStellarContinuumModelobject usingstellar_continuum_maps().Construct the
EMLINE_SFLUX,EMLINE_SFLUX_IVAR,EMLINE_SFLUX_MASK,EMLINE_SEW,EMLINE_SEW_CNT,EMLINE_SEW_IVAR, andEMLINE_SEW_MASKextensions using theEmissionLineMomentsobject usingemission_line_moment_maps().Construct the
EMLINE_GFLUX,EMLINE_GFLUX_IVAR,EMLINE_GFLUX_MASK,EMLINE_GEW,EMLINE_GEW_CNT,EMLINE_GEW_IVAR, ``EMLINE_GEW_MASK,EMLINE_GVEL,EMLINE_GVEL_IVAR,EMLINE_GVEL_MASK,EMLINE_GSIGMA,EMLINE_GSIGMA_IVAR,EMLINE_GSIGMA_MASK,EMLINE_INSTSIGMA,EMLINE_TPLSIGMA,EMLINE_GA,EMLINE_GANR,EMLINE_FOM, andEMLINE_LFOMusing theEmissionLineModelobject usingemission_line_model_maps().Construct the
SPECINDEX,SPECINDEX_IVAR,SPECINDEX_MASK,SPECINDEX_CORR,SPECINDEX_MODELSPECINDEX_BF,SPECINDEX_BF_IVAR,SPECINDEX_BF_MASK,SPECINDEX_BF_CORR,SPECINDEX_BF_MODELSPECINDEX_WGT,SPECINDEX_WGT_IVAR,SPECINDEX_WGT_MASK,SPECINDEX_WGT_CORR,SPECINDEX_WGT_MODELextensions using theSpectralIndicesobject usingspectral_index_maps().Compute the griz S/N metrics to include in the header and which then get propagated to the DAPall file using
add_snr_metrics_to_header().Finalize the DAP primary header, which primarily constructs the MANGA_DAPQUAL bit using
finalize_dap_primary_header().Flag any map data that is not already flagged and does not have a positive inverse variance with both the
MATHERRORandDONOTUSEbits.