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 produced 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 DR15 (identical to DR16), 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 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 (although as yet incompletely) 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.
The technical paper describing the DAP can be found here.
The DAP requires four inputs:
- An SDSS parameter file, the "input parameter file", that defines which cube to analyze and provides input information necessary to run some of the DAP algorithms, such as an initial guess velocity pulled from the plateTargets files.
- A second SDSS parameter file, the "plan file", that defines the number of analysis methods to apply to each cube, and it sets the detailed parameter sets to use for each method. Currently, the products of each analysis method are placed in a directory named after the type of binning applied and the approach to the stellar-continuum fitting (e.g.,
HYB10for "hybrid" binning and
GAU-MILESHCfor a Guassian LOSVD determined using the
MILESHCtemplate library; see here).
- 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 paper, see here, describes 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 pixel flagged is not analyzed by the DAP. This step also calculates the on-sky Cartesian, 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 spaxel falls 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, two binning types are provided by the DAP:
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 kinamatics 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 analyzes the emission-lines by subtracting the best-fitting continuum model from the data. Any region beyond the spectral range of the fitted templates will still include an analysis of the emission lines in these regions; it will just include a nominal subtraction of the continuum and a flag in the output indicating this limitation of the measurement. 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:
- 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, accounting for any continuum 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 reoptimization of the template mix with the stellar kinematics fixed, and the second measurement of the emission-line moments uses this reoptimized 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 DR16 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 fitting "Mode" for each ion as provided in Table 2 (see the note for the Mode column). 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 the two lines in the [OII], [OIII], [OI], and [NII] doublets are all tied to each other, and the flux ratio of the [OIII], [OI], and [NII] doublets are fixed to 0.34, 0.33, and 0.33, respectively. The stellar kinematics are fixed to the value determined by the stellar-continuum fit; however, the weight of all 42 templates in the
MILESHClibrary are reoptimized for each binned spectrum. In the
HYBbinning scheme, the fits are done to each spaxel using the stellar kinematics determine for the spatially closest binned spectrum. 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 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 MILES resolution 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 MILES. 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 paper here).
|Index||Name||Rest λ||Medium||Flux Ratio||Mode*||Blueside||Redside|
* The fitting mode is constructed similarly to GANDALF (Sarzi et al. 2006, MNRAS, 366, 1151). The mode options are as follows:
f: Fit the line independently of all others in its own window.
vN: Fit the line with the velocity tied to the line with index
sN: Fit the line with the velocity dispersion tied to the line with index
kN: Fit the line with the velocity and velocity dispersion tied to the line with index
aN: Fit the line with the flux, velocity, and velocity dispersion tied to the line with index