mangadap.par.bandheadindexdb module
Container class for the database of bandhead indices to measure.
Class usage examples
Bandhead index databases are defined using SDSS parameter files. To define a database, you can use one of the default set of available bandhead index databases:
from mangadap.par.bandheadindexdb import BandheadIndexDB
print(BandheadIndexDB.available_databases())
bhddb = BandheadIndexDB.from_key('BHBASIC')
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.bandheadindexdb import BandheadIndexDB
bhddb = BandheadIndexDB('/path/to/bandhead/index/database/mybhd.par')
The above will read the file and set the database keyword to
‘MYBHD’ (i.e., the capitalized root name of the *.par file).
See Spectral Indices for the format of the parameter file.
Copyright © 2019, SDSS-IV/MaNGA Pipeline Group
- class mangadap.par.bandheadindexdb.BandheadIndexDB(parfile)[source]
Bases:
SpectralFeatureDBBasic container class for the database of bandhead or color indices.
Each row of the database is parsed using
mangadap.proc.bandpassfilter.BandPassFilterPar. For the format of the input file, see Bandhead or Color Indices.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:
- _parse_yanny()[source]
Parse the yanny file (provided by
file) for the bandhead database.- Returns:
The list of
mangadap.par.parset.ParSetinstances 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
offsetcan 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 = 'bandhead_indices'