3 #include <boost/foreach.hpp> 23 Instrument_correction)
24 : ils_(Ils_list), inst_corr(Instrument_correction)
26 if(inst_corr.size() == 0)
27 inst_corr.resize(ils_.size());
28 if(ils_.size() != inst_corr.size())
29 throw Exception(
"Ils and Instrument_correction need to be the same size");
31 i->add_observer(*
this);
35 j->add_observer(*
this);
41 std::vector<boost::shared_ptr<Ils> > ils_vec;
43 ils_vec.push_back(i->clone());
44 std::vector<std::vector<boost::shared_ptr<InstrumentCorrection> > >
48 std::vector<boost::shared_ptr<InstrumentCorrection> > t;
50 t.push_back(j->clone());
51 inst_corr_vec.push_back(t);
59 const Spectrum& High_resolution_spectrum,
60 const std::vector<int>& Pixel_list,
66 blitz::Array<double, 1> res_sd((
int) Pixel_list.size());
67 for(
int i = 0; i < res_sd.rows(); ++i)
68 res_sd(i) = full.
data()(Pixel_list[i]);
75 number_variable() > 0) {
77 ils_[Spec_index]->apply_ils
84 Array<double, 1>
rad =
85 ils_[Spec_index]->apply_ils
93 inst_corr[Spec_index])
94 i->apply_correction(ils_[Spec_index]->pixel_grid(), Pixel_list, res_sr);
101 Os <<
"IlsInstrument:\n";
105 opad << *ils_[i] <<
"\n";
#define range_check(V, Min, Max)
Range check.
virtual int number_spectrometer() const
Give number of spectrometers.
virtual Spectrum apply_instrument_model(const Spectrum &High_resolution_spectrum, const std::vector< int > &Pixel_list, int Spec_index) const
Apply the instrument model to both the radiance and derivatives.
IlsInstrument(const std::vector< boost::shared_ptr< Ils > > &Ils_list, const std::vector< std::vector< boost::shared_ptr< InstrumentCorrection > > > &Instrument_correction=std::vector< std::vector< boost::shared_ptr< InstrumentCorrection > > >())
Constructor.
This is a filtering stream that adds a pad to the front of every line written out.
virtual void print(std::ostream &Os) const
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
This is a instrument that uses a Ils object for each spectrometer to model the instrument.
This is the base of the exception hierarchy for Full Physics code.
const SpectralRange & spectral_range() const
Spectral range (e.g, radiance values)
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Apply value function to a blitz array.
const Unit & units() const
Units of data.
This applies a instrument model to radiances.
This is a full spectrum, which contains a SpectralRange and SpectralDomain.
virtual std::string band_name(int Spec_index) const
Band name for given Spec_index.
We have a number of different spectrums that appear in different parts of the code.
const ArrayAd< double, 1 > & data_ad() const
Underlying data, possibly with a Jacobian.
virtual SpectralDomain pixel_spectral_domain(int Spec_index) const
This is the pixel wavenumber/wavelength for each pixel.
const Unit units() const
Units that go with data()
virtual boost::shared_ptr< Instrument > clone() const
Clone an Instrument object.
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 Unit rad("rad", 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0)
const blitz::Array< double, 1 > & data() const
Underlying data.
const blitz::Array< double, 1 > & data() const
Return data.