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.

License:
Copyright (c) 2017, SDSS-IV/MaNGA Pipeline Group
Licensed under BSD 3-clause license - see LICENSE.rst
Class usage examples:
Add some usage comments here!
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.
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:
Raises:
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.

static _emission_line_db_info(key, dapsrc=None)[source]
_emission_line_metrics(dapmaps, moment0=False, spx_coo=False)[source]
static _emission_line_moment_db_info(key, dapsrc=None)[source]
_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.
_halpha_kinematics_metrics(dapmaps, redshift, spx_coo=False)[source]
_init_string_lengths()[source]
static _radial_coverage_metric(r, ell)[source]
_read()[source]

Read the data in the existing file at file_path().

static _spectral_index_db_info(key, dapsrc=None)[source]
_spectral_index_metrics(dapmaps, specindex_units)[source]
_srd_snr_metric(dapmaps)[source]

Grab the SNR metrics from the MAPS headers.

_stellar_kinematics_metrics(dapmaps, redshift)[source]
_table_dtype(nmom, neml, nindx)[source]
file_name()[source]

Return the name of the DRP complete database.

file_path()[source]

Return the full pat to the DRP complete database.

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.