|
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 120 of file cahoyAlbedos.hpp.
#include <astro/cahoyAlbedos.hpp>
Inheritance diagram for mx::astro::cahoyGrid< _units >: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. | |
| int | setParameters (const paramsT ¶ms) |
| Set the separatio and phase of the spectrum. | |
| int | setSpectrum (std::vector< realT > &lambda) |
| Get an interpolated spectrum at arbitrary non-grid point using bilinear interpolation. | |
Public Member Functions inherited from mx::astro::baseSpectrum< _units::realT > | |
| size_t | size () |
| Get the current size of the spectrum. | |
| _units::realT & | operator[] (size_t i) |
| Access a single point in the spectrum, specified by its vector index. | |
| const _units::realT | operator[] (size_t i) const |
| Access a single point in the spectrum, specified by its vector index. | |
| baseSpectrum< _units::realT > | operator* (const compSpectrumT &spec) |
| Multiply two spectra together. | |
| _units::realT | mean () |
| Calculate the mean value of the spectrum. | |
| _units::realT | mean (const compSpectrumT &T) |
| Calculate the mean value of the spectrum when mutiplied by another. | |
| 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. | |
| 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. | |
| 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. | |
Additional Inherited Members | |
Public Attributes inherited from mx::astro::baseSpectrum< _units::realT > | |
| std::vector< _units::realT > | _spectrum |
| Contains the spectrum after it is set. | |
|
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 140 of file cahoyAlbedos.hpp.
References mx::astro::baseSpectrum< _units::realT >::_spectrum, mx::astro::baseSpectrum< realT >::_spectrum, MXE_FILERERR, mxError, 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 193 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 203 of file cahoyAlbedos.hpp.
References mx::astro::baseSpectrum< _units::realT >::_spectrum, MXE_INVALIDARG, mxError, and mx::math::six_fifths().