Stellar Kinematics

Analysis class: StellarContinuumModel


Reference file: see default_paths manga-[PLATE]-[IFUDESIGN]-[RDXQA]-[BINNING]-[CONTINUUM].fits.gz for MaNGA

Optional Parameters: see Analysis Plans. The table below lists the parameters defined by StellarContinuumModelDef









Keyword to distinguish the assessment method.


ndarray, list

A two-element vector with the starting and ending wavelength within which to calculate the signal-to-noise. Mutually exclusive with response_func_file




The name of a file that defines a response function to use for the S/N calculation. Must be a local file or distributed with the DAP source code. Expected to have two columns, with the wavelength and response efficiency. Mutually exclusive with waverange.




Boolean indicating that the wavelengths provided either using waverange or response_func_file are in vacuum (not air).




Provide the fiducial spatial covariance. If this is False, no spatial covariance will be available for calculations that use the results of the reduction assessments. If True and a covariance matrix is available directly from the datacube, it will be used. If True and the datacube does not already provide a computed covariance matrix, one is calculated using covariance_matrix() method. WARNING: If either of these fail, the DAP will issue a warning and continue assuming no spatial covariance.


int, float


Minimum fraction of unmasked pixels in a spectrum required for inclusion in the spatial covariance calculation. Note this should match the value used for the spatial-binning module.




If the output file already exists, redo all the calculations and overwrite it.

Important class dependencies:

  • StellarKinematicsFit: Provides the abstracted base class for stellar kinematics fits.

  • SpectralPixelMask: Used to mask the fitting regions for the fit.

  • TemplateLibrary: Generalized interface that provides the spectral-template library for use in spectral fitting.

  • PPXFFit: Provides the core pPXF wrapper.


  • Establish the fitting method, which includes setting up the SpectralPixelMask using the artifact_mask, emission_line_mask, and waverange from config.

    • The BADSKY artifact mask is read and used to build an ArtifactDB instance that masks the typical residuals around the strong sky line at 5577 angstroms.

    • The ELPFULL emission-line mask is read and used to build an EmissionLineDB instance that is used to mask the emission lines in the associated parameter file. Each mask is 1500 km/s centered on the line at the input guess redshift.

    • The waverange config parameter can be used to limit the fitted spectral range; will fit as much as possible if no range is provided.

  • Using the SpatiallyBinnedSpectra object, select all binned spectra with S/N greater than minimum_snr in config.

  • The DAP nominally provides the stellar-continuum fit with the velocity and velocity dispersion from The DAP Datacube Configuration File as its initial guess redshift and velocity dispersion.

  • Instantiate the TemplateLibrary objects as selected by the template_library config parameter.

    • If matching the spectral resolution to the galaxy data (match_resolution in config), the resolution is matched at the redshifted wavelengths of the galaxy data, adopting the input guess velocity as the redshift.

    • The template wavelength channel width is set to a fraction (1/velscale_ratio) of the galaxy data.

  • Execute the fit_method selected in config. Currently, this can only be ppxf.

  • In fit_SpatiallyBinnedSpectra():

    • Mask binned spectra, ignoring pixels masked as DONOTUSE, IGNORED, FLUXINVALID, or FORESTAR in DAP LOGCUBE file.

    • Call fit() with the data from the TemplateLibrary and SpatiallyBinnedSpectra objects.

      • If rejecting, the size of the boxcar (pixels) is set by reject_boxcar.

      • All filter_* config options are only used with fit_iter=fit_reject_filter. Do not use these options!

      • moments, degree, mdegree, and bias are passed directly to pPXF.

    • Given the template and object spectral range, determine the maximum viable fitting range for pPXF using fitting_mask().

    • Run through the specified iteration procedure, as selected by fit_iter in config; available options are set by iteration_modes().

    • Parse the pPXF results into the data table saved to the reference file.

      • Spectra without a fit are flagged as either NOFIT or FITFAILED.

      • Check if returned kinematics are near the imposed boundaries: \(v \pm 2000\) km/s from the input redshift and \({\rm d}v/100 < \sigma < 1000\) km/s, where \({\rm d}v\) is the size of the pixel (\(\sim 70\) km/s). Leads to The NEARBOUND flag in the MAPS file.

      • Flag pixels rejected by the sigma-clipping iteration.

    • Calculate the dispersion corrections:

      • First construct three spectra: (1) the optimized template; (2) the optimized template redshifted to the best-fitting velocity and with a velocity dispersion of 100 km/s; (3) the same as spectrum 2 but also convolved to the nominal object spectrum resolution.

      • Use pPXF to fit spectra 2 and 3 with spectrum 1.

      • The quadrature difference of the fitted dispersion returned for the fit to spectrum 3 and spectrum 2 is provided as the correction (STELLAR_SIGMACORR in the MAPS file)

    • Convert the pPXF velocities and velocity errors to \(cz\) velocities in km/s using convert_velocity().

  • Construct stellar-continuum BINID map. Bin IDs are the same as for the binned spectra except that any bin that does not meet the S/N limit are given a stellar-continuum bin ID of -1.