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

template<typename _units, bool _rsr = true>
struct mx::astro::sqWaveFilter< _units, _rsr >

A square-wave filter spectrum.

Parameters specify the central wavelength, width, and sampling (all in microns) of a square-wave type filter.

To create this filter:

typedef double realT;
realT lam0 = 0.5; //Central wavelength in microns
realT fw = 0.05; //Full-width, in microns.
realT dlam = 0.001; //Delta-lambda for specifying the defining points. See note.
filt.setSpectrum(grid_meters); // grid_meters is a vector<realT> specifying the wavelength grid in meters
Class to manage an astronomical spectrum.
error_t setSpectrum(gridT &lambda)
Load the spectrum and interpolate it onto a wavelength scale.

Note that dlam specifies how sharp the filter edges are when interpolated. Larger values will make the filter more trapezoidal.

Definition at line 148 of file astroSpectra.hpp.

#include <astro/astroSpectra.hpp>

Classes

struct  paramsT
 The square wave is parameterized by the central wavelength, width, and sampling (all in microns). More...

Static Public Member Functions

static error_t readSpectrum (std::vector< realT > &rawLambda, std::vector< realT > &rawSpectrum, const std::string &path, const paramsT &params)

Static Public Attributes

static constexpr realT wavelengthUnits = static_cast<realT>( 1e6 )
 Convert from um to SI m.
static constexpr realT fluxUnits = static_cast<realT>( 1 )
 No conversion is performed on filter transmission.

Member Function Documentation

◆ readSpectrum()

template<typename _units, bool _rsr = true>
error_t mx::astro::sqWaveFilter< _units, _rsr >::readSpectrum ( std::vector< realT > & rawLambda,
std::vector< realT > & rawSpectrum,
const std::string & path,
const paramsT & params )
inlinestatic
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 176 of file astroSpectra.hpp.

References mx::astro::sqWaveFilter< _units, _rsr >::paramsT::dlam, mx::astro::sqWaveFilter< _units, _rsr >::paramsT::fw, mx::astro::sqWaveFilter< _units, _rsr >::paramsT::lam0, and mx::noerror.

Member Data Documentation

◆ fluxUnits

template<typename _units, bool _rsr = true>
realT mx::astro::sqWaveFilter< _units, _rsr >::fluxUnits = static_cast<realT>( 1 )
staticconstexpr

No conversion is performed on filter transmission.

Definition at line 167 of file astroSpectra.hpp.

◆ wavelengthUnits

template<typename _units, bool _rsr = true>
realT mx::astro::sqWaveFilter< _units, _rsr >::wavelengthUnits = static_cast<realT>( 1e6 )
staticconstexpr

Convert from um to SI m.

Definition at line 164 of file astroSpectra.hpp.


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