19 (
const std::vector<DoubleWithUnit>& Lower_bound,
20 const std::vector<DoubleWithUnit>& Upper_bound
22 :lower_b(Lower_bound), upper_b(Upper_bound)
24 if(lower_b.size() != upper_b.size())
25 throw Exception(
"Lower bound and upper bound need to be the same size");
26 for(std::vector<DoubleWithUnit>::size_type i = 0;
27 i < lower_b.size(); ++i)
28 if(lower_b[i].
value > upper_b[i].convert_wave(lower_b[i].
units).value)
29 throw Exception(
"Lower bound needs to be less than upper bound");
39 throw Exception(
"Bound must have cols of 2");
40 for(
int i = 0; i < Bound.
rows(); ++i) {
42 throw Exception(
"Lower bound needs to be less than upper bound");
43 lower_b.push_back(Bound(i, 0));
44 upper_b.push_back(Bound(i, 1));
64 Os <<
"SpectralBound:\n" 67 Os <<
" [" << i <<
"]: (" << lower_b[i] <<
", " 68 << upper_b[i] <<
")\n";
SpectralBound()
Default constructor.
We frequently have a array of numbers with units associated with them.
This is the base of the exception hierarchy for Full Physics code.
blitz::Array< T, D > value
#define REGISTER_LUA_CLASS(X)
DoubleWithUnit lower_bound(int Spec_index) const
Lower bound of window slot.
int spectral_index(const DoubleWithUnit &W) const
Determine spectral index for given wavenumber/wavelength, or return -1 if it doesn't fit in any spect...
This gives the upper and lower bounds of the SpectralWindow.
We frequently have a double with units associated with it.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
int number_spectrometer() const
Number of spectrometers.
double value(const FullPhysics::AutoDerivative< double > &Ad)
virtual void print(std::ostream &Os) const
DoubleWithUnit upper_bound(int Spec_index) const
Upper bound of window slot.