ReFRACtor
FullPhysics::LsiRt Class Reference

This does a Low Stream Interpolator correction to another RadiativeTransfer object. More...

#include <lsi_rt.h>

+ Inheritance diagram for FullPhysics::LsiRt:
+ Collaboration diagram for FullPhysics::LsiRt:

Public Member Functions

 LsiRt (const boost::shared_ptr< RadiativeTransferSingleWn > &Low_stream_rt, const boost::shared_ptr< RadiativeTransferSingleWn > &High_stream_rt, const std::string &Lsi_fname, double Water_vapor_fraction_threshold=0.8)
 Create a object that uses the low stream RT + LSI corrections based on the low and high stream RT. More...
 
 LsiRt (const boost::shared_ptr< RadiativeTransferSingleWn > &Low_stream_rt, const boost::shared_ptr< RadiativeTransferSingleWn > &High_stream_rt, const HdfFile &Config_file, const std::string &Lsi_group="LSI", double Water_vapor_fraction_threshold=0.8)
 Create a object that uses the low stream RT + LSI corrections based on the low and high stream RT. More...
 
virtual ~LsiRt ()
 
virtual void add_observer (Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &Obs)
 Required observable functions. More...
 
void add_observer_and_keep_reference (boost::shared_ptr< Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > > &Obs)
 Add an observer and keep a reference to it. More...
 
virtual ArrayAd< double, 2 > correction_only (const SpectralDomain &Spec_domain, int Spec_index) const
 Normally we calculate both the low streams stokes parameters, the LSI correction, and we apply them. More...
 
boost::shared_ptr< RadiativeTransferhigh_stream_radiative_transfer () const
 
boost::shared_ptr< RadiativeTransferlow_stream_radiative_transfer () const
 
virtual int number_spectrometer () const
 Number of spectrometer we have. More...
 
virtual int number_stokes () const
 Number of stokes parameters we will return in stokes and stokes_and_jacobian. More...
 
virtual void print (std::ostream &Os, bool Short_form=false) const
 Print to stream. More...
 
std::string print_to_string () const
 Print to string. More...
 
virtual Spectrum reflectance (const SpectralDomain &Spec_domain, int Spec_index, bool Skip_jacobian=false) const
 Calculate reflectance for the given set of wavenumbers/wavelengths. More...
 
virtual void remove_observer (Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &Obs)
 Remove an observer. More...
 
virtual blitz::Array< double, 2 > stokes (const SpectralDomain &Spec_domain, int Spec_index) const
 Calculate stokes vector for the given set of wavenumbers/wavelengths. More...
 
virtual ArrayAd< double, 2 > stokes_and_jacobian (const SpectralDomain &Spec_domain, int Spec_index) const
 Calculate stokes vector for the given set of wavenumbers/wavelengths. More...
 
const boost::shared_ptr< StokesCoefficient > & stokes_coefficient () const
 Stokes coefficients used to go from Stokes vector to scalar reflectance. More...
 

Protected Member Functions

void add_observer_do (Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &Obs, std::vector< boost::shared_ptr< NamedSpectrum > > &t)
 Add an observer. More...
 
void add_observer_do (Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &Obs)
 
void clean_dead_ptr ()
 Remove any dead pointers. More...
 
void notify_update_do (const std::vector< boost::shared_ptr< NamedSpectrum > > &Self)
 Function to call to notify Observers of a state change. More...
 
boost::shared_ptr< boost::progress_display > progress_display (const blitz::Array< double, 1 > &wn) const
 Helper routine, creates a progress meter. More...
 
void remove_observer_do (Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &Obs, std::vector< boost::shared_ptr< NamedSpectrum > > &t)
 Remove an observer. More...
 
void remove_observer_do (Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &Obs)
 

Protected Attributes

std::list< boost::weak_ptr< Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > > > olist
 
std::vector< boost::shared_ptr< Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > > > ref_list
 
boost::shared_ptr< StokesCoefficientstokes_coef
 Object to go from stokes vector to reflectance. More...
 

Static Protected Attributes

static AccumulatedTimer timer
 

Detailed Description

This does a Low Stream Interpolator correction to another RadiativeTransfer object.

There is a paper in the doc directory "LSI Paper.pdf" which describes this algorithm. Note that the paper describes an improved version, the code here is for an older implementation (we will update the papers version eventually).

There is a configuration file that gives the optical depth boundaries to use in the LSI binning. This can either be read from an HDF file (the preferred way), or for backwards compatibility from an ASCII file.

Definition at line 20 of file lsi_rt.h.

Constructor & Destructor Documentation

◆ LsiRt() [1/2]

LsiRt::LsiRt ( const boost::shared_ptr< RadiativeTransferSingleWn > &  Low_stream_rt,
const boost::shared_ptr< RadiativeTransferSingleWn > &  High_stream_rt,
const std::string &  Lsi_fname,
double  Water_vapor_fraction_threshold = 0.8 
)

Create a object that uses the low stream RT + LSI corrections based on the low and high stream RT.

Unless you are doing something unusual, you'll want the low and high stream RadiativeTransfer classes to use the same stokes coefficients, StateVector and Atmosphere. However, this class doesn't require that these be the same - if they are different it assumes you know what you are doing. In any case, this class will use the same stokes coefficients, StateVector and Atmosphere as the High_stream_rt.

This version reads the old ASCII format. This format has comments starting with "#" and going to the end of the line. The data is <number boundaries band 0> <boundary 1> <boundary 2> ... <number boundaries band 1> ...

Parameters
Low_stream_rtLow stream RadiativeTransfer object.
High_stream_rtHigh stream RadiativeTransfer object.
Lsi_fnameName of ASCII file containing LSI parameters
Water_vapor_fraction_thresholdThreshold used to determine if a particular spectral point is a water vapor line. We calculate wv_od / total_od and compare to this threshold.

Definition at line 63 of file lsi_rt.cc.

◆ LsiRt() [2/2]

LsiRt::LsiRt ( const boost::shared_ptr< RadiativeTransferSingleWn > &  Low_stream_rt,
const boost::shared_ptr< RadiativeTransferSingleWn > &  High_stream_rt,
const HdfFile Config_file,
const std::string &  Lsi_group = "LSI",
double  Water_vapor_fraction_threshold = 0.8 
)

Create a object that uses the low stream RT + LSI corrections based on the low and high stream RT.

Unless you are doing something unusual, you'll want the low and high stream RadiativeTransfer classes to use the same stokes coefficients, StateVector and Atmosphere. However, this class doesn't require that these be the same - if they are different it assumes you know what you are doing. In any case, this class will use the same stokes coefficients, StateVector and Atmosphere as the High_stream_rt.

This version reads the HDF format. This takes a HdfFile and optional group. It reads the fields in that group names "optical_depth_boundary_1", "optical_depth_boundary_2", etc.

Parameters
Low_stream_rtLow stream RadiativeTransfer object.
High_stream_rtHigh stream RadiativeTransfer object.
Config_fileHDF file that contains configuration information
Lsi_groupThe group that contains the LSI data to read.
Water_vapor_fraction_thresholdThreshold used to determine if a particular spectral point is a water vapor line. We calculate wv_od / total_od and compare to this threshold.

Definition at line 116 of file lsi_rt.cc.

◆ ~LsiRt()

virtual FullPhysics::LsiRt::~LsiRt ( )
inlinevirtual

Definition at line 31 of file lsi_rt.h.

Member Function Documentation

◆ add_observer()

virtual void FullPhysics::RadiativeTransferFixedStokesCoefficient::add_observer ( Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &  Obs)
inlinevirtualinherited

◆ add_observer_and_keep_reference()

void FullPhysics::Observable< std::vector< boost::shared_ptr< NamedSpectrum > > >::add_observer_and_keep_reference ( boost::shared_ptr< Observer< std::vector< 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< std::vector< boost::shared_ptr< NamedSpectrum > > >::add_observer_do ( Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &  Obs,
std::vector< 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< std::vector< boost::shared_ptr< NamedSpectrum > > >::add_observer_do ( Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &  Obs)
inlineprotectedinherited

Definition at line 159 of file observer.h.

◆ clean_dead_ptr()

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

Remove any dead pointers.

Definition at line 196 of file observer.h.

◆ correction_only()

ArrayAd< double, 2 > LsiRt::correction_only ( const SpectralDomain Spec_domain,
int  Spec_index 
) const
virtual

Normally we calculate both the low streams stokes parameters, the LSI correction, and we apply them.

However for testing it can be useful to calculate just the LSI correction. This is much faster to calculate, and allows us to test the LSI without doing the full RT calculation.

Definition at line 220 of file lsi_rt.cc.

◆ high_stream_radiative_transfer()

boost::shared_ptr<RadiativeTransfer> FullPhysics::LsiRt::high_stream_radiative_transfer ( ) const
inline

Definition at line 44 of file lsi_rt.h.

◆ low_stream_radiative_transfer()

boost::shared_ptr<RadiativeTransfer> FullPhysics::LsiRt::low_stream_radiative_transfer ( ) const
inline

Definition at line 42 of file lsi_rt.h.

◆ notify_update_do()

void FullPhysics::Observable< std::vector< boost::shared_ptr< NamedSpectrum > > >::notify_update_do ( const std::vector< 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.

◆ number_spectrometer()

virtual int FullPhysics::RadiativeTransferFixedStokesCoefficient::number_spectrometer ( ) const
inlinevirtualinherited

Number of spectrometer we have.

Implements FullPhysics::RadiativeTransfer.

Definition at line 31 of file radiative_transfer_fixed_stokes_coefficient.h.

◆ number_stokes()

virtual int FullPhysics::LsiRt::number_stokes ( ) const
inlinevirtual

Number of stokes parameters we will return in stokes and stokes_and_jacobian.

Implements FullPhysics::RadiativeTransfer.

Definition at line 32 of file lsi_rt.h.

◆ print()

void LsiRt::print ( std::ostream &  Os,
bool  Short_form = false 
) const
virtual

Print to stream.

Reimplemented from FullPhysics::RadiativeTransferFixedStokesCoefficient.

Definition at line 138 of file lsi_rt.cc.

◆ print_to_string()

std::string FullPhysics::Printable< RadiativeTransfer >::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.

◆ progress_display()

boost::shared_ptr< boost::progress_display > RadiativeTransfer::progress_display ( const blitz::Array< double, 1 > &  wn) const
protectedinherited

Helper routine, creates a progress meter.

This will return 0 if we aren't logging, or if we don't have enough points to bother with.

Definition at line 19 of file radiative_transfer.cc.

◆ reflectance()

Spectrum RadiativeTransferFixedStokesCoefficient::reflectance ( const SpectralDomain Spec_domain,
int  Spec_index,
bool  Skip_jacobian = false 
) const
virtualinherited

Calculate reflectance for the given set of wavenumbers/wavelengths.

Parameters
Spec_domainList of wavenumber/wavelength to calculate for.
Spec_indexThe Spectral index
Skip_jacobianIf true, don't do the Jacobian calculation. Often this is significantly faster to calculate.
Returns
The set of reflectance values.

Implements FullPhysics::RadiativeTransfer.

Definition at line 12 of file radiative_transfer_fixed_stokes_coefficient.cc.

◆ remove_observer()

virtual void FullPhysics::RadiativeTransferFixedStokesCoefficient::remove_observer ( Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &  Obs)
inlinevirtualinherited

◆ remove_observer_do() [1/2]

void FullPhysics::Observable< std::vector< boost::shared_ptr< NamedSpectrum > > >::remove_observer_do ( Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &  Obs,
std::vector< 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< std::vector< boost::shared_ptr< NamedSpectrum > > >::remove_observer_do ( Observer< std::vector< boost::shared_ptr< NamedSpectrum > > > &  Obs)
inlineprotectedinherited

Definition at line 181 of file observer.h.

◆ stokes()

blitz::Array< double, 2 > LsiRt::stokes ( const SpectralDomain Spec_domain,
int  Spec_index 
) const
virtual

Calculate stokes vector for the given set of wavenumbers/wavelengths.

Parameters
Spec_domainList of wavenumber/wavelength to calculate for.
Spec_indexThe Spectral index
Returns
The set of stokes coefficients. This is Spec_domain.data().rows() x number_stokes() in size.

Implements FullPhysics::RadiativeTransfer.

Definition at line 167 of file lsi_rt.cc.

◆ stokes_and_jacobian()

ArrayAd< double, 2 > LsiRt::stokes_and_jacobian ( const SpectralDomain Spec_domain,
int  Spec_index 
) const
virtual

Calculate stokes vector for the given set of wavenumbers/wavelengths.

This also calculates the Jacobian of the stokes with respect to the state vector elements.

Parameters
Spec_domainList of wavenumber/wavelength to calculate for.
Spec_indexThe Spectral index
Returns
The set of stokes coefficients, along with derivatives with respect to the state vector elements. This is Spec_domain.data().rows() x number_stokes() in size.

Implements FullPhysics::RadiativeTransfer.

Definition at line 191 of file lsi_rt.cc.

◆ stokes_coefficient()

const boost::shared_ptr<StokesCoefficient>& FullPhysics::RadiativeTransferFixedStokesCoefficient::stokes_coefficient ( ) const
inlineinherited

Stokes coefficients used to go from Stokes vector to scalar reflectance.

Definition at line 24 of file radiative_transfer_fixed_stokes_coefficient.h.

Member Data Documentation

◆ olist

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

Definition at line 200 of file observer.h.

◆ ref_list

std::vector<boost::shared_ptr<Observer<std::vector< boost::shared_ptr< NamedSpectrum > > > > > FullPhysics::Observable< std::vector< boost::shared_ptr< NamedSpectrum > > >::ref_list
protectedinherited

Definition at line 201 of file observer.h.

◆ stokes_coef

boost::shared_ptr<StokesCoefficient> FullPhysics::RadiativeTransferFixedStokesCoefficient::stokes_coef
protectedinherited

Object to go from stokes vector to reflectance.

Definition at line 65 of file radiative_transfer_fixed_stokes_coefficient.h.

◆ timer

AccumulatedTimer RadiativeTransfer::timer
staticprotectedinherited

Definition at line 92 of file radiative_transfer.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