mangadap.par.artifactdb module

Container class for a database with a list of spectral regions with known artifacts that should be ignored during analysis of the data. These can be anything, but is only currently used to define spectral regions with poorly subtracted sky lines. They are also currently independent of spatial position and expected to be applied for all spectra in an RSS or CUBE file.

Revision history

16 Apr 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.
02 Dec 2019: (KBW) Completely revamped to use the new base class.


Copyright © 2019, SDSS-IV/MaNGA Pipeline Group

class mangadap.par.artifactdb.ArtifactDB(parfile)[source]

Bases: mangadap.par.spectralfeaturedb.SpectralFeatureDB

Basic container class for the database of artifacts.

Each row of the database is parsed using mangadap.proc.bandpassfilter.ArtifactPar.

The primary instantiation requires the SDSS parameter file with the artifact 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 artifact database.

Database signifying keyword


File with the artifact data


Number of artifacts in the database.


Parse the yanny file (provided by file) for the artifact database.

Returns:The list of mangadap.par.parset.ParSet instances for each line of the database.
Return type:list
default_data_dir = 'artifacts'
class mangadap.par.artifactdb.ArtifactPar(index=None, name=None, waverange=None)[source]

Bases: mangadap.par.parset.KeywordParSet

Parameter object that defines a set of artifacts to be ignored during analysis.

The defined parameters are:

Key Type Options Default Description
index int An index used to refer to the artifact
name str A name for the artifact
waverange ndarray, list A two-element vector with the starting and ending wavelength (angstroms in vacuum) where the artifact affects the data.

See mangadap.par.parset.ParSet for attributes and raised exceptions.


Check the parameter list.

Only check performed is to make sure the wavelength range only has two elements.

Raises:ValueError – Raised if one of the conditions above are not met.