mangadap.par.absorptionindexdb module

Container class for the database of absorption-line indices to measure.

Class usage examples

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

from mangadap.par.absorptionindexdb import AbsorptionIndexDB
print(AbsorptionIndexDB.available_databases())
absdb = AbsorptionIndexDB.from_key('LICKINDX')

The above call uses the AbsorptionIndexDB.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.absorptionindexdb import AbsorptionIndexDB
absdb = AbsorptionIndexDB('/path/to/absorption/index/database/myabs.par')

The above will read the file and set the database keyword to ‘MYABS’ (i.e., the capitalized root name of the *.par file). See Spectral-Index Parameters for the format of the parameter file.

Revision history

18 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
01 Dec 2016: (KBW) Relocated from proc to par.
06 Oct 2017: (KBW) Add function to return channel names

License

Copyright © 2019, SDSS-IV/MaNGA Pipeline Group


class mangadap.par.absorptionindexdb.AbsorptionIndexDB(parfile)[source]

Bases: mangadap.par.spectralfeaturedb.SpectralFeatureDB

Basic container class for the database of absorption-line indices.

Each row of the database is parsed using mangadap.proc.bandpassfilter.BandPassFilterPar. For the format of the input file, see Absorption-line Index Parameters.

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

Returns:The list of mangadap.par.parset.ParSet instances for each line of the database.
Return type:list
channel_names(offset=0)[source]

Return a dictionary with the channel names as the dictionary key and the channel number as the dictionary value. An offset can be added to the channel number; i.e., if the offset is 2, the channel numbers will be a running number starting with 2.

default_data_dir = 'absorption_indices'