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.
Todo
Include columns with just the absolute luminosity of the H-alpha line as the intermediate step between the apparent luminosity and the star-formation rate.
Provide a rough Balmer decrement measurement?
Copyright © 2019, SDSS-IV/MaNGA Pipeline Group
- class mangadap.survey.dapall.DAPall(plan, methods=None, drpver=None, redux_path=None, dapver=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
mangadap.survey.drpcomplete.DRPComplete
file that satisfies the criteria set bymangadap.survey.drpcomplete.DRPComplete.can_analyze()
is considered. If the expected output files exist, they are analyzed and included in the DAPall database. If the expected files do not exist, the construction of the DAPall (and the relevant flag) assumes that the DAP analysis of this cube failed.- Parameters:
plan (
mangadap.config.analysisplan.AnalysisPlan
) – 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. Each method produces an extension in the DAPall file, where the order of the extensions is alphanumeric.drpver (
str
, optional) – DRP version. Default determined bymangadap.config.manga.drp_version()
.redux_path (
str
, optional) – Top-level directory with the DRP products; default is defined bymangadap.config.manga.drp_redux_path()
.dapver (
str
, optional) – DAP version. Default determined bymangadap.config.manga.dap_version()
.analysis_path (
str
, optional) – Top-level directory for the DAP output data; default is defined bymangadap.config.manga.dap_analysis_path()
.readonly (
bool
, optional) – If it exists, open any existing file and disallow any modifications of the database. Default is to automatically build the entire database if it doesn’t exist.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 a
mangadap.config.analysisplan.AnalysisPlan
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
- 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.
- maps_bm
Bitmask used to mask map pixels.
- 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:
- 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:
- ifudesign
Array of the ifudesigns
- Type:
- methods
Array of the methods included in the DAPall file.
- Type:
- readonly
Object is prohibited from updating the database.
- Type:
bool
- loggers
List of logging.Logger objects to log progress; ignored if quiet=True.
- 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
- _construct_maps_file_list(method)[source]
Construct the list of MAPS files that should be in/added to the DAPall file for a given method.
- _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()
.
- property file_name
Return the name of the DRP complete database.
- property file_path
Return the full pat to the DRP complete database.
- method_database(method, deconstruct, drpall)[source]
Construct the DAPall database for the provided DAP method.
- Parameters:
method (
str
) – Name of the DAP methoddeconstruct (
bool
) – Flag that the method deconstructs the bins during the emission-line fitting module.drpall (numpy.recarray) – Primary DRPall data table
- Returns:
DAPall database.
- Return type:
- update(plan, methods=None)[source]
Update the DAPall file.
Currently, this constructs the entire DAPall file from scratch, regardless of whether or not some fraction of the output files have already been analyzed.
- Parameters:
plan (
mangadap.config.analysisplan.AnalysisPlan
) – 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.