MaNGA Data Analysis Pipeline
The MaNGA data-analysis pipeline (MaNGA DAP) is the survey-led software package that analyzes the data produced by the MaNGA data-reduction pipeline (MaNGA DRP) to produce physical properties derived from the MaNGA spectroscopy. All survey-provided properties are currently derived from the log-linear binned datacubes (i.e., the LOGCUBE files).
For DR17, the DAP provides:
- Spatially stacked spectra
- Stellar kinematics (V and σ)
- Nebular emission-line properties: fluxes, equivalent widths, and kinematics (V and σ)
- Spectral Indices: absorption-line (e.g., Hδ) and color/bandhead (e.g., D4000) measurements
Example data provided by the DAP is illustrated in the Figure below (from the DR15 data release paper).
DAP: Usage and Development
The information provided here is a high-level description of the choices made for the specific approach and workflow used by the survey-level execution of the DAP software. However, the development strategy for the DAP has been to construct the low-level, core algorithms in a way that a user can change the way in which the code is executed either by simply changing an input file or by writing a new script around DAP functions/classes. This is meant to ease analysis of data in a way that is more optimal for a specific science case.
The DAP code is available via GitHub here . Users are encouraged to use the DAP software, not just its output. Developers are encouraged to fork, develop, and execute pull requests to the main repository as an ongoing community development effort. The DAP has been extensively documented using Sphinx, and the documentation is maintained here. This largely documents the detailed purpose, inputs, and outputs of each mangadap function and class; however, we continue to add usage examples on a best-effort basis.
See here for list of MaNGA techincal papers. For specific discussion regarding the DAP, please see Westfall et al. (2019, AJ, 158, 231), Belfiore et al. (2019, AJ, 158, 160), and Law et al. (2021, AJ, 161, 52).
The DAP requires four inputs:
- A configuration ("ini") file that defines which cube to analyze and provides input information necessary to run some of the DAP algorithms, such as an initial redshift guess pulled from the DRPall files.
- A SDSS parameter file that defines the number of analysis methods to apply to each cube by linking to files with the detailed parameters used for each method. This also defines the naming convention used for each output file, the
DAPTYPE. In DR15/DR16, the name was generated by combining the type of binning applied and the approach to the stellar-continuum fitting (e.g.,
HYB10for "hybrid" binning and
GAU-MILESHCfor a Gaussian LOSVD determined using the
MILESHCtemplate library). However, in DR17 the "DAPTYPE" is now the combination of the binning scheme (same as before), the templates used to determine the stellar kinematics (e.g.,
MILESHC), and the templates used to fit the stellar continuum during the emission-line fitting module (e.g.,
- The DRP LOGCUBE file must be in the default location expected by the environmental path definitions and be named
manga-[plate]-[ifudesign]-LOGCUBE.fits.gz. All of the analyses are performed on the spectra in the rectified data cube.
- Depending on the calculation of the covariance, the DRP LOGRSS file may be required for computing the covariance in a discrete set of wavelength channels. The file is expected to be in the default location and be named
manga-[plate]-[ifudesign]-LOGRSS.fits.gz. If the
LOGRSSfile is not available, the DAP will proceed but quietly warn the user that any covariance has not been accounted for!
For each analysis method selected in the plan file, the DAP will run through a sequence of analysis routines, where the approach to each analysis routine is contained within the single keyword used for each analysis block. The DAP technical papers ( here) describe these algorithms in detail. The following is a brief summary.
- DRP assessments: Much of the DAP analysis is limited to spectra with sufficient S/N and spectral coverage. This first step determines the S/N in each spectrum and the fraction of the spectrum with valid pixels. The current approach constructs the g-band weighted S/N and the covariance matrix at the flux-weighted center of the g-band to be used when binning the spectra. Any measurement flagged as
FORESTARby the DRP is ignored; any spectrum with more than 20% of its pixels flagged is not analyzed by the DAP. This step also calculates the on-sky Cartesian coordinates, based on the WCS coordinates provided by the DRP astrometry module, and elliptical coordinates relative to the galaxy center, based on the isophotal parameters pulled from the NASA-Sloan Atlas (
- Spatial binning: The binning algorithm both determines which spaxels fall in each bin and then stacks the spectra in each bin. The spectral stacking is currently a simple mean of the spectra in the bin; no velocity registration or weighting is applied. After stacking the spectra, each binned spectrum is corrected for Galactic extinction using the E(B-V) value provided in the header of the DRP
LOGCUBEfile, RV = 3.1, and the O'Donnell (1994, ApJ, 422, 158) extinction law. Internally, the DAP performs all spectral fitting on the binned spectra (termed as such even if a bin only contains a single spaxel) after they have been corrected for Galactic extinction. This means that, e.g., the output emission-line fluxes have been corrected for Galactic extinction; however, the models and binned spectra in the output model data cube file are reverted to their reddened values for direct comparison with the DRP
LOGCUBEfile. Currently, three binning types are provided by the DAP:
SPX: Fits to all individual spaxels with a g-band S/N of at least 1.
VOR10: Voronoi binning to a target S/N=10 based on the g-band S/N using python code written by Michele Cappellari; see here. All quantities are measured on the same binned spectra.
HYB10: The binning of the data is identical to the
VOR10case, and these binned spectra are used for the stellar kinematics. The bins are then deconstructed such that the emission-line and spectral-index measurements are performed on the individual spaxels.
- Stellar-continuum modeling: Once the spectra are binned, the DAP produces a model fit to the stellar continuum, primarily as a determination of the stellar kinematics using the pPXF fitting routine written by Michele Cappellari; see here. Currently, the DAP uses a stellar-template library constructed by hierarchically-clustering the MILES stellar library into a set of 42 composite spectra, termed the
MILESHClibrary to measure the stellar kinematics; only the first two moments (V and σ) are provided. The fit is performed with the templates and MaNGA data at their respective (and different) spectral resolutions, such that the velocity dispersions must be corrected for the resolution difference between the templates and the MaNGA data. These corrections and how to apply them are described in the data model; tutorials demonstrating how to apply the corrections are provided here. During the fit, all spectra are masked from 5570 to 5586 angstroms (observed wavelength in vacuum) to avoid typically strong residual sky noise from the prominent night-sky line. We also mask a 1500 km/s window centered on each nebular emission line fit in the next step, regardless of whether or not the line is detected with any significance. Only binned spectra with S/N > 1 are fit. The sum of all spectra for a given observation are first fit using all 42
MILESHCtemplates to isolate the subset of templates with non-zero weights; only those templates with non-zero weight in the "global" fit are then allowed to have non-zero weight in the fit to each binned spectrum.
- Emission-line Measurements: Once the stellar-continuum fit has been performed, the DAP performs two sets of emission-line measurements, one based on simple moments of the line profile and a second based on a Gaussian fit. For more details, see the relevant DAP ReadTheDocs page:
- Emission-line moments: We provide total flux and equivalent-width measurements based on a direct summation of the flux over a set of rest-wavelength passbands, after subtracting a best-fit continuum model and accounting for any continuum residuals found in sidebands to the blue and red of each emission line. The moments are measured twice, both before and after the emission-line modeling. The first estimate of the emission-line moments is performed based on the stellar-continuum fit with the emission lines masked. The emission-line modeling includes a re-optimization of the template mix with the stellar kinematics fixed, and the second measurement of the emission-line moments uses this re-optimized stellar continuum that is a more appropriate match to the Gaussian-modeling results. The first moment of the Hα line is used as the initial guess velocity for the Gaussian modeling, and the measured velocity from the Gaussian fit is used as the redshift for each spectrum when re-measuring the emission-line moments. The passbands used in DR17 are provided in Table 1.
- Gaussian emission-line modeling: The Gaussian emission-line modeling also uses the pPXF fitting routine written by Michele Cappellari; see here. Emission-line template spectra are constructed for lines or line doublets following the tying strategy for each ion as provided in Table 2. The velocities of all the lines are tied to be the same; i.e., there is only one velocity measurement for all emission lines (and one error on that velocity). The velocity dispersions of line doublets or unresolved lines are tied together, and the flux ratio of some line doublets are tied (see Table 2 for more detail. The stellar kinematics are fixed to the value determined by the stellar-continuum fit; however, the weights of the continuum templates are reoptimized for each binned spectrum. In the
HYBbinning scheme, the fits are done to each spaxel using the stellar kinematics determine for the parent spectral bin or the spatially closest bin for spaxels with S/N < 1. Similar to the stellar kinematics, the fitted velocity dispersions must be corrected for the instrumental resolution at the observed wavelength of the line; see the DAP data model.
- Spectral-index Measurements: Finally, spectral indices are measured after subtracting the best-fitting emission-line model from each spectrum. Measurements include both absorption-line (equivalent widths compared to two sidebands) and color/bandhead (the color of the spectrum based on two passbands) indices, as listed in Table 3. All the measurements are performed at the native MaNGA resolution. For each galaxy with a valid continuum model, determined during the emission-line modeling, the indices are also determined using the best-fitting model spectrum and the optimal template. The optimal template is at the native resolution of the templates and the best Doppler broadening due to the stars is not applied. The difference between the indices measured for the optimal template and the best-fitting continuum models provide a correction to the MaNGA measurements for the Doppler broadening and the difference in resolution between MaNGA and the templates. Tutorials demonstrating how to apply the corrections for each unit (angstrom or magnitude) are provided here.
The DAP output, described in detail here, is primarily contained in two files for each
PLATE-IFU observation. These files are constructed using the reference files (see here) that are produced by each analysis module. Usage examples for the two main output files are provided as part of the MaNGA Tutorials. The two files are:
- MAPS file: The
MAPSfile provides 2D "maps" (i.e., images) of DAP measured properties. The shape and WCS of these images identically matches that of a single wavelength channel in the corresponding DRP
- LOGCUBE-DAPTYPE file: The
LOGCUBE-DAPTYPEfiles provide the binned spectra and the best-fitting model for all spectra that were successfully fit; again the shape of the cube identically matches the DRP
The DAP also provides a summary table called the DAPall catalog (see here), which includes global properties extracted from the MaNGA data that can be used in, e.g., sample selection. Much of the information in this file is simply pulled from the headers of the output
LOGCUBE-DAPTYPE files. However, some quantities are produced uniquely for this file (see the DAP technical papers here).
* Passbands with no wavelength limits (e.g., OII) are used to set "placeholder channels" so that a direct index match can be maintained between the non-parametric (summed-flux) measurements and the Gaussian-fit results. See the description of the MaNGA DAP datamodel.
|MAPS Channel||Name||Rest λ||Tying*||Blueside||Redside|
* These columns indicate how emission-line parameters have been tied during the fit. The reference channel gives the anchoring line and the next three columns give the tying strategy. Tied flux values are set to a fixed relative fraction of the reference line, whereas velocities and velocity dispersions are forced to be identical to the reference line. For example, the reference channel for the [OIII]4960 line indicates it is tied to the [OIII]5008 line. The tying strategy forces [OIII]4960 to have 35% of the flux of [OIII]5008, the same velocity, and the same velocity dispersion. Note that the [OIII]5008 line is in turn forced to have the same velocity as the Hα line, meaning that all three lines (the [OIII] doublet and Hα) have the same velocity. Note that, because all the lines are forced to have the same velocity, the only line that does not have a reference channel is the Hα line. This does not place any special emphasis on the fit to the Hα line, it is just necessary for the construction of the list of free parameters.
* Defines the integrand used to constuct the index. Most indices use the flux per unit wavelength, Fλ; however, some use the flux per unit frequency, Fν.
** For the bandhead/color indices, the order sets how the index is constructed. E.g., the D4000 index is determined by taking the ratio of the mean flux in the blue and red passbands with the result for the red passband in the numerator.
Indices followed by CvD were defined by Conroy & van Dokkum (2012).