Database#
speXtra
comes with a built-in database of spectral templates, extinction curves and astronomical filters.
The database organized through yaml
files which describe the contents of the different data files.
The inner workings of the database are transparent to the user and generally the user does not
need to deal with the database when working with speXtra
.
There are however few things that might be useful to the user, specially when working in interactive mode (e.g. Jupyter Notebooks)
The database is organized within a directory tree. Depending on what you are requesting, a spectra template, a extinction curve or a filter, it will look for it at that particular place. The syntax is standard:
"library_name/template_name"
for a spectral template"extinction_curve_family/extinction_curve_name"
for extinction curves"filter_system/filter_name"
for astronomical filters
Below you can find the contents of the database database-contents
Browsing the database#
There are few ways to interact with the database to examine its contents or to use them programately
from spextra import spextra_database
spextra_database["libraries"]
Downloading file 'default_filters.yml' from 'https://scopesim.univie.ac.at/spextra/database/default_filters.yml' to '/home/docs/.spextra_cache'.
Downloading file 'default_spectra.yml' from 'https://scopesim.univie.ac.at/spextra/database/default_spectra.yml' to '/home/docs/.spextra_cache'.
Downloading file 'default_curves.yml' from 'https://scopesim.univie.ac.at/spextra/database/default_curves.yml' to '/home/docs/.spextra_cache'.
Downloading file 'index.yml' from 'https://scopesim.univie.ac.at/spextra/database/index.yml' to '/home/docs/.spextra_cache'.
0%| | 0.00/1.69k [00:00<?, ?B/s]
0%| | 0.00/1.69k [00:00<?, ?B/s]
100%|█████████████████████████████████████| 1.69k/1.69k [00:00<00:00, 1.29MB/s]
{'ref': 'A library of reference stars',
'kc96': 'Kinney-Calzetti Atlas',
'pickles': 'Pickles Stellar Library',
'dobos': 'SDSS galaxy composite spectra',
'irtf': 'IRTF spectral library',
'agn': 'AGN templates',
'nebulae': 'Emission line nebulae',
'brown': 'Galaxy SEDs from the UV to the Mid-IR',
'kurucz': 'Subset of Kurucz 1993 Models',
'sne': 'Supernova Legacy Survey',
'moehler': 'flux/telluric standards with X-Shooter',
'madden': 'High-Resolution Spectra of Habitable Zone Planets',
'bosz/hr': 'BOSZ stellar atmosphere Grid - High Resolution',
'bosz/mr': 'BOSZ stellar atmosphere Grid - Medium Resolution',
'bosz/lr': 'BOSZ stellar atmosphere Grid - Low Resolution',
'assef': 'Low-resolution spectral templates for AGN and galaxies',
'sky': 'Paranal sky background spectra',
'shapley': 'Rest-Frame Ultraviolet Spectra of z ∼ 3 Lyman Break Galaxies',
'etc/kinney': 'ESO ETC version of the Kinney-Calzetti Atlas',
'etc/kurucz': 'ESO ETC subset of the Kurucz 1993 models',
'etc/marcs/p': 'ESO ETC subset of the MARCS Stellar Models with Plane Parallel Geometry',
'etc/marcs/s': 'ESO ETC subset of the MARCS Stellar Models with Spherical Geometry',
'etc/misc': 'Other templates, nubulae and qso',
'etc/pickles': 'ESO ETC subset of the Pickles stellar library'}
it will list the spectral libraries available
spextra_database["extinction_curves"]
{'gordon': 'LMC and SMC extinction laws',
'cardelli': 'MW extinction laws',
'calzetti': 'extragalactic attenuation curves'}
spextra_database["filter_systems"]
{'elt/micado': 'MICADO filters',
'elt/metis': 'METIS filters',
'etc': 'ESO ETC standard filters'}
will print the extinction curves and filter systems available
SpecLibrary
is also important to examine the contents
of each spectral library. To use it, simply call it like this
from spextra import SpecLibrary
lib = SpecLibrary("kc96")
list(lib)
Downloading file 'libraries/kc96/index.yml' from 'https://scopesim.univie.ac.at/spextra/database/libraries/kc96/index.yml' to '/home/docs/.spextra_cache'.
0%| | 0.00/2.50k [00:00<?, ?B/s]
0%| | 0.00/2.50k [00:00<?, ?B/s]
100%|█████████████████████████████████████| 2.50k/2.50k [00:00<00:00, 2.12MB/s]
['elliptical',
'bulge',
's0',
'sa',
'sb',
'sc',
'starb1',
'starb2',
'starb3',
'starb4',
'starb5',
'starb6']
and it will list all templates available for that library.
Similarly FilterSystem
holds the information for a particular filter system and ExtinctionCurveLibrary
for a particular extinction curve family.
Database contents#
# Database contents
libraries:
ref : A library of reference stars
kc96 : Kinney-Calzetti Atlas
pickles : Pickles Stellar Library
dobos : SDSS galaxy composite spectra
irtf : IRTF spectral library
agn : AGN templates
nebulae : Emission line nebulae
brown : Galaxy SEDs from the UV to the Mid-IR
kurucz : Subset of Kurucz 1993 Models
sne : Supernova Legacy Survey
moehler : flux/telluric standards with X-Shooter
madden : High-Resolution Spectra of Habitable Zone Planets
bosz/hr : BOSZ stellar atmosphere Grid - High Resolution
bosz/mr : BOSZ stellar atmosphere Grid - Medium Resolution
bosz/lr : BOSZ stellar atmosphere Grid - Low Resolution
assef : Low-resolution spectral templates for AGN and galaxies
sky : Paranal sky background spectra
shapley : Rest-Frame Ultraviolet Spectra of z ∼ 3 Lyman Break Galaxies
etc/kinney : ESO ETC version of the Kinney-Calzetti Atlas
etc/kurucz : ESO ETC subset of the Kurucz 1993 models
etc/marcs/p : ESO ETC subset of the MARCS Stellar Models with Plane Parallel Geometry
etc/marcs/s : ESO ETC subset of the MARCS Stellar Models with Spherical Geometry
etc/misc : Other templates, nubulae and qso
etc/pickles : ESO ETC subset of the Pickles stellar library
# here go the extinction curves
extinction_curves:
gordon : LMC and SMC extinction laws
cardelli : MW extinction laws
calzetti : extragalactic attenuation curves
# here go filters not found at SVO
filter_systems:
elt/micado : MICADO filters
elt/metis : METIS filters
etc : ESO ETC standard filters