ReFRACtor
|
This gives the upper and lower bounds of the SpectralWindow. More...
#include <spectral_bound.h>
Public Member Functions | |
SpectralBound () | |
Default constructor. More... | |
SpectralBound (const std::vector< DoubleWithUnit > &Lower_bound, const std::vector< DoubleWithUnit > &Upper_bound) | |
Constructor. More... | |
SpectralBound (const ArrayWithUnit< double, 2 > &Bound) | |
Variation of constructor that takes data as an ArrayWithUnit. More... | |
virtual | ~SpectralBound () |
DoubleWithUnit | center (int Spec_index, const Unit &U) const |
Center between lower_bound and upper_bound. More... | |
DoubleWithUnit | lower_bound (int Spec_index) const |
Lower bound of window slot. More... | |
DoubleWithUnit | lower_bound (int Spec_index, const Unit &U) const |
Lower bound but with a unit conversion first in case the conversion reverses ordering. More... | |
int | number_spectrometer () const |
Number of spectrometers. More... | |
virtual void | print (std::ostream &Os) const |
std::string | print_to_string () const |
Print to string. More... | |
int | spectral_index (const DoubleWithUnit &W) const |
Determine spectral index for given wavenumber/wavelength, or return -1 if it doesn't fit in any spectral index. More... | |
DoubleWithUnit | upper_bound (int Spec_index) const |
Upper bound of window slot. More... | |
DoubleWithUnit | upper_bound (int Spec_index, const Unit &U) const |
Upper bound but with a unit conversion first in case the conversion reverses ordering. More... | |
This gives the upper and lower bounds of the SpectralWindow.
Lower_bound and upper_bound are just meant to give a rough idea of the band covered by a spectral window, there is no guarantee that lower_bound() + delta or upper_band() - delta will pass the grid_indexes test of the SpectralWindow. But the reverse is guaranteed, any value < lower_bound or >= upper_bound will certainly not pass grid_indexes test.
Note that there are a few closely related classes, with similar sounding names. See Spectrum related classes for a description of each of these.
Definition at line 25 of file spectral_bound.h.
|
inline |
Default constructor.
Definition at line 31 of file spectral_bound.h.
SpectralBound::SpectralBound | ( | const std::vector< DoubleWithUnit > & | Lower_bound, |
const std::vector< DoubleWithUnit > & | Upper_bound | ||
) |
Constructor.
Definition at line 19 of file spectral_bound.cc.
SpectralBound::SpectralBound | ( | const ArrayWithUnit< double, 2 > & | Bound | ) |
Variation of constructor that takes data as an ArrayWithUnit.
Definition at line 36 of file spectral_bound.cc.
|
inlinevirtual |
Definition at line 36 of file spectral_bound.h.
|
inline |
Center between lower_bound and upper_bound.
Turns out we need this often enough to be worth wrapping in a function.
Definition at line 49 of file spectral_bound.h.
|
inline |
Lower bound of window slot.
Definition at line 59 of file spectral_bound.h.
|
inline |
Lower bound but with a unit conversion first in case the conversion reverses ordering.
Definition at line 70 of file spectral_bound.h.
|
inline |
Number of spectrometers.
Definition at line 42 of file spectral_bound.h.
|
virtual |
Definition at line 62 of file spectral_bound.cc.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
int SpectralBound::spectral_index | ( | const DoubleWithUnit & | W | ) | const |
Determine spectral index for given wavenumber/wavelength, or return -1 if it doesn't fit in any spectral index.
Definition at line 53 of file spectral_bound.cc.
|
inline |
Upper bound of window slot.
Definition at line 82 of file spectral_bound.h.
|
inline |
Upper bound but with a unit conversion first in case the conversion reverses ordering.
Definition at line 93 of file spectral_bound.h.