mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
A class to manage interpolation in separation and phase on the albedo spectrum grid from Cahoy et al (2010) [2].
Usage:
After the above steps you now have the Ag spectrum at 1.0 AU and 0.1 radians phase on the lambda scale.
Definition at line 121 of file cahoyAlbedos.hpp.
#include <astro/cahoyAlbedos.hpp>
Public Member Functions | |
int | loadGrid (int metal, std::vector< realT > &lambda) |
Load the grid into memory for one of the metallicities and pre-interpolate onto the wavelength scale. More... | |
int | setParameters (const paramsT ¶ms) |
Set the separatio and phase of the spectrum. More... | |
int | setSpectrum (std::vector< realT > &lambda) |
Get an interpolated spectrum at arbitrary non-grid point using bilinear interpolation. More... | |
Public Member Functions inherited from mx::astro::baseSpectrum< _units::realT > | |
size_t | size () |
Get the current size of the spectrum. More... | |
_units::realT & | operator[] (size_t i) |
Access a single point in the spectrum, specified by its vector index. More... | |
const _units::realT | operator[] (size_t i) const |
Access a single point in the spectrum, specified by its vector index. More... | |
baseSpectrum< _units::realT > | operator* (const compSpectrumT &spec) |
Multiply two spectra together. More... | |
_units::realT | mean () |
Calculate the mean value of the spectrum. More... | |
_units::realT | mean (const compSpectrumT &T) |
Calculate the mean value of the spectrum when mutiplied by another. More... | |
void | charTrans (_units::realT &lambda0, _units::realT &weff, _units::realT &max, _units::realT &fwhm, std::vector< _units::realT > &lambda) |
Characterize the spectrum as a filter transmission curve. More... | |
void | charFlux (_units::realT &flambda0, _units::realT &fnu0, _units::realT &fphot0, const _units::realT &lambda_0, const std::vector< _units::realT > &lambda, const filterT &trans) |
Characterize the flux densities of the spectrum w.r.t. a filter transmission curve. More... | |
void | charFlux (_units::realT &flambda0, _units::realT &fnu0, _units::realT &fphot0, const _units::realT &lambda_0, const std::vector< _units::realT > &lambda, const std::vector< _units::realT > &trans) |
Characterize the flux densities of the spectrum w.r.t. a filter transmission curve. More... | |
Additional Inherited Members | |
Public Attributes inherited from mx::astro::baseSpectrum< _units::realT > | |
std::vector< _units::realT > | _spectrum |
Contains the spectrum after it is set. More... | |
|
inline |
Load the grid into memory for one of the metallicities and pre-interpolate onto the wavelength scale.
[in] | metal | the metalicity, can be 1, 3, 10 or 30. |
[in] | lambda | the wavelength scale. |
Definition at line 141 of file cahoyAlbedos.hpp.
References mx::astro::baseSpectrum< _units::realT >::_spectrum, mx::astro::baseSpectrum< realT >::_spectrum, mx::astro::astroSpectrum< _spectrumT, freq >::setParameters(), and mx::astro::astroSpectrum< _spectrumT, freq >::setSpectrum().
|
inline |
Set the separatio and phase of the spectrum.
[in] | params | Struct containting the separation and phase of the spectrum |
Definition at line 176 of file cahoyAlbedos.hpp.
|
inline |
Get an interpolated spectrum at arbitrary non-grid point using bilinear interpolation.
If outside the endpoints of the grid, the grid is simply extended (i.e. constant albedo).
[in] | lambda | the wavelength grid. Must be the same as used for construction and/or openGrid |
Definition at line 186 of file cahoyAlbedos.hpp.
References mx::astro::baseSpectrum< _units::realT >::_spectrum.