ReFRACtor
|
This is the forward model used form GOSAT/OCO. More...
#include <standard_forward_model.h>
Public Member Functions | |
StandardForwardModel (const boost::shared_ptr< Instrument > &Inst, const boost::shared_ptr< SpectralWindow > &Spectral_window, const boost::shared_ptr< RadiativeTransfer > &Rt, const boost::shared_ptr< SpectrumSampling > &Spectrum_sampling, const std::vector< std::vector< boost::shared_ptr< SpectrumEffect > > > &Spectrum_effect=std::vector< std::vector< boost::shared_ptr< SpectrumEffect > > >()) | |
Constructor. More... | |
virtual | ~StandardForwardModel () |
virtual void | add_observer (Observer< boost::shared_ptr< NamedSpectrum > > &Obs) |
Required observable functions. More... | |
void | add_observer_and_keep_reference (boost::shared_ptr< Observer< boost::shared_ptr< NamedSpectrum > > > &Obs) |
Add an observer and keep a reference to it. More... | |
Spectrum | apply_spectrum_corrections (const Spectrum &highres_spec, int channel_index) const |
Applies corrections and modeling to modeled spectrum: More... | |
const boost::shared_ptr< Instrument > & | instrument () const |
void | instrument (const boost::shared_ptr< Instrument > &V) |
void | notify_spectrum_update (const Spectrum &updated_spec, const std::string &spec_name, int channel_index) const |
virtual int | num_channels () const |
The number of spectral channels associated with forward model. More... | |
virtual void | print (std::ostream &Os) const |
std::string | print_to_string () const |
Print to string. More... | |
virtual Spectrum | radiance (int channel_index, bool Skip_jacobian=false) const |
Spectrum for the given spectral band. More... | |
virtual Spectrum | radiance_all (bool skip_jacobian=false) const |
Radiance data all stacked together as one long spectrum (so band 0, followed by band 1, etc.). More... | |
const boost::shared_ptr< RadiativeTransfer > & | radiative_transfer () const |
void | radiative_transfer (const boost::shared_ptr< RadiativeTransfer > &V) |
virtual void | remove_observer (Observer< boost::shared_ptr< NamedSpectrum > > &Obs) |
Remove an observer. More... | |
virtual void | setup_grid () |
This notifies the forward model that it should setup the grid. More... | |
virtual const SpectralDomain | spectral_domain (int channel_index) const |
Spectral domain for the given spectral band. More... | |
virtual SpectralDomain::TypePreference | spectral_domain_type_preference () const |
Type preference for spectral domain. More... | |
const boost::shared_ptr< ForwardModelSpectralGrid > & | spectral_grid () const |
const boost::shared_ptr< SpectralWindow > & | spectral_window () const |
void | spectral_window (const boost::shared_ptr< SpectralWindow > &V) |
const std::vector< std::vector< boost::shared_ptr< SpectrumEffect > > > & | spectrum_effect () const |
const boost::shared_ptr< SpectrumSampling > & | spectrum_sampling () const |
void | spectrum_sampling (const boost::shared_ptr< SpectrumSampling > &V) |
virtual const boost::optional< blitz::Range > | stacked_pixel_range (int channel_index) const |
The range of indicies that corresponds to a particular band in the stacked radiances. More... | |
Protected Member Functions | |
void | add_observer_do (Observer< boost::shared_ptr< NamedSpectrum > > &Obs, boost::shared_ptr< NamedSpectrum > &t) |
Add an observer. More... | |
void | add_observer_do (Observer< boost::shared_ptr< NamedSpectrum > > &Obs) |
void | clean_dead_ptr () |
Remove any dead pointers. More... | |
void | notify_update_do (const boost::shared_ptr< NamedSpectrum > &Self) |
Function to call to notify Observers of a state change. More... | |
void | remove_observer_do (Observer< boost::shared_ptr< NamedSpectrum > > &Obs, boost::shared_ptr< NamedSpectrum > &t) |
Remove an observer. More... | |
void | remove_observer_do (Observer< boost::shared_ptr< NamedSpectrum > > &Obs) |
Protected Attributes | |
std::list< boost::weak_ptr< Observer< boost::shared_ptr< NamedSpectrum > > > > | olist |
std::vector< boost::shared_ptr< Observer< boost::shared_ptr< NamedSpectrum > > > > | ref_list |
This is the forward model used form GOSAT/OCO.
This is fairly general, we may want to rename this at some point if we use it for other instruments.
Definition at line 23 of file standard_forward_model.h.
StandardForwardModel::StandardForwardModel | ( | const boost::shared_ptr< Instrument > & | Inst, |
const boost::shared_ptr< SpectralWindow > & | Spectral_window, | ||
const boost::shared_ptr< RadiativeTransfer > & | Rt, | ||
const boost::shared_ptr< SpectrumSampling > & | Spectrum_sampling, | ||
const std::vector< std::vector< boost::shared_ptr< SpectrumEffect > > > & | Spectrum_effect = std::vector<std::vector<boost::shared_ptr<SpectrumEffect> > >() |
||
) |
Constructor.
Definition at line 23 of file standard_forward_model.cc.
|
inlinevirtual |
Definition at line 33 of file standard_forward_model.h.
|
inlinevirtual |
Required observable functions.
Implements FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >.
Definition at line 116 of file standard_forward_model.h.
|
inlineinherited |
Add an observer and keep a reference to it.
See the discussion in the Observer class description for details.
Definition at line 107 of file observer.h.
|
inlineprotectedinherited |
Add an observer.
Definition at line 148 of file observer.h.
|
inlineprotectedinherited |
Definition at line 159 of file observer.h.
Spectrum StandardForwardModel::apply_spectrum_corrections | ( | const Spectrum & | highres_spec, |
int | channel_index | ||
) | const |
Applies corrections and modeling to modeled spectrum:
Definition at line 64 of file standard_forward_model.cc.
|
inlineprotectedinherited |
Remove any dead pointers.
Definition at line 196 of file observer.h.
|
inline |
Definition at line 69 of file standard_forward_model.h.
|
inline |
Definition at line 74 of file standard_forward_model.h.
void StandardForwardModel::notify_spectrum_update | ( | const Spectrum & | updated_spec, |
const std::string & | spec_name, | ||
int | channel_index | ||
) | const |
Definition at line 83 of file standard_forward_model.cc.
|
inlineprotectedinherited |
Function to call to notify Observers of a state change.
The object should pass itself to this function, so it can be passed to the Observers.
Definition at line 121 of file observer.h.
|
inlinevirtual |
The number of spectral channels associated with forward model.
Implements FullPhysics::ForwardModel.
Definition at line 40 of file standard_forward_model.h.
|
virtual |
Reimplemented from FullPhysics::ForwardModel.
Definition at line 90 of file standard_forward_model.cc.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
virtual |
Spectrum for the given spectral band.
Note that this may be empty.
channel_index | Band to give value for |
skip_jacobian | If true, don't do the Jacobian calculation. Often this is significantly faster to calculate. |
Implements FullPhysics::ForwardModel.
Definition at line 42 of file standard_forward_model.cc.
|
virtualinherited |
Radiance data all stacked together as one long spectrum (so band 0, followed by band 1, etc.).
Definition at line 25 of file stacked_radiance_mixin.cc.
|
inline |
Definition at line 89 of file standard_forward_model.h.
|
inline |
Definition at line 93 of file standard_forward_model.h.
|
inlinevirtual |
Remove an observer.
Implements FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >.
Definition at line 121 of file standard_forward_model.h.
|
inlineprotectedinherited |
Remove an observer.
Definition at line 173 of file observer.h.
|
inlineprotectedinherited |
Definition at line 181 of file observer.h.
|
inlinevirtual |
This notifies the forward model that it should setup the grid.
Implements FullPhysics::ForwardModel.
Definition at line 35 of file standard_forward_model.h.
|
inlinevirtual |
Spectral domain for the given spectral band.
Note that this may be empty.
Implements FullPhysics::ForwardModel.
Definition at line 45 of file standard_forward_model.h.
|
inlinevirtual |
Type preference for spectral domain.
This may seem an odd thing to have a function for, but this is needed by ForwardModelOutput.
Implements FullPhysics::ForwardModel.
Definition at line 54 of file standard_forward_model.h.
|
inline |
Definition at line 110 of file standard_forward_model.h.
|
inline |
Definition at line 79 of file standard_forward_model.h.
|
inline |
Definition at line 84 of file standard_forward_model.h.
|
inline |
Definition at line 64 of file standard_forward_model.h.
|
inline |
Definition at line 98 of file standard_forward_model.h.
|
inline |
Definition at line 103 of file standard_forward_model.h.
|
virtualinherited |
The range of indicies that corresponds to a particular band in the stacked radiances.
The range may well be empty if a band is not used at all. This is a useful edge case, but unfortunately blitz::Range does not support empty ranges. As a simple work around, we use the boost::optional class to return a value only if the range is not empty.
Definition at line 6 of file stacked_radiance_mixin.cc.
|
protectedinherited |
Definition at line 200 of file observer.h.
|
protectedinherited |
Definition at line 201 of file observer.h.