ReFRACtor
stokes_coefficient_fraction_output.cc
Go to the documentation of this file.
2 
3 using namespace FullPhysics;
4 
5 #ifdef HAVE_LUA
6 #include "register_lua.h"
7 // Lua doesn't know to cast a pointer type of base class to a derived class.
8 // Add a conversion routine.
11  int Spec_index,
12  const std::string& Hdf_band_name)
13 {
16  (boost::dynamic_pointer_cast<StokesCoefficientFraction>(Sc), Spec_index, Hdf_band_name));
17 }
19 .scope
20 [
21  luabind::def("create", &sc_create)
22 ]
24 #endif
25 
27 public:
28  StokesCoefficientFractionOutputHelper(const boost::shared_ptr<StokesCoefficientFraction>& Sc, int Spec_index) : f_(Sc), spec_index(Spec_index) {}
29  double f() const { return f_->coefficient().value()(spec_index); }
30  double f_uncertainty() const {return f_->f_uncertainty(spec_index); }
31 private:
33  int spec_index;
34 };
35 
36 // See base class for description
37 
39 {
40  // Freeze the state
42  boost::dynamic_pointer_cast<StokesCoefficientFraction>(f->clone());
44  h(new StokesCoefficientFractionOutputHelper(ffreeze, spec_index));
45  out->register_data_source
46  ("/RetrievalResults/pol_frac_apriori_" + hdf_band_name,
48 }
49 
51 {
53  h(new StokesCoefficientFractionOutputHelper(f, spec_index));
54  out->register_data_source
55  ("/RetrievalResults/pol_frac_" + hdf_band_name,
57  out->register_data_source
58  ("/RetrievalResults/pol_frac_uncert_" + hdf_band_name,
60 }
61 
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
virtual void register_output(const boost::shared_ptr< Output > &out) const
Register portions of class that will be written to output.
virtual void register_output_apriori(const boost::shared_ptr< Output > &out) const
Register apriori portions of class.
StokesCoefficientFractionOutputHelper(const boost::shared_ptr< StokesCoefficientFraction > &Sc, int Spec_index)
This class maintains the stokes coefficient portion of the state.
As described in the Output class, we have a decentralized model of producing output for L2 Full Physi...
This registers the portions of the StokesCoefficientFraction class that should be written as output...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
#define REGISTER_LUA_END()
Definition: register_lua.h:134
def(luabind::constructor< int >()) .def("rows"

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:11