mangadap.survey.dapall module¶
Defines the class that constructs the DAPall summary table.
This is a post processing script that must be run after the DRPall file is created.
Revision history¶
19 Aug 2016: Original Implementation by K. Westfall (KBW)29 Sep 2017: (KBW) Force the number of emission-line passbands, emission-lines to fit, and spectral indices to be the same for all analysis methods.30 Jan 2019: (KBW) Add effective chi-square for emission-line fits.
Copyright © 2019, SDSS-IV/MaNGA Pipeline Group
-
class
mangadap.survey.dapall.
DAPall
(plan, methods=None, drpver=None, redux_path=None, dapver=None, dapsrc=None, analysis_path=None, readonly=False, loggers=None, quiet=False, single_precision=False)[source]¶ Bases:
object
Construct the summary table information for the DAP.
Any observation in the DRPComplete file with:
- MaNGAID != ‘NULL’
- MANGA_TARGET1 > 0 or MANGA_TARGET3 > 0
- VEL > 0
are assumed to have been analyzed by the DAP. The success flag only checks that the appropriate maps file exists.
Parameters: - plan (
mangadap.par.analysisplan.AnalysisPlanSet
) – The plan object used by the DAP. - methods (
str
,list
, optional) – Specify a set of methods in the DAP plan file to include in the DAPall file. If not provided, all methods in the plan file are included. - drpver (
str
, optional) – DRP version. Default determined bymangadap.config.defaults.default_drp_version()
. - redux_path (
str
, optional) – Top-level directory with the DRP products; default is defined bymangadap.config.defaults.default_redux_path()
. - dapver (
str
, optional) – DAP version. Default determined bymangadap.config.defaults.default_dap_version()
. - dapsrc (
str
, optional) – Source directory of the DAP. Default determined bymangadap.config.defaults.dap_source_dir()
. - analysis_path (
str
, optional) – Top-level directory for the DAP output data; default is defined bymangadap.config.defaults.default_analysis_path()
. - readonly (
bool
, optional) – If it exists, open any existing file and disallow any modifications of the database. Default is to automatically check for any need to update the file. - loggers (
list
, optional) – List of logging.Logger objects used to log progress. - quiet (
bool
, optional) – Suppress all terminal and logging output.
Raises: TypeError
– Raised if the input plan is not amangadap.par.analysisplan.AnalysisPlanSet
object.FileNotFoundError
– Raise if the DRPall or the DRPComplete file are not available.
-
drpver
¶ DRP version
Type: str
-
redux_path
¶ Path to top-level redux directory
Type: str
-
dapsrc
¶ Path to DAP source distribution
Type: str
-
dapver
¶ DAP version
Type: str
-
analysis_path
¶ Path to top-level analysis directory
Type: str
-
drpall_file
¶ Path to the DRPall file
Type: str
-
h
¶ The Hubble parameter (currently always set to unity)
Type: float
-
H0
¶ Hubbles constant (km/s/Mpc)
Type: float
-
cosmo
¶ Object used for distance calculations
Type: astropy.cosmology.FlatLambdaCDM
-
maps_bm
¶ Bitmask used to mask map pixels.
Type: mangadap.dapfits.DAPMapsBitMask
-
neml
¶ Number of emission lines included in each method.
Type: int
-
nindx
¶ Number of spectral indices included in each method.
Type: int
-
str_len
¶ Dictionary with the number of characters used for each string entry in the database.
Type: dict
-
hdu
¶ Object with the table data.
Type: astropy.io.fits.hdu.hdulist.HDUList
-
ndap
¶ Number of rows in the data table; equivalent to the number of processed MAPS files.
Type: int
-
plate
¶ Array of the plate numbers
Type: numpy.ndarray
-
ifudesign
¶ Array of the ifudesigns
Type: numpy.ndarray
-
methods
¶ Array of the methods included in the DAPall file.
Type: numpy.ndarray
-
readonly
¶ Object is prohibited from updating the database.
Type: bool
-
loggers
¶ List of logging.Logger objects to log progress; ignored if quiet=True. Logging is done using
mangadap.util.log.log_output()
. Default is no logging.Type: list
-
quiet
¶ Suppress all terminal and logging output.
Type: bool
-
float_dtype
¶ Sets precision for floating-point numbers.
Type: str
-
_add_channels_to_header
(hdr, channels, prefix, comment, units=None)[source]¶ units is supposed to be a list or numpy array
-
static
_binning_metrics
(dapmaps)[source]¶ - Return binning metrics:
- Maximum radius of any valid bin
- Number and median S/N of bins between 0-1, 0.5-1.5, and 1.5-2.5 Re
-
_combine_plateifu_methods
(plt, ifu)[source]¶ Run the combinatorics to create the full list of plates, ifudesigns, and methods.
-
_construct_maps_file_list
(methodlist, platelist, ifulist)[source]¶ Construct the list of MAPS files that should be in/added to the DAPall file.
-
_get_completed_observations
()[source]¶ Get the list of DRP completed (and prospectively DAP analyzed) observations.
Returns: Two arrays listing the plate and ifudesign numbers of the available observations that the DAP should have analyzed. Return type: numpy.ndarray Raises: FileNotFoundError
– Raised if the DRPComplete file is not available.
-
_read
()[source]¶ Read the data in the existing file at
file_path()
.
-
update
(plan, methods=None)[source]¶ Update the DAPall file
If clobber is True, the entire DAPall file is reconstructed from scratch. Otherwise, any additional data is appended to the end of the file.
Parameters: - plan (
mangadap.par.analysisplan.AnalysisPlanSet
) – The plan object used by the DAP. - methods (str,list) – (Optional) Specify a set of methods in the DAP plan file to include in the DAPall file. If not provided, all methods in the plan file are included.
Raises: ValueError
– Raised if a provided method is not in the provided set of analysis plans, or if the methods do not all have the same number of emission-line bandpasses, emission-lines to fit, and number of spectral indices.- plan (