ReFRACtor
FullPhysics::StandardForwardModel Class Reference

This is the forward model used form GOSAT/OCO. More...

#include <standard_forward_model.h>

+ Inheritance diagram for FullPhysics::StandardForwardModel:
+ Collaboration diagram for FullPhysics::StandardForwardModel:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StandardForwardModel()

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.

◆ ~StandardForwardModel()

virtual FullPhysics::StandardForwardModel::~StandardForwardModel ( )
inlinevirtual

Definition at line 33 of file standard_forward_model.h.

Member Function Documentation

◆ add_observer()

virtual void FullPhysics::StandardForwardModel::add_observer ( Observer< boost::shared_ptr< NamedSpectrum > > &  Obs)
inlinevirtual

Required observable functions.

Implements FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >.

Definition at line 116 of file standard_forward_model.h.

◆ add_observer_and_keep_reference()

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::add_observer_and_keep_reference ( boost::shared_ptr< Observer< boost::shared_ptr< NamedSpectrum > > > &  Obs)
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.

◆ add_observer_do() [1/2]

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::add_observer_do ( Observer< boost::shared_ptr< NamedSpectrum > > &  Obs,
boost::shared_ptr< NamedSpectrum > &  t 
)
inlineprotectedinherited

Add an observer.

Definition at line 148 of file observer.h.

◆ add_observer_do() [2/2]

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::add_observer_do ( Observer< boost::shared_ptr< NamedSpectrum > > &  Obs)
inlineprotectedinherited

Definition at line 159 of file observer.h.

◆ apply_spectrum_corrections()

Spectrum StandardForwardModel::apply_spectrum_corrections ( const Spectrum highres_spec,
int  channel_index 
) const

Applies corrections and modeling to modeled spectrum:

  • Interpolation to uniform grid
  • Application of spectrum effects
  • Application of instrument model

Definition at line 64 of file standard_forward_model.cc.

◆ clean_dead_ptr()

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::clean_dead_ptr ( )
inlineprotectedinherited

Remove any dead pointers.

Definition at line 196 of file observer.h.

◆ instrument() [1/2]

const boost::shared_ptr<Instrument>& FullPhysics::StandardForwardModel::instrument ( ) const
inline

Definition at line 69 of file standard_forward_model.h.

◆ instrument() [2/2]

void FullPhysics::StandardForwardModel::instrument ( const boost::shared_ptr< Instrument > &  V)
inline

Definition at line 74 of file standard_forward_model.h.

◆ notify_spectrum_update()

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.

◆ notify_update_do()

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::notify_update_do ( const boost::shared_ptr< NamedSpectrum > &  Self)
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.

◆ num_channels()

virtual int FullPhysics::StandardForwardModel::num_channels ( ) const
inlinevirtual

The number of spectral channels associated with forward model.

Implements FullPhysics::ForwardModel.

Definition at line 40 of file standard_forward_model.h.

◆ print()

void StandardForwardModel::print ( std::ostream &  Os) const
virtual

Reimplemented from FullPhysics::ForwardModel.

Definition at line 90 of file standard_forward_model.cc.

◆ print_to_string()

std::string FullPhysics::Printable< ForwardModel >::print_to_string ( ) const
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.

◆ radiance()

Spectrum StandardForwardModel::radiance ( int  channel_index,
bool  skip_jacobian = false 
) const
virtual

Spectrum for the given spectral band.

Note that this may be empty.

Parameters
channel_indexBand to give value for
skip_jacobianIf true, don't do the Jacobian calculation. Often this is significantly faster to calculate.
Returns
The set of radiances, possibly empty.

Implements FullPhysics::ForwardModel.

Definition at line 42 of file standard_forward_model.cc.

◆ radiance_all()

Spectrum StackedRadianceMixin::radiance_all ( bool  skip_jacobian = false) const
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.

◆ radiative_transfer() [1/2]

const boost::shared_ptr<RadiativeTransfer>& FullPhysics::StandardForwardModel::radiative_transfer ( ) const
inline

Definition at line 89 of file standard_forward_model.h.

◆ radiative_transfer() [2/2]

void FullPhysics::StandardForwardModel::radiative_transfer ( const boost::shared_ptr< RadiativeTransfer > &  V)
inline

Definition at line 93 of file standard_forward_model.h.

◆ remove_observer()

virtual void FullPhysics::StandardForwardModel::remove_observer ( Observer< boost::shared_ptr< NamedSpectrum > > &  Obs)
inlinevirtual

Remove an observer.

Implements FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >.

Definition at line 121 of file standard_forward_model.h.

◆ remove_observer_do() [1/2]

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::remove_observer_do ( Observer< boost::shared_ptr< NamedSpectrum > > &  Obs,
boost::shared_ptr< NamedSpectrum > &  t 
)
inlineprotectedinherited

Remove an observer.

Definition at line 173 of file observer.h.

◆ remove_observer_do() [2/2]

void FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::remove_observer_do ( Observer< boost::shared_ptr< NamedSpectrum > > &  Obs)
inlineprotectedinherited

Definition at line 181 of file observer.h.

◆ setup_grid()

virtual void FullPhysics::StandardForwardModel::setup_grid ( )
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.

◆ spectral_domain()

virtual const SpectralDomain FullPhysics::StandardForwardModel::spectral_domain ( int  channel_index) const
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.

◆ spectral_domain_type_preference()

virtual SpectralDomain::TypePreference FullPhysics::StandardForwardModel::spectral_domain_type_preference ( ) const
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.

◆ spectral_grid()

const boost::shared_ptr<ForwardModelSpectralGrid>& FullPhysics::StandardForwardModel::spectral_grid ( ) const
inline

Definition at line 110 of file standard_forward_model.h.

◆ spectral_window() [1/2]

const boost::shared_ptr<SpectralWindow>& FullPhysics::StandardForwardModel::spectral_window ( ) const
inline

Definition at line 79 of file standard_forward_model.h.

◆ spectral_window() [2/2]

void FullPhysics::StandardForwardModel::spectral_window ( const boost::shared_ptr< SpectralWindow > &  V)
inline

Definition at line 84 of file standard_forward_model.h.

◆ spectrum_effect()

const std::vector<std::vector<boost::shared_ptr<SpectrumEffect> > >& FullPhysics::StandardForwardModel::spectrum_effect ( ) const
inline

Definition at line 64 of file standard_forward_model.h.

◆ spectrum_sampling() [1/2]

const boost::shared_ptr<SpectrumSampling>& FullPhysics::StandardForwardModel::spectrum_sampling ( ) const
inline

Definition at line 98 of file standard_forward_model.h.

◆ spectrum_sampling() [2/2]

void FullPhysics::StandardForwardModel::spectrum_sampling ( const boost::shared_ptr< SpectrumSampling > &  V)
inline

Definition at line 103 of file standard_forward_model.h.

◆ stacked_pixel_range()

const boost::optional< Range > StackedRadianceMixin::stacked_pixel_range ( int  channel_index) const
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.

Member Data Documentation

◆ olist

std::list<boost::weak_ptr<Observer<boost::shared_ptr< NamedSpectrum > > > > FullPhysics::Observable< boost::shared_ptr< NamedSpectrum > >::olist
protectedinherited

Definition at line 200 of file observer.h.

◆ ref_list

Definition at line 201 of file observer.h.


The documentation for this class was generated from the following files:

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