8 .def(luabind::constructor<
const blitz::Array<double, 2>&,
9 const blitz::Array<double, 1>&,
const blitz::Array<bool, 1>&>())
17 (
const blitz::Array<double, 2>& Stokes_coeff_parallel,
18 const blitz::Array<double, 1>& Coeffs,
19 const blitz::Array<bool, 1>& Flag)
20 : stokes_coeff_parallel(Stokes_coeff_parallel.copy())
22 if(stokes_coeff_parallel.rows() != Coeffs.rows() ||
23 stokes_coeff_parallel.rows() != Flag.rows())
24 throw Exception(
"Stokes_coeff_parallel, Coeff, and Flag all need to have the same number of rows");
25 stokes_coeff.resize(stokes_coeff_parallel.shape(), 0);
26 stokes_coeff.value() = stokes_coeff_parallel;
27 for(
int i = 0; i < stokes_coeff.rows(); ++i) {
28 stokes_coeff.value()(i, 1) *= (1 - 2 * Coeffs(i));
29 stokes_coeff.value()(i, 2) *= (1 - 2 * Coeffs(i));
37 Os <<
"StokesCoefficientFraction:\n";
38 Os <<
" Initial parallel stokes coefficients:\n";
39 opad << stokes_coeff_parallel <<
"\n";
41 Os <<
" Coefficient:\n";
44 Os <<
" Retrieval flag:\n";
47 Os <<
" Stokes coefficient:\n";
This is a filtering stream that adds a pad to the front of every line written out.
This class maintains the stokes coefficient portion of the state.
This is the base of the exception hierarchy for Full Physics code.
ArrayAd< double, 2 > stokes_coeff
The cached stokes coefficient.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
const blitz::Array< T, D+1 > jacobian() const
virtual boost::shared_ptr< StokesCoefficient > clone() const
Clone a StokesCoefficient object.
const blitz::Array< T, D > & value() const
This class maintains the stokes coefficient portion of the state.
virtual void calc_stokes_coeff() const
Derived classes should provide a function to fill in pgrid when this is called.
blitz::Array< bool, 1 > used_flag
Flag indicating which of the coefficients gets updated by the StateVector.
StokesCoefficientFraction(const blitz::Array< double, 2 > &Stokes_coeff_parallel, const blitz::Array< double, 1 > &Coeffs, const blitz::Array< bool, 1 > &Flag)
Constructor.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
virtual void print(std::ostream &Os) const
Print to stream.
ArrayAd< double, 1 > coeff
Coefficients.
virtual ArrayAd< double, 2 > stokes_coefficient() const
Return Stokes coefficients used to go from Stokes vector to scalar reflectance.