23 std::vector<int> gi = grid_indexes(Grid, Spec_index);
24 Array<double, 1> res((
int) gi.size());
27 sind.resize((
int) gi.size());
28 for(
int i = 0; i < res.rows(); ++i) {
29 res(i) = Grid.
data()(gi[i]);
45 Array<double, 1> res_d((
int) gi.size());
48 Array<double, 1> uncer;
50 uncer.
resize(res_r.rows());
53 sind.resize((
int) gi.size());
54 for(
int i = 0; i < res_d.rows(); ++i) {
virtual SpectralBound spectral_bound() const =0
Bounds of spectral window.
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
const SpectralRange & spectral_range() const
Spectral range (e.g, radiance values)
virtual std::vector< int > grid_indexes(const SpectralDomain &Grid, int Spec_index) const =0
Given a list of wavenumbers, this returns the indices that fall within the window.
#define REGISTER_LUA_CLASS(X)
Apply value function to a blitz array.
void resize(const blitz::TinyVector< int, D > &Shape, int nvar)
const Unit & units() const
Units of data.
This is a full spectrum, which contains a SpectralRange and SpectralDomain.
const blitz::Array< double, 1 > & uncertainty() const
Uncertainty.
virtual int number_spectrometer() const =0
Number of spectrometers.
This class represents a the spectral window.
int number_variable() const
We have a number of different spectrums that appear in different parts of the code.
const blitz::Array< int, 1 > & sample_index() const
Return sample index.
const ArrayAd< double, 1 > & data_ad() const
Underlying data, possibly with a Jacobian.
const Unit units() const
Units that go with data()
SpectralDomain apply(const SpectralDomain &Grid, int Spec_index) const
Apply a spectral window to a SpectralDomain, returning the possibly empty part of the domain that pas...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
const SpectralDomain & spectral_domain() const
Spectral domain (i.e., wavenumber or wavelength).
const blitz::Array< double, 1 > & data() const
Return data.