Spatial Binning
Analysis class: SpatiallyBinnedSpectra
Reference root: see common_path;
$MANGA_SPECTRO_ANALYSIS/$MANGADRP_VER/$MANGADAP_VER/common/[PLATE]/[IFUDESIGN] for MaNGA
Reference file: see default_paths;
manga-[PLATE]-[IFUDESIGN]-[RDXQA]-[BINNING].fits.gz for MaNGA
Optional Parameters: see Analysis Plans. The table below lists the parameters
defined by SpatiallyBinnedSpectraDef
Key |
Type |
Options |
Default |
Description |
|---|---|---|---|---|
|
str |
|
Keyword used to distinguish between different spatial binning schemes. |
|
|
str |
|
The string identifier for the Galactic extinction curve to use. See |
|
|
int, float |
3.1 |
Ratio of V-band extinction to the B-V reddening. |
|
|
int, float |
1.0 |
Minimum S/N of spectra to include in any bin. |
|
|
int, float |
0.8 |
Minimum fraction of unmasked pixels in each spectrum included in any bin. |
|
|
ParSet, dict |
The spatial-binning parameters. |
||
|
Undefined |
Instance of the spatial-binning class. Needed in case binfunc is a non-static member function of the class. |
||
|
Undefined |
The spatial-binning function that determines which spectra go into each bin. |
||
|
ParSet, dict |
The spectral-stacking parameter set. |
||
|
Undefined |
Instance of spectral-stacking class to use. Needed in case stackfunc is a non-static member function of the class. |
||
|
Undefined |
The spectral-stacking function that stacks the spectra in a given bin. |
||
|
bool |
False |
If the output file already exists, redo all the calculations and overwrite it. |
Important class dependencies:
GalacticExtinction: Provides the Galactic extinction curves the can be selected and applied to the data.
mangadap.proc.spatialbinning: Provides the classes that perform the binning (e.g.,VoronoiBinning).
SpectralStack: Provides the core functions that perform the spectral stacking
Algorithm:
Ignore any pixels that are either masked by the boolean mask or flagged with the flags returned by
do_not_use_flags().Calculate the Galactic extinction (
REDCORRin the DAPLOGCUBEfile)Using
ReductionAssessmentobject, find spaxels with >0.8 fractional spectral coverage and above theminimum_snrin the configuration file. Only those spaxels satisfying both criteria are included in any bin.Determine which spaxels to put in each bin following the
methodspecified in the config file:
none(SPXbinning type): No binning performed. Every selected spaxels given a unique bin ID.
global(ALLbinning type): Bin all valid spaxels into a single spectrum.
radial(e.g.,NREbinning type): Use the elliptical coordinates from theReductionAssessmentobject to assign each spaxel to a unique radial bin. The binning annuli are defined using thecenter,pa,ell,radius_scale,radii, andlog_stepconfig values; see$MANGADAP_DIR/mangadap/config/spatial_binning/nre.inifor theNREbinning case. Ifpa,ell, orradius_scaleare -1, they are replaced bypa,ell, andreff, respectively, from The DAP Datacube Configuration File.
voronoi(e.g.,VOR10binning type): Use the Voronoi tessellation binning algorithm (written by M. Cappellari; see vorbin) to continually accrete adjacent spaxels to reach a minimum S/N (set bytarget_snrin config), accounting for covariance if available, using the signal and noise measurements from theReductionAssessmentobject.Stack all spectra assigned to a single bin:
Spectra are combined following the specified
operationin config. Available options are set byoperation_options().Account for covariance according to
stack_covariance_modeandstack_covariance_parin config. Available options are set bycovariance_mode_options().Mask any wavelength channels in each spaxel with no unmasked pixels from the stack (maskbit set to
FLUXINVALIDin DAPLOGCUBEfile).Construct the map with the bin ID of each spaxel (
BINIDinMAPSfile)Calculate the mean signal (
BIN_MFLUXinMAPSfile), variance (inverse ofBIN_MFLUX_IVARinMAPSfile) and S/N (BIN_SNRinMAPSfile) of the stacked spectra. This is done over the same band/wavelength range as done for the individual spaxel data for theReductionAssessmentobject.Using the mean signal from the
ReductionAssessmentobject, calculate the luminosity-weighted on-sky (BIN_LWSKYCOOinMAPSfile) and elliptical (BIN_LWELLCOOinMAPSfile) coordinates. Also calculate the unweighted coordinates; the latter are not provided in the outputMAPSfile.Calculate the area of each bin (
BIN_AREAinMAPSfile), and the ratio of that area to the expected area (BIN_FAREAinMAPSfile) of the binning procedure. The latter is only relevant to the radial binning, where the expected area is the area of the bin annulus.Apply the Galactic reddening correction to the binned spectra, where the reddening law is defined by the
galactic_reddeningandgalactic_rvparameters, and the E(B-V) value is taken from the DRP header keywordEBVGAL; seeGalacticExtinction. The valid reddening laws are:
ODonnell: seereddening_vector_ccm().
CCM: seereddening_vector_ccm().
FM: seereddening_vector_fm().
Calzetti: seereddening_vector_calzetti().
Note
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.
Therefore, the output emission-line fluxes have been corrected for
Galactic extinction. However, the models and binned spectra in the
output LOGCUBE file are reverted to their reddened values for
direct comparison with the DRP LOGCUBE file.