mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::astro::calspecSpectrum< _units > Struct Template Reference

template<typename _units>
struct mx::astro::calspecSpectrum< _units >

A spectrum from the HST calspec library.

See http://www.stsci.edu/hst/observatory/crds/calspec.html

Definition at line 201 of file astroSpectra.hpp.

#include <astro/astroSpectra.hpp>

Public Types

typedef std::string paramsT
 The calspec Spectra are parameterized by star name. More...
 

Static Public Member Functions

static std::string fileName (const std::string &name)
 The file name is found from the star's name. More...
 
static int readSpectrum (std::vector< realT > &rawLambda, std::vector< realT > &rawSpectrum, const std::string &path, const paramsT &params)
 Read a CALSPEC spectrum, which is a simple two column ASCII format. More...
 

Static Public Attributes

static constexpr realT wavelengthUnits = static_cast<realT>(1e10)
 Convert from A to SI m. More...
 
static constexpr realT fluxUnits = static_cast<realT>(1e7) / (static_cast<realT>(1e4)*static_cast<realT>(1e10))
 Convert from erg s-1 cm-2 A-1 to SI W m-3. More...
 

Member Typedef Documentation

◆ paramsT

template<typename _units >
typedef std::string mx::astro::calspecSpectrum< _units >::paramsT

The calspec Spectra are parameterized by star name.

Definition at line 208 of file astroSpectra.hpp.

Member Function Documentation

◆ fileName()

template<typename _units >
static std::string mx::astro::calspecSpectrum< _units >::fileName ( const std::string &  name)
inlinestatic

The file name is found from the star's name.

Definition at line 219 of file astroSpectra.hpp.

◆ readSpectrum()

template<typename _units >
static int mx::astro::calspecSpectrum< _units >::readSpectrum ( std::vector< realT > &  rawLambda,
std::vector< realT > &  rawSpectrum,
const std::string &  path,
const paramsT params 
)
inlinestatic

Read a CALSPEC spectrum, which is a simple two column ASCII format.

Parameters
[out]rawLambdathe raw wavelength vector. This should be an empty vector on input.
[out]rawSpectrumthe raw spectrum. This should be an empty vector on input.
[in]paththe full path to the file.
[in]paramsthe parameters are passed in case needed to construct the spectrum

Definition at line 227 of file astroSpectra.hpp.

References mx::ioutils::readColumns().

Member Data Documentation

◆ fluxUnits

template<typename _units >
constexpr realT mx::astro::calspecSpectrum< _units >::fluxUnits = static_cast<realT>(1e7) / (static_cast<realT>(1e4)*static_cast<realT>(1e10))
staticconstexpr

Convert from erg s-1 cm-2 A-1 to SI W m-3.

Definition at line 214 of file astroSpectra.hpp.

◆ wavelengthUnits

template<typename _units >
constexpr realT mx::astro::calspecSpectrum< _units >::wavelengthUnits = static_cast<realT>(1e10)
staticconstexpr

Convert from A to SI m.

Definition at line 211 of file astroSpectra.hpp.


The documentation for this struct was generated from the following file: