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.
- License:
- Copyright (c) 2016, SDSS-IV/MaNGA Pipeline Group
- Licensed under BSD 3-clause license - see LICENSE.rst
- Source location:
- $MANGADAP_DIR/python/mangadap/par/artifactdb.py
- Imports and python version compliance:
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import sys import warnings if sys.version > '3': long = int import os.path import numpy from pydl.goddard.astro import airtovac from pydl.pydlutils.yanny import yanny from .parset import ParSet, ParDatabase from .spectralfeaturedb import available_spectral_feature_databases, SpectralFeatureDBDef from ..proc.util import select_proc_method
- Class usage examples:
- Add example usage!
- 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 functions01 Dec 2016: (KBW) Relocated from proc to par.
-
class
mangadap.par.artifactdb.
ArtifactDB
(database_key, artdb_list=None, dapsrc=None)[source]¶ Bases:
mangadap.par.parset.ParDatabase
Basic container class for the database of artifact parameters. See
mangadap.parset.ParDatabase
for additional attributes.Parameters: - database_key (str) – Keyword selecting the database to use.
- artdb_list (list) – (Optional) List of
mangadap.par.spectralfeaturedb.SpectralFeatureDBDef
objects that defines the unique key for the database and the path to the source SDSS parameter file. - dapsrc (str) – (Optional) Root path to the DAP source
directory. If not provided, the default is defined by
mangadap.config.defaults.dap_source_dir()
.
-
database
¶ Database parameters.
Type: mangadap.par.ParSet
-
nart
¶ Number of artifacts in the database
Type: int
-
class
mangadap.par.artifactdb.
ArtifactPar
(index, name, waverange)[source]¶ Bases:
mangadap.par.parset.ParSet
Parameter object that defines a set of artifacts to be ignored during analysis.
See
mangadap.par.parset.ParSet
for attributes and raised exceptions.Parameters: - index (int) – An index used to refer to the line in the line and mode attributes.
- name (str) – A name for the line.
- waverange (numpy.ndarray, list) – A two-element vector with the starting and ending wavelength (angstroms in VACUUM) where the artifact affects the data.
-
mangadap.par.artifactdb.
available_artifact_databases
(dapsrc=None)[source]¶ Return the list of database keys and file names for the available artifact databases. The currently available databases are:
KEY N Description SKY 1 Poorly subtracted sky lines This is a simple wrapper for
mangadap.par.spectralfeaturedb.available_spectral_feature_databases()
.Parameters: dapsrc (str) – (Optional) Root path to the DAP source directory. If not provided, the default is defined by mangadap.config.defaults.dap_source_dir()
.Returns: An list of mangadap.par.spectralfeaturedb.SpectralFeatureDBDef
objects, each of which defines a unique emission-line database.Return type: list Todo
- Add backup function for Python 2.
- Somehow add a python call that reads the databases and constructs the table for presentation in sphinx so that the text above doesn’t have to be edited with changes in the available databases.