specFromSpectralType

poppy.specFromSpectralType(sptype, return_list=False, catalog=None)

Get synphot Spectrum object from a user-friendly spectral type string.

Given a spectral type such as ‘A0IV’ or ‘G2V’, this uses a fixed lookup table to determine an appropriate spectral model from Castelli & Kurucz 2004 or the Phoenix model grids. Depends on synphot, stsynphot, and CDBS. This is just a convenient access function.

Parameters:
sptypestr

Spectral type, like “G0V”

catalogstr

‘ck04’ for Castelli & Kurucz 2004, ‘phoenix’ for Phoenix models. If not set explicitly, the code will check if the phoenix models are present inside the $PYSYN_CDBS directory. If so, those are the default; otherwise, it’s CK04.

return_listbool

Return list of allowed spectral types. This is deprecated and unused now, but at one point was used in the deprecated GUI functionality.