mangadap.par.spectralfeaturedb module
Container class for databases of spectral features. This implements
the base class used by mangadap.par.artifactdb.ArtifactDB,
mangadap.par.emissionlinedb.EmissionLineDB,
mangadap.par.emissionmomentsdb.EmissionMomentsDB,
mangadap.par.absorptionindexdb.AbsorptionIndexDB, and
mangadap.par.bandheadindexdb.BandheadIndexDB.
Copyright © 2019, SDSS-IV/MaNGA Pipeline Group
- class mangadap.par.spectralfeaturedb.SpectralFeatureDB(parfile)[source]
Bases:
ParDatabaseBasic container class for the parameters databases of spectral features. This is the base class for all of the following:
See
ParDatabasefor additional attributes.Each derived class must define its own default directory that contains the relevant databases, the class that defines the base
ParSetfor eachParDatabaseentry, and the method that parses the parameter file into the parameter list.The primary instantiation requires the SDSS parameter file. To instantiate using a keyword (and optionally a directory that holds the parameter files), use
from_key().- Parameters:
parfile (
str, Path) – The SDSS parameter file with the emission-line database.
- key
Database signifying keyword
- Type:
str
- file
File with the emission-line data
- Type:
str
- size
Number of elements in the database.
- Type:
int
- classmethod available_databases(directory_path=None)[source]
Return the list of available database files.
- Parameters:
directory_path (
str, optional) – Root path with the database files. If None, uses the default directory defined bydefault_path().- Returns:
A dictionary with the database files and associated keyword.
- Return type:
dict- Raises:
NotADirectoryError – Raised if the provided or default directory does not exist.
ValueError – Raised if the keywords found for all the
*.parfiles are not unique.
- default_data_dir = None
- classmethod from_key(key, directory_path=None)[source]
Instantiate the object using a keyword.
- Parameters:
key (
str) – Keyword selecting the database to use.directory_path (
str, optional) – Root path with the database parameter files. If None, uses the default set byavailable_databases(). Note that the file search includes any file with a.parextension. The root of the file should be case-insensitive.