11 : fm(forward_model), obs(observation), sv(state_vector),
12 meas_units(obs->radiance_all().spectral_range().
units())
32 if((
K.size() <= 0) or (
M.size() <= 0))
38 return sv->observer_claimed_size();
53 Array<double, 1> temp_msrmnt(
obs->radiance_all().spectral_range().data());
54 if(
msrmnt.rows() != temp_msrmnt.rows())
55 throw Exception(
"Measurement has changed during the retrieval. :( ");
56 double msrmnt_L1_norm = sum(abs(
msrmnt));
57 if(msrmnt_L1_norm <= 0.0)
58 throw Exception(
"Measurement has no signal (just 0). :( ");
59 if( sum(abs(temp_msrmnt-
msrmnt))/msrmnt_L1_norm > 0.0000001 )
60 throw Exception(
"Measurement has changed during the retrieval. :( ");
62 Spectrum rad_spec =
fm->radiance_all(Skip_jacobian);
90 if(
K.size() <= 0)
return;
98 Array<bool, 1> used(
sv->used_flag());
99 if(used.rows() !=
K.cols())
100 throw Exception(
"Columns of Jacobian and elements of used-flag not equal in numbers! :( ");
101 for(
int i=0; i<used.rows(); i++)
102 if(!used(i))
K(Range::all(),i) = 0.0;
boost::shared_ptr< StateVector > sv
boost::shared_ptr< ForwardModel > fm
virtual void assert_parameter_set_correctly() const
Checks that the parameters are set correctly.
virtual void assert_jacobian_correct(const blitz::Array< double, 2 > &k) const
Conditions that must be satisfied when a derived class computes the Jacobian of the model...
blitz::Array< double, 1 > X
virtual blitz::Array< double, 1 > parameters() const
Returns the current parameters.
virtual void model_jacobian_eval()
Evaluates the model and its Jacobian at the currently set parameter values.
boost::shared_ptr< Observation > obs
This is the base of the exception hierarchy for Full Physics code.
const SpectralRange & spectral_range() const
Spectral range (e.g, radiance values)
const blitz::Array< T, D+1 > jacobian() const
Apply value function to a blitz array.
virtual void vanishing_params_update()
const blitz::Array< T, D > & value() const
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.
void radiance_from_fm(bool Skip_jacobian=false)
const ArrayAd< double, 1 > & data_ad() const
Underlying data, possibly with a Jacobian.
blitz::Array< double, 2 > K
blitz::Array< double, 1 > M
Contains classes to abstract away details in various Spurr Radiative Transfer software.
virtual void assert_model_correct(const blitz::Array< double, 1 > &m) const
Conditions that must be satisfied when a derived class computes the model.
virtual blitz::Array< double, 1 > parameters() const
Just returns the current values of parameters.
virtual int expected_parameter_size() const
Returns the expected size of the parameters.
blitz::Array< double, 1 > msrmnt
virtual bool parameters_different(const blitz::Array< double, 1 > &x) const
Checks whether or not new input parameters are different from the current ones.
virtual void jacobian_eval()
Evaluates the Jacobian of the model at the currently set parameter values.
SpectralRange convert(const Unit &R) const
Convert to given units.
virtual void model_eval()
Evaluates the model at the currently set parameter values.