1 #ifndef CONNOR_COST_FUNCTION 2 #define CONNOR_COST_FUNCTION 7 #include <boost/shared_ptr.hpp> 16 : statev(Sv), forward_model(fm), meas(inst_meas)
21 blitz::Array<double, 1>& Residual,
22 blitz::Array<double, 1>& Se,
23 blitz::Array<double, 2>& Jacobian)
const 25 using namespace blitz;
26 statev->update_state(X);
27 SpectralRange rad_meas = meas->radiance_all().spectral_range();
28 Spectrum rad_spec = forward_model->radiance_all();
31 Se.resize(rad_meas.
data().rows());
32 Residual.resize(rad_meas.
data().rows());
35 throw Exception(
"Radiance uncertainty is empty in ConnorCostFunction");
38 Residual = rad_mod.
data() - rad_meas.
data();
41 virtual void print(std::ostream& Os)
const 43 Os <<
"ConnorCostFunction";
virtual void print(std::ostream &Os) const
Print description of object.
virtual ~ConnorCostFunction()
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
ConnorCostFunction(const boost::shared_ptr< StateVector > &Sv, const boost::shared_ptr< ForwardModel > &fm, const boost::shared_ptr< Observation > &inst_meas)
Apply value function to a blitz array.
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 void cost_function(const blitz::Array< double, 1 > &X, blitz::Array< double, 1 > &Residual, blitz::Array< double, 1 > &Se, blitz::Array< double, 2 > &Jacobian) const
For the given value of X, calculate the residuals and jacobians.
This class calculates a cost function, along with a jacobian.
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.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
SpectralRange convert(const Unit &R) const
Convert to given units.
const blitz::Array< double, 1 > & data() const
Underlying data.