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

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

A spectrum from the Pickles library.

Definition at line 243 of file astroSpectra.hpp.

#include <astro/astroSpectra.hpp>

Public Types

typedef std::string paramsT
 The Pickles spectra are parameterized by a spectral type string. More...
 

Static Public Member Functions

static std::string fileName (const std::string &spt)
 The name of the datafile is constructed from its spectral type string. More...
 
static int readSpectrum (std::vector< realT > &rawLambda, std::vector< realT > &rawSpectrum, const std::string &path, const paramsT &params)
 Read a Pickles spectrum, which for these purposes 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>(1)
 The Pickles spectra are dimensionless. More...
 
static constexpr const char * dataDirEnvVar = "PICKLES_DATADIR"
 The Pickles spectra location is specified by the PICKLES_DATADIR environment variable. More...
 

Member Typedef Documentation

◆ paramsT

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

The Pickles spectra are parameterized by a spectral type string.

Definition at line 250 of file astroSpectra.hpp.

Member Function Documentation

◆ fileName()

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

The name of the datafile is constructed from its spectral type string.

Definition at line 262 of file astroSpectra.hpp.

References mx::ioutils::toLower().

◆ readSpectrum()

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

Read a Pickles spectrum, which for these purposes 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 268 of file astroSpectra.hpp.

References mx::ioutils::readColumns().

Member Data Documentation

◆ dataDirEnvVar

template<typename _units >
constexpr const char* mx::astro::picklesSpectrum< _units >::dataDirEnvVar = "PICKLES_DATADIR"
staticconstexpr

The Pickles spectra location is specified by the PICKLES_DATADIR environment variable.

Definition at line 259 of file astroSpectra.hpp.

◆ fluxUnits

template<typename _units >
constexpr realT mx::astro::picklesSpectrum< _units >::fluxUnits = static_cast<realT>(1)
staticconstexpr

The Pickles spectra are dimensionless.

Definition at line 256 of file astroSpectra.hpp.

◆ wavelengthUnits

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

Convert from A to SI m.

Definition at line 253 of file astroSpectra.hpp.


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