grid_to_spec¶
- stsynphot.catalog.grid_to_spec(gridname, t_eff, metallicity, log_g)[source]¶
Extract spectrum from given catalog grid parameters. Interpolate if necessary.
Grid parameters are read with
get_catalog_index()
.- Parameters:
- gridname{‘ck04models’, ‘k93models’, ‘phoenix’}
- Model to use:
ck04models
- Castelli & Kurucz (2004)k93models
- Kurucz (1993)phoenix
- Allard et al. (2009)
- t_effstr, float or
astropy.units.quantity.Quantity
Effective temperature of model. If not Quantity, assumed to be in Kelvin. If string (from parser), convert to Quantity.
- metallicitystr or float
Metallicity of model. If string (from parser), convert to float.
- log_gstr or float
Log surface gravity for model. If string (from parser), convert to float.
- Returns:
- sp
synphot.spectrum.SourceSpectrum
Empirical source spectrum.
- sp
- Raises:
- stsynphot.exceptions.ParameterOutOfBounds
Grid parameter out of bounds.
- synphot.exceptions.SynphotError
Invalid inputs.