mangadap.par.emissionmomentsdb module

Container class for the database of emission-line bandpass filters used for non-parameteric measurements of emission-line flux and velocity moments.

Todo

Combine this with the main emissionlinemoments.py file.

Class usage examples

Emission-line moment databases are defined using SDSS parameter files. To define a database, you can use one of the default set of available emission-line moment databases:

from mangadap.par.emissionmomentsdb import EmissionMomentsDB
print(EmissionMomentsDB.available_databases())
elmom = EmissionMomentsDB.from_key('ELBMPL9')

The above call uses the EmissionMoments.from_key() method to define the database using its keyword and the database provided with the MaNGA DAP source distribution. You can also define the database directly for an SDSS-style parameter file:

from mangadap.par.emissionmomentsdb import EmissionMomentsDB
elmom = EmissionMomentsDB('/path/to/emission/moments/database/myelm.par')

The above will read the file and set the database keyword to ‘MYELM’ (i.e., the capitalized root name of the *.par file). See Emission-Line Measurements for the format of the parameter file.

Revision history

17 Mar 2016: Original implementation by K. Westfall (KBW)
11 May 2016: (KBW) Switch to using pydl.pydlutils.yanny and pydl.goddard.astro.airtovac instead of internal functions
06 Oct 2017: (KBW) Add function to return channel names.
02 Dec 2019: (KBW) Significantly reworked to use the new base class.

License

Copyright © 2019, SDSS-IV/MaNGA Pipeline Group


class mangadap.par.emissionmomentsdb.EmissionMomentsDB(parfile)[source]

Bases: mangadap.par.spectralfeaturedb.SpectralFeatureDB

Basic container class for the database of emission-line moments to calculate.

Each row of the database is parsed using mangadap.proc.bandpassfilter.BandPassFilterPar. For the format of the input file, see Non-parametric Emission-Line Measurements.

The primary instantiation requires the SDSS parameter file with the bandpass data. To instantiate using a keyword (and optionally a directory that holds the parameter files), use the mangadap.par.spectralfeaturedb.SpectralFeatureDB.from_key() class method. See the base class for additional attributes.

Parameters

parfile (str) – The SDSS parameter file with the database.

key

Database signifying keyword

Type

str

file

File with the data

Type

str

size

Number of features in the database.

Type

int

dummy

Boolean array flagging bandpasses as dummy placeholders.

Type

numpy.ndarray

_parse_yanny()[source]

Parse the yanny file (provided by file) for the emission-line moment database.

Returns

The list of mangadap.par.parset.ParSet instances for each line of the database.

Return type

list

channel_names(dicttype=True)[source]

Return a dictionary with the channel names as the dictionary key and the channel number as the dictionary value. If dicttype is False, a list is returned with just the string keys.

default_data_dir = 'emission_bandpass_filters'