Library of stellar spectra¶
Stellar spectra based on Kurucz atmospheric models and spectral synthesis with the stellar spectral synthesis program ‘spectrum’ by R.O. Gray. Please acknowledge both when using the spectra, but note that neither is responsible for this library.
The files can also be accessed manually here.
Available library:
‘A’ : solar metallicity, 3800-11000 A, Teff = 3500-20000 K, logg = 0-5, sampling 0.01 A
Demonstration of usage¶
API¶
- class PyAstronomy.pyasl.resBased.spectralLib.SpectralLib(lib='A', refreshDescr=False, dlv=True)¶
Access spectral library/ies
- Parameters
- libstring, optional
Library key
- refreshDescrboolean, optional
Re-download library description file (default is False)
- dlvboolean, optional
Verbose download, default is True
Methods
Get content of README file
List descriptions of available libraries
Print content of inventory
read1dFitsSpec
(fn)Read 1d spectral model
readMuFits
(fn)Read specific intensity file
(Re-)Download file description.txt
Re-download inventory.txt file
requestModel
(teff, logg[, mh, nex])Get filename of model spectrum in the library
- getREADME()¶
Get content of README file
- Returns
- READMElist of strings
Content of README file
- listDescription()¶
List descriptions of available libraries
- listInventory()¶
Print content of inventory
The inventory is stored in the attribute inv (dictionary)
- read1dFitsSpec(fn)¶
Read 1d spectral model
- Returns
- w, farrays
Wavelength [A] and flux
- readMuFits(fn)¶
Read specific intensity file
- Returns
- refreshDescription()¶
(Re-)Download file description.txt
This file contains an identifier and a brief description of the available spectral libraries.
- refreshInventory()¶
Re-download inventory.txt file
- requestModel(teff, logg, mh=0.0, nex='diskint')¶
Get filename of model spectrum in the library
Model files are downloaded on demand.
- Parameters
- tefffloat
Effective temperature [K]
- loggfloat
Surface gravity
- mhfloat
Metallicity
- nexstring
Name extension (e.g., diskint or muspecs)
- Returns
- Spectrumnumpy npz file
The spectrum in the form of the context of a numpy npz file