ReFRACtor
|
This does a Low Stream Interpolator correction to another RadiativeTransfer object. More...
#include <lsi_rt.h>
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< RadiativeTransfer > | high_stream_radiative_transfer () const |
boost::shared_ptr< RadiativeTransfer > | low_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< StokesCoefficient > | stokes_coef |
Object to go from stokes vector to reflectance. More... | |
Static Protected Attributes | |
static AccumulatedTimer | timer |
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.
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> ...
Low_stream_rt | Low stream RadiativeTransfer object. |
High_stream_rt | High stream RadiativeTransfer object. |
Lsi_fname | Name of ASCII file containing LSI parameters |
Water_vapor_fraction_threshold | Threshold used to determine if a particular spectral point is a water vapor line. We calculate wv_od / total_od and compare to this threshold. |
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.
Low_stream_rt | Low stream RadiativeTransfer object. |
High_stream_rt | High stream RadiativeTransfer object. |
Config_file | HDF file that contains configuration information |
Lsi_group | The group that contains the LSI data to read. |
Water_vapor_fraction_threshold | Threshold used to determine if a particular spectral point is a water vapor line. We calculate wv_od / total_od and compare to this threshold. |
|
inlinevirtualinherited |
Required observable functions.
Implements FullPhysics::Observable< std::vector< boost::shared_ptr< NamedSpectrum > > >.
Definition at line 42 of file radiative_transfer_fixed_stokes_coefficient.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.
|
inlineprotectedinherited |
Remove any dead pointers.
Definition at line 196 of file observer.h.
|
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.
|
inline |
|
inline |
|
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.
|
inlinevirtualinherited |
Number of spectrometer we have.
Implements FullPhysics::RadiativeTransfer.
Definition at line 31 of file radiative_transfer_fixed_stokes_coefficient.h.
|
inlinevirtual |
Number of stokes parameters we will return in stokes and stokes_and_jacobian.
Implements FullPhysics::RadiativeTransfer.
|
virtual |
Print to stream.
Reimplemented from FullPhysics::RadiativeTransferFixedStokesCoefficient.
|
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.
|
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.
|
virtualinherited |
Calculate reflectance for the given set of wavenumbers/wavelengths.
Spec_domain | List of wavenumber/wavelength to calculate for. |
Spec_index | The Spectral index |
Skip_jacobian | If true, don't do the Jacobian calculation. Often this is significantly faster to calculate. |
Implements FullPhysics::RadiativeTransfer.
Definition at line 12 of file radiative_transfer_fixed_stokes_coefficient.cc.
|
inlinevirtualinherited |
Remove an observer.
Implements FullPhysics::Observable< std::vector< boost::shared_ptr< NamedSpectrum > > >.
Definition at line 44 of file radiative_transfer_fixed_stokes_coefficient.h.
|
inlineprotectedinherited |
Remove an observer.
Definition at line 173 of file observer.h.
|
inlineprotectedinherited |
Definition at line 181 of file observer.h.
|
virtual |
Calculate stokes vector for the given set of wavenumbers/wavelengths.
Spec_domain | List of wavenumber/wavelength to calculate for. |
Spec_index | The Spectral index |
Implements FullPhysics::RadiativeTransfer.
|
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.
Spec_domain | List of wavenumber/wavelength to calculate for. |
Spec_index | The Spectral index |
Implements FullPhysics::RadiativeTransfer.
|
inlineinherited |
Stokes coefficients used to go from Stokes vector to scalar reflectance.
Definition at line 24 of file radiative_transfer_fixed_stokes_coefficient.h.
|
protectedinherited |
Definition at line 200 of file observer.h.
|
protectedinherited |
Definition at line 201 of file observer.h.
|
protectedinherited |
Object to go from stokes vector to reflectance.
Definition at line 65 of file radiative_transfer_fixed_stokes_coefficient.h.
|
staticprotectedinherited |
Definition at line 92 of file radiative_transfer.h.