mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches

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 210 of file astroSpectra.hpp.

#include <astro/astroSpectra.hpp>

Public Types

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

Static Public Member Functions

static std::string fileName (const std::string &name)
 The file name is found from the star's name.
static error_t 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.

Static Public Attributes

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

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 217 of file astroSpectra.hpp.

Member Function Documentation

◆ fileName()

template<typename _units>
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 229 of file astroSpectra.hpp.

◆ readSpectrum()

template<typename _units>
error_t 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. Should be empty on input.
[out]rawSpectrumthe raw spectrum. Should be empty on input.
[in]paththe full path to the file.
[in]paramsthe parameters needed to construct the spectrum

Definition at line 242 of file astroSpectra.hpp.

References mx::ioutils::readColumns().

Member Data Documentation

◆ fluxUnits

template<typename _units>
realT mx::astro::calspecSpectrum< _units >::fluxUnits
staticconstexpr
Initial value:
=
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.

Definition at line 223 of file astroSpectra.hpp.

◆ wavelengthUnits

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

Convert from A to SI m.

Definition at line 220 of file astroSpectra.hpp.


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