mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Classes | |
struct | mx::astro::mainSequence< realT > |
Provide various characteristics of main sequence stars according to their spectral type. More... | |
Functions | |
template<typename realT = float> | |
realT | mx::astro::numSpType (std::string spType) |
Parse a main sequence spectral type string into a numeric code. More... | |
realT mx::astro::numSpType | ( | std::string | spType | ) |
Parse a main sequence spectral type string into a numeric code.
Expects standard spectral type strings such as "O5V" or "F2.5" or "G8.5V".
The numeric code starts at 0 for "O0V", 10 for "A0V", through 90 for "Y0". The subtypes are added to this value. For instance, "G8.5V" becomes 48.5.
Only works for main sequence types. Any other spectral type, such as MK class I-IV, will return -1.
[in] | spType | The spectral type string to parse. |
Definition at line 33 of file stars.hpp.
References mx::ioutils::removeWhiteSpace(), and mx::ioutils::toUpper().
Referenced by mx::astro::mainSequence< realT >::H_Ks(), mx::astro::mainSequence< realT >::J_H(), mx::astro::mainSequence< realT >::logL(), mx::astro::maintenance::makeMSTable(), mx::astro::mainSequence< realT >::Mv(), mx::astro::mainSequence< realT >::radius(), mx::astro::mainSequence< realT >::Teff(), mx::astro::mainSequence< realT >::V_Ic(), mx::astro::mainSequence< realT >::V_Ks(), and mx::astro::mainSequence< realT >::V_Rc().