7 std::map<std::string, boost::shared_ptr<LuaState> > ConfigurationFixture::config;
10 if(!config[Config_file]) {
17 #ifdef HAVE_FEENABLEEXCEPT 18 fedisableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
21 #ifdef HAVE_FEENABLEEXCEPT 22 feclearexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
23 feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
27 lua_config = config[Config_file]->globals()[
"config"];
29 config_absorber = lua_config[
"absorber"].value_ptr<
Absorber>();
33 config_aerosol = lua_config[
"aerosol"].value_ptr<
Aerosol>();
34 }
catch(
const std::exception& e) {
37 config_atmosphere = lua_config[
"atmosphere"].value_ptr<
RtAtmosphere>();
38 config_state_vector = lua_config[
"state_vector"].value_ptr<
StateVector>();
39 if (!lua_config[
"pinp"].is_nil())
40 config_pressure_level_input =
41 lua_config[
"pinp"].value_ptr<PressureLevelInput>();
42 config_pressure = lua_config[
"pressure"].value_ptr<
Pressure>();
43 config_register_output =
44 lua_config[
"register_output"].
45 value<std::vector<boost::shared_ptr<RegisterOutputBase> > >();
46 config_instrument = lua_config[
"instrument"].value_ptr<
Instrument>();
47 config_spectral_window = lua_config[
"spec_win"].value_ptr<
SpectralWindow>();
48 config_initial_guess =
50 config_solver = lua_config[
"conn_solver"].value_ptr<
ConnorSolver>();
54 config_ground = lua_config[
"ground"].value_ptr<
Ground>();
55 }
catch(
const std::exception& e) {
58 config_temperature = lua_config[
"temperature"].value_ptr<
Temperature>();
59 config_spectrum_sampling =
61 config_error_analysis =
65 config_forward_model = lua_config[
"forward_model"].value_ptr<
ForwardModel>();
66 config_observation = lua_config[
"observation"].value_ptr<
Observation>();
67 sv_initial.reference(config_initial_guess->initial_guess());
68 config_state_vector->update_state(sv_initial);
70 epsilon.resize(config_state_vector->observer_claimed_size());
72 epsilon(Range(0, 19)) = 1e-7;
76 epsilon(Range(23, 34)) = 1e-8;
80 for (
int i=0 ; i < config_state_vector->observer_claimed_size(); i++) {
81 std::cerr << i <<
": " << config_state_vector->
state_vector_name()(i) <<
" val = " << config_state_vector->state()(i) <<
", epsilon = " << epsilon(i) << std::endl;
There are a number of tests that need to use a standard set of objects, similar to what we generate w...
This class is responsible for setting up the atmosphere and ground information needed to run the Radi...
This is used to wrap the nominal Level 1B file reader.
ConfigurationCoxmunkFixture(const std::string &Config_file="config_coxmunk.lua")
blitz::Array< double, 1 > epsilon
This is an epsilon that can be used to generate finite difference Jacobians for unit tests...
This class maintains the ground portion of the state.
Apply value function to a blitz array.
This class maintains the aerosol portion of the state.
This runs a Radiative Transfer code to determine the reflectance for a given set of wavelengths...
This applies a instrument model to radiances.
The forward model represents the encapsulation of modeling spectra from an atmospheric state then app...
This determines the sampling of the spectrum that should be used for each of the spectrum indexes...
This class represents a the spectral window.
This handles informing a set of interested objects when the state vector has updated.
This class maintains the pressure portion of the state.
ConfigurationFixture(const std::string &Config_file="config.lua")
virtual void state_vector_name(const StateVector &Sv, blitz::Array< std::string, 1 > &Sv_name) const
Update any portion of the list of the state vector names that apply to this object.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
This calculates a variety of values to help with the error analysis of a Level 2 Full Physics Run...
This gets the initial guess and the apriori state vector values.
This class maintains the absorber portion of the state.
This class maintains the temperature portion of the state.
static boost::shared_ptr< LuaState > load_file(const std::string &Fname)
Create a new LuaState, and then open the given file.