mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
stars.hpp
Go to the documentation of this file.
1 /** \file stars.hpp
2  * \author Jared R. Males (jaredmales@gmail.com)
3  * \brief Various utilities related to stars.
4  * \ingroup astrofiles
5  *
6  */
7 
8 #include "../math/gslInterpolator.hpp"
9 
10 #include "units.hpp"
11 
12 #ifndef mx_astro_stars_hpp
13 #define mx_astro_stars_hpp
14 
15 #include "../ioutils/stringUtils.hpp"
16 #include "../ioutils/readColumns.hpp"
17 
18 namespace mx
19 {
20 namespace astro
21 {
22 
23 ///Parse a main sequence spectral type string into a numeric code.
24 /** Expects standard spectral type strings such as "O5V" or "F2.5" or "G8.5V".
25  * The numeric code starts at 0 for "O0V", 10 for "A0V", through 90 for "Y0". The subtypes are added to this value. For instance,
26  * "G8.5V" becomes 48.5.
27  *
28  * Only works for main sequence types. Any other spectral type, such as MK class I-IV, will return -1.
29  *
30  * \ingroup stars
31  */
32 template<typename realT=float>
33 realT numSpType( std::string spType /**< [in] The spectral type string to parse.*/)
34 {
35 
36  spType = ioutils::removeWhiteSpace(spType);
37 
38  spType = ioutils::toUpper(spType);
39 
40 
41  realT num = 0;
42 
43  switch( spType[0] )
44  {
45  case 'O':
46  num = 0;
47  break;
48  case 'B':
49  num = 10;
50  break;
51  case 'A':
52  num = 20;
53  break;
54  case 'F':
55  num = 30;
56  break;
57  case 'G':
58  num = 40;
59  break;
60  case 'K':
61  num = 50;
62  break;
63  case 'M':
64  num = 60;
65  break;
66  case 'L':
67  num = 70;
68  break;
69  case 'T':
70  num = 80;
71  break;
72  case 'Y':
73  num = 90;
74  break;
75  default:
76  return -1000;
77  }
78 
79  if(spType.size() < 2) return -1000;
80  if(!isdigit(spType[1])) return -1000;
81 
82  int i=1;
83  while( i < spType.size() && ( isdigit(spType[i]) || spType[i] == '.')) ++i;
84 
85  std::string subType = spType.substr(1, i-1);
86 
87  num += ioutils::convertFromString<realT>(subType);
88 
89  if(spType.size() == i) return num;
90  if(spType[i] == 'V') return num;
91 
92  return -1*num;
93 }
94 
95 /// Provide various characteristics of main sequence stars according to their spectral type.
96 /** Interpolates on "A Modern Mean Dwarf Stellar Color and Effective Temperature Sequence"
97  * by Eric Mamajek, available at http://www.pas.rochester.edu/~emamajek/EEM_dwarf_UBVIJHK_colors_Teff.txt.
98  *
99  * Loads values of the sequence at construction (hard coded), and then provides interpolation in between the points.
100  *
101  * Version of the sequence used: 2017.03.14
102  *
103  * \ingroup stars
104  */
105 template<typename realT>
107 {
108  std::vector<double> m_numTypes; ///< The numeric spectral type codes from the sequence
109  std::vector<double> m_numTypesR; ///< The numeric spectral type codes from the sequence, in reversed order.
110 
111  std::vector<double> m_Teffs; ///< The effective temperatures from the sequence
112  std::vector<double> m_TeffsR; ///< The effective temperatures from the sequence, reveresed order.
113 
114  std::vector<double> m_logLs; ///< The log10 luminosities from the sequence
115  std::vector<double> m_rads; ///< The radii from the sequence
116  std::vector<double> m_masses; ///< The masses from the sequence
117  std::vector<double> m_Mvs; ///< The absolute V magnitudes from the sequence
118  std::vector<double> m_V_Rcs; ///< The V-Rc colors from the sequence
119  std::vector<double> m_V_Ics; ///< The V-Ic colors from the sequence
120  std::vector<double> m_V_Kss; ///< The V-Ks colors from the sequence
121  std::vector<double> m_J_Hs; ///< The J-H colors from the sequence
122  std::vector<double> m_H_Kss; ///< The H-Ks colors from the sequence
123 
124  math::gslInterpolator<math::gsl_interp_linear<double>> interpT; ///< The interpolator for effective Temperature
125  double m_minT; ///< The minimum numeric spectral type for effective Temperature
126  double m_maxT; ///< The maximum numeric spectral type for effective Temperature
127 
128  math::gslInterpolator<math::gsl_interp_linear<double>> interpRad; ///< The interpolator for effective Temperature
129  double m_minRad; ///< The minimum numeric spectral type for effective Temperature
130  double m_maxRad; ///< The maximum numeric spectral type for effective Temperature
131 
132  math::gslInterpolator<math::gsl_interp_linear<double>> interpL; ///< The interpolator for log luminosity
133  double m_minL; ///< The minimum numeric spectral type for log luminosity
134  double m_maxL; ///< The maximum numeric spectral type for log luminosity
135 
136  math::gslInterpolator<math::gsl_interp_linear<double>> interpMv; ///< The interpolator for absolute V magnitude
137  double m_minMv; ///< The minimum numeric spectral type for absolute V magnitude
138  double m_maxMv; ///< The maximum numeric spectral type for absolute V magnitude
139 
141  double m_minVRc; ///< The minimum numeric spectral type for V-Rc color
142  double m_maxVRc; ///< The maximum numeric spectral type for V-Rc color
143 
145  double m_minVIc; ///< The minimum numeric spectral type for V-Ic color
146  double m_maxVIc; ///< The maximum numeric spectral type for V-Ic color
147 
149  double m_minVKs; ///< The minimum numeric spectral type for V-Ks color
150  double m_maxVKs; ///< The maximum numeric spectral type for V-Ks color
151 
153  double m_minJH; ///< The minimum numeric spectral type for J-H color
154  double m_maxJH; ///< The maximum numeric spectral type for J-H color
155 
157  double m_minHKs; ///< The minimum numeric spectral type for H-Ks color
158  double m_maxHKs; ///< The maximum numeric spectral type for H-Ks color
159 
160 
161  math::gslInterpolator<math::gsl_interp_linear<double>> interpSpTfmT; ///< The interpolator for effective Temperature
162  double m_minSpTfmT; ///< The minimum numeric spectral type for effective Temperature
163  double m_maxSpTfmT; ///< The maximum numeric spectral type for effective Temperature
164 
165  void findMinMax( std::vector<double> & seq,
166  double & min,
167  double & max,
168  std::vector<double> & ref
169  )
170  {
171  if(seq.size()!=ref.size())
172  {
173  std::cerr << "size mismatch\n";
174  min = 0;
175  max = 0;
176  }
177 
178  min = ref[0];
179  size_t n;
180  for(n=0; n < seq.size();++n)
181  {
182  if(seq[n] != -99) break;
183  }
184 
185  if(n >= seq.size()-1)
186  {
187  min = 0;
188  max = 0;
189  return;
190  }
191 
192  min = ref[n];
193 
194 
195  for(;n<seq.size()-1;++n)
196  {
197  if(seq[n+1] == -99) break;
198  }
199 
200  max = ref[n];
201  ++n;
202  for(;n<seq.size();++n)
203  {
204  seq[n] = -99;
205  }
206 
207  }
208 
209  mainSequence()
210  {
211  #include "mamajek.inc"
212 
213  m_numTypesR.assign(m_numTypes.rbegin(), m_numTypes.rend());
214 
215  findMinMax(m_Teffs, m_minT, m_maxT, m_numTypes);
216  m_TeffsR.assign(m_Teffs.rbegin(), m_Teffs.rend()); //get reversed vector after normalizing -99s.
217 
218  findMinMax(m_rads, m_minRad, m_maxRad, m_numTypes);
219 
220  findMinMax(m_logLs, m_minL, m_maxL, m_numTypes);
221  findMinMax(m_Mvs, m_minMv, m_maxMv, m_numTypes);
222  findMinMax(m_V_Rcs, m_minVRc, m_maxVRc, m_numTypes);
223  findMinMax(m_V_Ics, m_minVIc, m_maxVIc, m_numTypes);
224  findMinMax(m_V_Kss, m_minVKs, m_maxVKs, m_numTypes);
225  findMinMax(m_J_Hs, m_minJH, m_maxJH, m_numTypes);
226  findMinMax(m_H_Kss, m_minHKs, m_maxHKs, m_numTypes);
227 
229 
230  interpT.setup( m_numTypes, m_Teffs );
231  interpRad.setup( m_numTypes, m_rads);
232  interpL.setup( m_numTypes, m_logLs );
233  interpMv.setup( m_numTypes, m_Mvs );
234  interpVRc.setup( m_numTypes, m_V_Rcs );
235  interpVIc.setup( m_numTypes, m_V_Ics );
236  interpVKs.setup( m_numTypes, m_V_Kss );
237  interpJH.setup( m_numTypes, m_J_Hs );
238  interpHKs.setup( m_numTypes, m_H_Kss );
239 
241  }
242 
243  /// Get the interpolated effective temperature
244  /**
245  * \returns the effective temperature.
246  * \returns -999 if the input type code is out of range.
247  */
248  realT Teff( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
249  {
250  if( numType < m_minT || numType > m_maxT)
251  {
252  return -999;
253  }
254 
255  return interpT(numType);
256  }
257 
258  /// Get the interpolated effective temperature
259  /**
260  * \returns the effective temperature.
261  * \returns -999 if the input type is out of range.
262  */
263  realT Teff( const std::string & spType /**< [in] the spectral type in standard format */)
264  {
265  return Teff( numSpType(spType));
266  }
267 
268  /// Get the interpolated radius
269  /**
270  * \returns the radius in Solar units.
271  * \returns -999 if the input type code is out of range.
272  */
273  realT radius( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
274  {
275  if( numType < m_minRad || numType > m_maxRad)
276  {
277  return -999;
278  }
279 
280  return interpRad(numType);
281  }
282 
283  /// Get the interpolated radius
284  /**
285  * \returns the radius in Solar units.
286  * \returns -999 if the input type is out of range.
287  */
288  realT radius( const std::string & spType /**< [in] the spectral type in standard format */)
289  {
290  return radius( numSpType(spType));
291  }
292 
293  /// Get the interpolated log of luminosity
294  /**
295  * \returns the log of luminosity.
296  * \returns -999 if the input type code is out of range.
297  */
298  realT logL( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
299  {
300  if( numType < m_minL || numType > m_maxL)
301  {
302  return -999;
303  }
304 
305  return interpL(numType);
306  }
307 
308  /// Get the interpolated log of luminosity
309  /**
310  * \returns the log of luminosity.
311  * \returns -999 if the input type is out of range.
312  */
313  realT logL( const std::string & spType /**< [in] the spectral type in standard format */)
314  {
315  return logL( numSpType(spType));
316  }
317 
318  /// Get the interpolated absolute V magnitude
319  /**
320  * \returns the aboslute V magnitude
321  * \returns -999 if the input type code is out of range.
322  */
323  realT Mv( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
324  {
325  if( numType < m_minMv || numType > m_maxMv)
326  {
327  return -999;
328  }
329 
330  return interpMv(numType);
331  }
332 
333  /// Get the interpolated absolute V magnitude
334  /**
335  * \returns the aboslute V magnitude
336  * \returns -999 if the input type is out of range.
337  */
338  realT Mv( const std::string & spType /**< [in] the spectral type in standard format */)
339  {
340  return Mv( numSpType(spType));
341  }
342 
343  /// Get the interpolated absolute V-Rc color
344  /**
345  * \returns the aboslute V-Rc color
346  * \returns -999 if the input type code is out of range.
347  */
348  realT V_Rc( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
349  {
350  if( numType < m_minVRc || numType > m_maxVRc)
351  {
352  return -999;
353  }
354 
355  return interpVRc(numType);
356  }
357 
358  /// Get the interpolated absolute V-Rc color
359  /**
360  * \returns the aboslute V-Rc color
361  * \returns -999 if the input type is out of range.
362  */
363  realT V_Rc( const std::string & spType /**< [in] the spectral type in standard format */)
364  {
365  return V_Rc( numSpType(spType));
366  }
367 
368  /// Get the interpolated absolute V-Ic color
369  /**
370  * \returns the aboslute V-Ic color
371  * \returns -999 if the input type code is out of range.
372  */
373  realT V_Ic( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
374  {
375  if( numType < m_minVIc || numType > m_maxVIc)
376  {
377  return -999;
378  }
379 
380  return interpVIc(numType);
381  }
382 
383  /// Get the interpolated absolute V-Ic color
384  /**
385  * \returns the aboslute V-Ic color
386  * \returns -999 if the input type is out of range.
387  */
388  realT V_Ic( const std::string & spType /**< [in] the spectral type in standard format */)
389  {
390  return V_Ic( numSpType(spType));
391  }
392 
393  /// Get the interpolated absolute V-Ks color
394  /**
395  * \returns the aboslute V-Ks color
396  * \returns -999 if the input type code is out of range.
397  */
398  realT V_Ks( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
399  {
400  if( numType < m_minVKs || numType > m_maxVKs)
401  {
402  return -999;
403  }
404 
405  return interpVKs(numType);
406  }
407 
408  /// Get the interpolated absolute V-Ks color
409  /**
410  * \returns the aboslute V-Ks color
411  * \returns -999 if the input type is out of range.
412  */
413  realT V_Ks( const std::string & spType /**< [in] the spectral type in standard format */)
414  {
415  return V_Ks( numSpType(spType));
416  }
417 
418  /// Get the interpolated absolute J-H color
419  /**
420  * \returns the aboslute J-H color
421  * \returns -999 if the input type code is out of range.
422  */
423  realT J_H( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
424  {
425  if( numType < m_minJH || numType > m_maxJH)
426  {
427  return -999;
428  }
429 
430  return interpJH(numType);
431  }
432 
433  /// Get the interpolated absolute J-H color
434  /**
435  * \returns the aboslute J-H color
436  * \returns -999 if the input type is out of range.
437  */
438  realT J_H( const std::string & spType /**< [in] the spectral type in standard format */)
439  {
440  return J_H( numSpType(spType));
441  }
442 
443  /// Get the interpolated absolute H-Ks color
444  /**
445  * \returns the aboslute H-Ks color
446  * \returns -999 if the input type code is out of range.
447  */
448  realT H_Ks( realT numType /**< [in] the numeric spectral type code, see \ref mx::astro::numSpType() */)
449  {
450  if( numType < m_minHKs || numType > m_maxHKs)
451  {
452  return -999;
453  }
454 
455  return interpHKs(numType);
456  }
457 
458  /// Get the interpolated absolute H-Ks color
459  /**
460  * \returns the aboslute H-Ks color
461  * \returns -999 if the input type is out of range.
462  */
463  realT H_Ks( const std::string & spType /**< [in] the spectral type in standard format */)
464  {
465  return H_Ks( numSpType(spType));/// Get the interpolated absolute H-Ks color
466  /**
467  * \returns the aboslute H-Ks color
468  * \returns -999 if the input type code is out of range.
469  */
470  }
471 
472  realT spTFromTeff( realT Teff )
473  {
474  if( Teff < m_minSpTfmT || Teff > m_maxSpTfmT)
475  {
476  return -999;
477  }
478 
479  return floor(2*interpSpTfmT(Teff)+0.5)/2; //round to nearest 0.5 types.
480  }
481 
482 };
483 
484 
485 namespace maintenance
486 {
487 
488 
489 /// Read in the main sequence table of Mamajek, and construct the vectors for input into the mainSequence class.
490 /** This is used to create mamajek.inc.
491  * The table should be copied to a text file, and all `...` replaced with -99, then any remaining . replaced with space.
492  */
493 void makeMSTable( const std::string & fn )
494 {
495  std::vector<std::string> SpT;
496  std::vector<double> Teff;
497  std::vector<double> logT;
498  std::vector<double> logL;
499  std::vector<double> Mbol;
500  std::vector<double> BCv;
501  std::vector<double> Mv;
502  std::vector<double> B__V;
503  std::vector<double> Bt__Vt;
504  std::vector<double> G__V;
505  std::vector<double> Bp__Rp;
506  std::vector<double> G__Rp;
507  std::vector<double> M_G;
508  std::vector<double> b__y;
509  std::vector<double> U__B;
510  std::vector<double> V__Rc;
511  std::vector<double> V__Ic;
512  std::vector<double> V__Ks;
513  std::vector<double> J__H;
514  std::vector<double> H__Ks;
515  std::vector<double> Ks__W1;
516  std::vector<double> W1__W2;
517  std::vector<double> W1__W3;
518  std::vector<double> W1__W4;
519  std::vector<double> M_J;
520  std::vector<double> M_Ks;
521  std::vector<double> i__z;
522  std::vector<double> z__Y;
523  std::vector<double> R_Rsun;
524  std::vector<double> Msun;
525 
526  ioutils::readColumns(fn,SpT,Teff,logT,logL,Mbol,BCv,Mv,B__V,Bt__Vt,G__V,Bp__Rp,G__Rp,M_G,b__y,U__B,V__Rc,V__Ic,V__Ks,J__H,H__Ks,Ks__W1,W1__W2,W1__W3,
527  W1__W4,M_J,M_Ks,i__z,z__Y,R_Rsun, Msun);
528 
529  std::cout << "//" << fn << "\n";
530  std::cout << " m_numTypes = {" << numSpType(SpT[0]);
531  for(int n=1;n<SpT.size();++n) std::cout << ',' << numSpType(SpT[n]);
532  std::cout << "};\n";
533 
534  std::cout << " m_Teffs = {" << Teff[0];
535  for(int n=1;n<SpT.size();++n) std::cout << ',' << Teff[n];
536  std::cout << "};\n";
537 
538  std::cout << " m_logLs = {" << logL[0];
539  for(int n=1;n<SpT.size();++n) std::cout << ',' << logL[n];
540  std::cout << "};\n";
541 
542  std::cout << " m_rads = {" << R_Rsun[0];
543  for(int n=1;n<SpT.size();++n) std::cout << ',' << R_Rsun[n];
544  std::cout << "};\n";
545 
546  std::cout << " m_masses = {" << Msun[0];
547  for(int n=1;n<SpT.size();++n) std::cout << ',' << Msun[n];
548  std::cout << "};\n";
549 
550  std::cout << " m_Mvs = {" << Mv[0];
551  for(int n=1;n<SpT.size();++n) std::cout << ',' << Mv[n];
552  std::cout << "};\n";
553 
554  std::cout << " m_V_Rcs = {" << V__Rc[0];
555  for(int n=1;n<SpT.size();++n) std::cout << ',' << V__Rc[n];
556  std::cout << "};\n";
557 
558  std::cout << " m_V_Ics = {" << V__Ic[0];
559  for(int n=1;n<SpT.size();++n) std::cout << ',' << V__Ic[n];
560  std::cout << "};\n";
561 
562  std::cout << " m_V_Kss = {" << V__Ks[0];
563  for(int n=1;n<SpT.size();++n) std::cout << ',' << V__Ks[n];
564  std::cout << "};\n";
565 
566  std::cout << " m_J_Hs = {" << J__H[0];
567  for(int n=1;n<SpT.size();++n) std::cout << ',' << J__H[n];
568  std::cout << "};\n";
569 
570  std::cout << " m_H_Kss = {" << H__Ks[0];
571  for(int n=1;n<SpT.size();++n) std::cout << ',' << H__Ks[n];
572  std::cout << "};\n";
573 }
574 } //namespace maintenance
575 } //namespace astro
576 } //namespace mx
577 
578 
579 
580 #endif
Class to manage interpolation using the GSL interpolation library.
int readColumns(const std::string &fname, arrTs &... arrays)
Read in columns from a text file.
realT numSpType(std::string spType)
Parse a main sequence spectral type string into a numeric code.
Definition: stars.hpp:33
void toUpper(std::string &outstr, const std::string &instr)
Convert a string to all upper case.
void removeWhiteSpace(std::string &outstr, const std::string &instr)
Remove all white space from a string.
The mxlib c++ namespace.
Definition: mxError.hpp:107
void makeMSTable(const std::string &fn)
Read in the main sequence table of Mamajek, and construct the vectors for input into the mainSequence...
Definition: stars.hpp:493
Provide various characteristics of main sequence stars according to their spectral type.
Definition: stars.hpp:107
math::gslInterpolator< math::gsl_interp_linear< double > > interpVKs
The interpolator for V-Ks color.
Definition: stars.hpp:148
std::vector< double > m_TeffsR
The effective temperatures from the sequence, reveresed order.
Definition: stars.hpp:112
realT V_Ic(realT numType)
Get the interpolated absolute V-Ic color.
Definition: stars.hpp:373
realT radius(const std::string &spType)
Get the interpolated radius.
Definition: stars.hpp:288
double m_minSpTfmT
The minimum numeric spectral type for effective Temperature.
Definition: stars.hpp:162
realT V_Rc(realT numType)
Get the interpolated absolute V-Rc color.
Definition: stars.hpp:348
realT H_Ks(const std::string &spType)
Get the interpolated absolute H-Ks color.
Definition: stars.hpp:463
double m_maxT
The maximum numeric spectral type for effective Temperature.
Definition: stars.hpp:126
double m_minRad
The minimum numeric spectral type for effective Temperature.
Definition: stars.hpp:129
double m_maxMv
The maximum numeric spectral type for absolute V magnitude.
Definition: stars.hpp:138
realT J_H(const std::string &spType)
Get the interpolated absolute J-H color.
Definition: stars.hpp:438
std::vector< double > m_V_Ics
The V-Ic colors from the sequence.
Definition: stars.hpp:119
realT logL(realT numType)
Get the interpolated log of luminosity.
Definition: stars.hpp:298
math::gslInterpolator< math::gsl_interp_linear< double > > interpVIc
The interpolator for V-Ic color.
Definition: stars.hpp:144
double m_maxL
The maximum numeric spectral type for log luminosity.
Definition: stars.hpp:134
double m_minL
The minimum numeric spectral type for log luminosity.
Definition: stars.hpp:133
std::vector< double > m_J_Hs
The J-H colors from the sequence.
Definition: stars.hpp:121
double m_minVKs
The minimum numeric spectral type for V-Ks color.
Definition: stars.hpp:149
realT Teff(const std::string &spType)
Get the interpolated effective temperature.
Definition: stars.hpp:263
std::vector< double > m_numTypes
The numeric spectral type codes from the sequence.
Definition: stars.hpp:108
realT radius(realT numType)
Get the interpolated radius.
Definition: stars.hpp:273
std::vector< double > m_numTypesR
The numeric spectral type codes from the sequence, in reversed order.
Definition: stars.hpp:109
realT V_Ic(const std::string &spType)
Get the interpolated absolute V-Ic color.
Definition: stars.hpp:388
double m_maxVIc
The maximum numeric spectral type for V-Ic color.
Definition: stars.hpp:146
double m_minJH
The minimum numeric spectral type for J-H color.
Definition: stars.hpp:153
realT V_Ks(const std::string &spType)
Get the interpolated absolute V-Ks color.
Definition: stars.hpp:413
math::gslInterpolator< math::gsl_interp_linear< double > > interpSpTfmT
The interpolator for effective Temperature.
Definition: stars.hpp:161
std::vector< double > m_Teffs
The effective temperatures from the sequence.
Definition: stars.hpp:111
double m_maxJH
The maximum numeric spectral type for J-H color.
Definition: stars.hpp:154
double m_minMv
The minimum numeric spectral type for absolute V magnitude.
Definition: stars.hpp:137
std::vector< double > m_Mvs
The absolute V magnitudes from the sequence.
Definition: stars.hpp:117
std::vector< double > m_V_Kss
The V-Ks colors from the sequence.
Definition: stars.hpp:120
realT J_H(realT numType)
Get the interpolated absolute J-H color.
Definition: stars.hpp:423
math::gslInterpolator< math::gsl_interp_linear< double > > interpRad
The interpolator for effective Temperature.
Definition: stars.hpp:128
realT V_Rc(const std::string &spType)
Get the interpolated absolute V-Rc color.
Definition: stars.hpp:363
double m_minHKs
The minimum numeric spectral type for H-Ks color.
Definition: stars.hpp:157
std::vector< double > m_logLs
The log10 luminosities from the sequence.
Definition: stars.hpp:114
math::gslInterpolator< math::gsl_interp_linear< double > > interpVRc
The interpolator for V-Rc color.
Definition: stars.hpp:140
std::vector< double > m_V_Rcs
The V-Rc colors from the sequence.
Definition: stars.hpp:118
realT Mv(realT numType)
Get the interpolated absolute V magnitude.
Definition: stars.hpp:323
math::gslInterpolator< math::gsl_interp_linear< double > > interpHKs
The interpolator for H-Ks color.
Definition: stars.hpp:156
math::gslInterpolator< math::gsl_interp_linear< double > > interpMv
The interpolator for absolute V magnitude.
Definition: stars.hpp:136
realT logL(const std::string &spType)
Get the interpolated log of luminosity.
Definition: stars.hpp:313
realT H_Ks(realT numType)
Get the interpolated absolute H-Ks color.
Definition: stars.hpp:448
double m_maxRad
The maximum numeric spectral type for effective Temperature.
Definition: stars.hpp:130
math::gslInterpolator< math::gsl_interp_linear< double > > interpL
The interpolator for log luminosity.
Definition: stars.hpp:132
realT Mv(const std::string &spType)
Get the interpolated absolute V magnitude.
Definition: stars.hpp:338
double m_maxVKs
The maximum numeric spectral type for V-Ks color.
Definition: stars.hpp:150
math::gslInterpolator< math::gsl_interp_linear< double > > interpJH
The interpolator for J-H color.
Definition: stars.hpp:152
double m_maxHKs
The maximum numeric spectral type for H-Ks color.
Definition: stars.hpp:158
double m_minVRc
The minimum numeric spectral type for V-Rc color.
Definition: stars.hpp:141
std::vector< double > m_H_Kss
The H-Ks colors from the sequence.
Definition: stars.hpp:122
double m_maxSpTfmT
The maximum numeric spectral type for effective Temperature.
Definition: stars.hpp:163
double m_minT
The minimum numeric spectral type for effective Temperature.
Definition: stars.hpp:125
math::gslInterpolator< math::gsl_interp_linear< double > > interpT
The interpolator for effective Temperature.
Definition: stars.hpp:124
realT V_Ks(realT numType)
Get the interpolated absolute V-Ks color.
Definition: stars.hpp:398
double m_maxVRc
The maximum numeric spectral type for V-Rc color.
Definition: stars.hpp:142
realT Teff(realT numType)
Get the interpolated effective temperature.
Definition: stars.hpp:248
std::vector< double > m_rads
The radii from the sequence.
Definition: stars.hpp:115
std::vector< double > m_masses
The masses from the sequence.
Definition: stars.hpp:116
double m_minVIc
The minimum numeric spectral type for V-Ic color.
Definition: stars.hpp:145
Unit specifications and conversions.