ReFRACtor
FullPhysics::FdForwardModel Class Referenceabstract

This a forward model class that calcualtes jacobians using the finite difference method. More...

#include <fd_forward_model.h>

+ Inheritance diagram for FullPhysics::FdForwardModel:
+ Collaboration diagram for FullPhysics::FdForwardModel:

Public Member Functions

 FdForwardModel (const boost::shared_ptr< ForwardModel > &Real_Forward_model, const boost::shared_ptr< StateVector > &Sv, const blitz::Array< double, 1 > &Perturbation)
 Constructor. More...
 
virtual ~FdForwardModel ()
 
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 Spec_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...
 
virtual void setup_grid ()=0
 This notifies the forward model that it should setup the grid. More...
 
virtual const SpectralDomain spectral_domain (int Spec_index) const
 Spectral domain for the given spectral band. More...
 
virtual SpectralDomain::TypePreference spectral_domain_type_preference () const =0
 Type preference for spectral domain. More...
 
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...
 
virtual boost::shared_ptr< StateVectorstate_vector () const
 

Detailed Description

This a forward model class that calcualtes jacobians using the finite difference method.

This will approach is certainly much slower and is meant for testing analytic jacobains and for models that do not include analytic jacobians.

Additionally this way of doing finitie difference is wasteful because some state vector elements might not require a full radiative transfer call.

Definition at line 18 of file fd_forward_model.h.

Constructor & Destructor Documentation

◆ FdForwardModel()

FdForwardModel::FdForwardModel ( const boost::shared_ptr< ForwardModel > &  Real_Forward_model,
const boost::shared_ptr< StateVector > &  Sv,
const blitz::Array< double, 1 > &  Perturbation 
)

Constructor.

Definition at line 11 of file fd_forward_model.cc.

◆ ~FdForwardModel()

virtual FullPhysics::FdForwardModel::~FdForwardModel ( )
inlinevirtual

Definition at line 23 of file fd_forward_model.h.

Member Function Documentation

◆ num_channels()

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

The number of spectral channels associated with forward model.

Implements FullPhysics::ForwardModel.

Definition at line 28 of file fd_forward_model.h.

◆ print()

virtual void FullPhysics::FdForwardModel::print ( std::ostream &  Os) const
inlinevirtual

Reimplemented from FullPhysics::ForwardModel.

Definition at line 26 of file fd_forward_model.h.

◆ 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 FdForwardModel::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 20 of file fd_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.

◆ setup_grid()

virtual void FullPhysics::ForwardModel::setup_grid ( )
pure virtualinherited

This notifies the forward model that it should setup the grid.

Implemented in FullPhysics::StandardForwardModel.

◆ spectral_domain()

virtual const SpectralDomain FullPhysics::FdForwardModel::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 30 of file fd_forward_model.h.

◆ spectral_domain_type_preference()

virtual SpectralDomain::TypePreference FullPhysics::ForwardModel::spectral_domain_type_preference ( ) const
pure virtualinherited

Type preference for spectral domain.

This may seem an odd thing to have a function for, but this is needed by ForwardModelOutput.

Implemented in FullPhysics::StandardForwardModel.

◆ 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.

◆ state_vector()

virtual boost::shared_ptr<StateVector> FullPhysics::FdForwardModel::state_vector ( ) const
inlinevirtual

Definition at line 24 of file fd_forward_model.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:12