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 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.


License

Copyright © 2019, SDSS-IV/MaNGA Pipeline Group


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

Bases: SpectralFeatureDB

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

Each row of the database is parsed using 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 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'
to_datatable()[source]

Compile the database with the specifications of each index.

class mangadap.par.emissionmomentsdb.EmissionMomentsDefinitionTable(name_len=1, shape=None)[source]

Bases: DataTable

Wrapper for an EmissionMomentsDB, primarily for output to an astropy.io.fits.BinTableHDU.

Key

Type

Description

ID

int64

Emission feature ID number

NAME

str_

Name of the emission feature

RESTWAVE

float64

Rest wavelength of the feature

PASSBAND

float64

The lower and upper wavelength that bracket the emission feature used for the moment calculations

BLUEBAND

float64

The lower and upper wavelength of a passband toward the blue of the emission feature, used to define a linear continuum below the emission feature.

REDBAND

float64

The lower and upper wavelength of a passband toward the red of the emission feature, used to define a linear continuum below the emission feature.

Parameters:
  • name_len (int) – The maximum length of any of the emission feature names.

  • shape (int, tuple, optional) – The shape of the initial array. If None, the data array will not be instantiated; use init() to initialize the data array after instantiation.