18 : l1b(level_1b), inst(instrument), grids(spectral_grids)
24 return grids->number_spectrometer();
29 return grids->low_resolution_grid(channel_index);
36 Spectrum full(inst->pixel_spectral_domain(channel_index), l1b->radiance(channel_index));
38 const std::vector<int>& plist = grids->pixel_list(channel_index);
39 Array<double, 1> res_d((
int) plist.size());
45 num_jac = full.spectral_range().data_ad().number_variable();
49 Array<double, 1> uncer;
51 if(full.spectral_range().uncertainty().rows() > 0) {
52 uncer.
resize(res_r.rows());
55 for(
int i = 0; i < res_d.rows(); ++i) {
56 res_d(i) = full.spectral_domain().data()(plist[i]);
60 if(uncer.
rows() > 0) {
61 uncer(i) = full.spectral_range().uncertainty()(plist[i]);
#define range_check(V, Min, Max)
Range check.
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
const SpectralDomain spectral_domain(int channel_index) const
The spectral grid of the radiance values, implemented by inheriting class.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Apply value function to a blitz array.
void resize(const blitz::TinyVector< int, D > &Shape, int nvar)
This is a full spectrum, which contains a SpectralRange and SpectralDomain.
We have a number of different spectrums that appear in different parts of the code.
Spectrum radiance(int channel_index, bool skip_jacobian=false) const
Measured spectrum for the given spectral channel.
int num_channels() const
Number of spectral channels.
ObservationLevel1b(const boost::shared_ptr< Level1b > &level_1b, const boost::shared_ptr< Instrument > &instrument, const boost::shared_ptr< ForwardModelSpectralGrid > &spectral_grids)
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()