10 double band_ref_conv = band_ref.convert_wave(Grid.
units()).
value;
12 Poly1d scaling_poly(scaling_coeff.value(),
false);
14 for(
int i = 0; i < Radiance.
data().rows(); ++i) {
15 double scale_factor = scaling_poly(Grid.
data()(i) - band_ref_conv);
16 Radiance.
data()(i) = Radiance.
data()(i) * scale_factor + offset.value();
20 Poly1d scaling_poly(scaling_coeff,
false);
22 for(
int i = 0; i < Radiance.
data_ad().
rows(); ++i) {
24 Radiance.
data_ad()(i) = Radiance.
data_ad()(i) * scale_factor + offset;
32 Poly1d scaling_poly(scaling_coeff.value(),
false);
33 Os <<
"RadianceScaling:" << std::endl;
35 opad <<
"Band: " << band_name << std::endl
36 <<
"Scaling polynomial:" << std::endl
37 <<
" " << scaling_poly << std::endl
38 <<
"Offset: " << offset.value() << std::endl;
virtual void apply_scaling(const SpectralDomain &Grid, SpectralRange &Radiance) const
Apply scaling and offset coefficients to Radiance.
virtual void print(std::ostream &Os) const
This is a filtering stream that adds a pad to the front of every line written out.
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
const ArrayAd< double, 1 > & data_ad() const
Underlying data, possibly with a Jacobian.
Apply value function to a blitz array.
A one-dimensional polynomial class.
int number_variable() const
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.
const Unit units() const
Units that go with data()
Contains classes to abstract away details in various Spurr Radiative Transfer software.
double value(const FullPhysics::AutoDerivative< double > &Ad)
const blitz::Array< double, 1 > & data() const
Underlying data.
const blitz::Array< double, 1 > & data() const
Return data.