List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
atm::MeasuredDBMieModel Class Reference

Class for computing aerosol scattering and attenuation using database measurements. More...

#include <MeasuredDBMieModel.h>

Inheritance diagram for atm::MeasuredDBMieModel:
Inheritance graph
[legend]

Classes

struct  PFParameters
 

Public Member Functions

atm::AttenuationResult EvaluateMieAttenuation (const utl::Point &xInit, const utl::Point &xFinal, const std::vector< double > &wLength) const
 
double EvaluateMieAttenuation (const utl::Point &xInit, const utl::Point &xFinal, double wLength) const
 
atm::ScatteringResult EvaluateMieScattering (const utl::Point &xA, const utl::Point &xB, const double angle, const double distance, const std::vector< double > &wLength) const
 Compute scattering intensity at point at a particular angle and distance from track defined by two points. More...
 
atm::ScatteringResult EvaluateMieScattering (const utl::Point &xA, const utl::Point &xB, const double angle, const double distance, const atm::AttenuationResult &mieAttenuation) const
 
double EvaluateMieScattering (const utl::Point &xA, const utl::Point &xB, const double angle, const double distance, double wLength) const
 
double EvaluateMieScattering (const utl::Point &xA, const utl::Point &xB, const double angle, const double distance, double wLength, const double mieAttenuation) const
 
double EvaluateScatteringAngle (const utl::Point &p, const double angle, const double wLength) const
 
virtual const utl::VRandomSamplerEvaluateScatteringAngleDistribution (const utl::Point &p, const double wLength) const
 
double GetAttenuationLength (const utl::Point &p, const double wLength) const
 
double GetVerticalAerosolOpticalDepth (const unsigned int eyeId, const double altitude) const
 
bool HasData () const
 Determine if the DB tables are full or if an update is needed. More...
 
bool HasZone (const std::string &zoneName) const
 Check for a zone in the DB (partial name match, case-insensitive) More...
 
void Init ()
 Initialize model using an XML card. More...
 
 MeasuredDBMieModel ()
 
void SetUncertaintyBound (double nSigma) const
 alter Model by nSigma standard deviations More...
 
virtual ~MeasuredDBMieModel ()
 

Private Types

typedef std::map< std::string,
utl::TabulatedFunction
ZoneFunction
 
enum  ZoneParam {
  eLosLeones, eLosMorados, eLomaAmarilla, eCoihueco,
  eAll
}
 
typedef std::map< std::string,
PFParameters
ZonePhaseFunction
 
typedef std::pair< std::string,
utl::Point
ZonePoint
 
typedef std::map< std::string,
utl::Point
ZonePosition
 

Private Member Functions

bool CheckForUpdates () const
 
bool CrossesZone (const utl::Point &pt1, const utl::Point &p2) const
 
std::string GetZoneName (const utl::Point &pt) const
 
std::string GetZoneName (const unsigned int eyeId) const
 
 REGISTER_MODEL (atm::VMieModel,"MeasuredDB", MeasuredDBMieModel)
 
ZoneParam StringToZoneParam (const std::string &str) const
 
void ToggleVAODPtr () const
 
bool ZoneMatch (const ZonePoint &pt, const std::string &name) const
 
std::string ZoneParamToString (const ZoneParam &zone) const
 

Private Attributes

utl::ShadowPtr< ZoneFunctionfAttLambdaVsHeightMap
 
utl::ShadowPtr< ZoneFunctionfAttVsHeightMap
 
utl::ShadowPtr< ZoneFunctionfCentralVAODVsHeightMap
 
utl::TimeStamp fCurrentTime
 
bool fDbIsEmptyNow
 
utl::ShadowPtr< ZoneFunctionfMaxVAODVsHeightMap
 
utl::ShadowPtr< ZoneFunctionfMinVAODVsHeightMap
 
double fNSigma
 
utl::ShadowPtr< ZonePhaseFunctionfPhaseFuncMap
 
std::vector< ZoneParamfSwapZones
 
double fSystematicShift
 
ZoneFunctionfVAODVsHeightMap
 
ZoneParam fZoneParam
 
ZonePosition fZonePositions
 

Detailed Description

Class for computing aerosol scattering and attenuation using database measurements.

Author
T. Paul

Once the AerosolDB reads data from the database and stores them in memory as a collection of AerosolZones, this class is responsible for accessing the numbers and outputting extinction/scattering results.

This is where all the physics happens, so it's the most important piece of code. To get the VAOD at a given altitude, the model performs a third-order polynomial interpolation between values in the VAOD table stored in AerosolDB. To estimate the phase function, it loads f and g and calculates the PF using a modified Henyey-Greenstein function. To get the wavelength dependence of the attenuation, it performs a linear interpolation in the wavelength vs. height table.

All of the major calculations are done in the functions EvaluateMieScattering and EvaluateMieAttenuation. The rest of the module code is responsible for updating the aerosol tables in memory when the Detector is updated to a new TimeStamp. Note that the model uses lazy evaluation, not changing the tables in memory unless it has to.

Definition at line 27 of file MeasuredDBMieModel.h.

Member Typedef Documentation

typedef std::map<std::string, utl::TabulatedFunction> atm::MeasuredDBMieModel::ZoneFunction
private

Definition at line 136 of file MeasuredDBMieModel.h.

typedef std::map<std::string, PFParameters> atm::MeasuredDBMieModel::ZonePhaseFunction
private

Definition at line 163 of file MeasuredDBMieModel.h.

typedef std::pair<std::string, utl::Point> atm::MeasuredDBMieModel::ZonePoint
private

Definition at line 131 of file MeasuredDBMieModel.h.

typedef std::map<std::string, utl::Point> atm::MeasuredDBMieModel::ZonePosition
private

Definition at line 130 of file MeasuredDBMieModel.h.

Member Enumeration Documentation

Enumerator
eLosLeones 
eLosMorados 
eLomaAmarilla 
eCoihueco 
eAll 

Definition at line 174 of file MeasuredDBMieModel.h.

Constructor & Destructor Documentation

MeasuredDBMieModel::MeasuredDBMieModel ( )

Definition at line 46 of file MeasuredDBMieModel.cc.

virtual atm::MeasuredDBMieModel::~MeasuredDBMieModel ( )
inlinevirtual

Definition at line 33 of file MeasuredDBMieModel.h.

Member Function Documentation

bool MeasuredDBMieModel::CheckForUpdates ( ) const
private
bool MeasuredDBMieModel::CrossesZone ( const utl::Point pt1,
const utl::Point p2 
) const
private

Definition at line 599 of file MeasuredDBMieModel.cc.

AttenuationResult MeasuredDBMieModel::EvaluateMieAttenuation ( const utl::Point xInit,
const utl::Point xFinal,
const std::vector< double > &  wLength 
) const
virtual
double MeasuredDBMieModel::EvaluateMieAttenuation ( const utl::Point xInit,
const utl::Point xFinal,
double  wLength 
) const
virtual
ScatteringResult MeasuredDBMieModel::EvaluateMieScattering ( const utl::Point xA,
const utl::Point xB,
const double  angle,
const double  distance,
const std::vector< double > &  wLength 
) const
virtual

Compute scattering intensity at point at a particular angle and distance from track defined by two points.

This method computes scattered intensity (photons/area) at an angle and distance from a track. The track is defined by two points (1'st two arguments). The third and fourth argument give the angle and distance, respectively. The fifth argument specifies the wavelengths at which you wish to know the scattering. Optionally as an optimization, the fifth argument can be a precalculated AttenuationResult instead (cf. EvaluateMieAttenuation). If you use the latter form, make sure that start- and end-point match for both calculations.

Note that this function is only valid for track segments which are short compared to the distance from the track to the evaluation point.

Implements atm::VMieModel.

Definition at line 109 of file MeasuredDBMieModel.cc.

References EvaluateMieAttenuation().

Referenced by atm::SuperMieModel::EvaluateMieScattering(), and EvaluateMieScattering().

ScatteringResult MeasuredDBMieModel::EvaluateMieScattering ( const utl::Point xA,
const utl::Point xB,
const double  angle,
const double  distance,
const atm::AttenuationResult mieAttenuation 
) const
virtual

Additionally takes a precomputed Mie AttenuationResult. Warning: Make sure it's compatible with the other parameters!

Implements atm::VMieModel.

Definition at line 121 of file MeasuredDBMieModel.cc.

References EvaluateMieScattering(), atm::AttenuationResult::GetTransmissionFactor(), utl::TabulatedFunctionErrors::PushBack(), utl::TabulatedFunction::XBegin(), utl::TabulatedFunction::XEnd(), and utl::TabulatedFunction::Y().

double MeasuredDBMieModel::EvaluateMieScattering ( const utl::Point xA,
const utl::Point xB,
const double  angle,
const double  distance,
double  wLength 
) const
virtual

Implements atm::VMieModel.

Definition at line 141 of file MeasuredDBMieModel.cc.

References EvaluateMieAttenuation(), and EvaluateMieScattering().

double MeasuredDBMieModel::EvaluateMieScattering ( const utl::Point xA,
const utl::Point xB,
const double  angle,
const double  distance,
double  wLength,
const double  mieAttenuation 
) const
virtual

Implements atm::VMieModel.

Definition at line 152 of file MeasuredDBMieModel.cc.

References CheckForUpdates(), EvaluateScatteringAngle(), and std::pow().

double MeasuredDBMieModel::EvaluateScatteringAngle ( const utl::Point p,
const double  angle,
const double  wLength 
) const
virtual
const utl::VRandomSampler & VMieModel::EvaluateScatteringAngleDistribution ( const utl::Point p,
const double  wLength 
) const
virtualinherited
double MeasuredDBMieModel::GetAttenuationLength ( const utl::Point p,
const double  wLength 
) const
virtual
double MeasuredDBMieModel::GetVerticalAerosolOpticalDepth ( const unsigned int  eyeId,
const double  altitude 
) const
virtual
string MeasuredDBMieModel::GetZoneName ( const utl::Point pt) const
private
string MeasuredDBMieModel::GetZoneName ( const unsigned int  eyeId) const
private

Definition at line 589 of file MeasuredDBMieModel.cc.

References GetZoneName().

bool MeasuredDBMieModel::HasData ( ) const
virtual
bool MeasuredDBMieModel::HasZone ( const std::string &  zoneName) const

Check for a zone in the DB (partial name match, case-insensitive)

Definition at line 101 of file MeasuredDBMieModel.cc.

References fZonePositions, and ZoneMatch().

Referenced by GetZoneName().

void MeasuredDBMieModel::Init ( void  )
virtual
atm::MeasuredDBMieModel::REGISTER_MODEL ( atm::VMieModel  ,
"MeasuredDB"  ,
MeasuredDBMieModel   
)
private
void MeasuredDBMieModel::SetUncertaintyBound ( double  nSigma) const
virtual

alter Model by nSigma standard deviations

Reimplemented from atm::VModel.

Definition at line 607 of file MeasuredDBMieModel.cc.

References fNSigma, and ToggleVAODPtr().

Referenced by atm::SuperMieModel::SetUncertaintyBound().

MeasuredDBMieModel::ZoneParam MeasuredDBMieModel::StringToZoneParam ( const std::string &  str) const
private

Definition at line 633 of file MeasuredDBMieModel.cc.

References utl::ContainsSubstringEquivalent(), eAll, eCoihueco, eLomaAmarilla, eLosLeones, and eLosMorados.

Referenced by Init().

void MeasuredDBMieModel::ToggleVAODPtr ( ) const
private
bool MeasuredDBMieModel::ZoneMatch ( const ZonePoint pt,
const std::string &  name 
) const
private

Definition at line 675 of file MeasuredDBMieModel.cc.

References utl::ContainsSubstringEquivalent().

Referenced by GetZoneName(), HasData(), and HasZone().

std::string MeasuredDBMieModel::ZoneParamToString ( const ZoneParam zone) const
private

Definition at line 649 of file MeasuredDBMieModel.cc.

References eCoihueco, eLomaAmarilla, eLosLeones, and eLosMorados.

Referenced by GetZoneName(), and HasData().

Member Data Documentation

utl::ShadowPtr<ZoneFunction> atm::MeasuredDBMieModel::fAttLambdaVsHeightMap
mutableprivate

Definition at line 140 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates().

utl::ShadowPtr<ZoneFunction> atm::MeasuredDBMieModel::fAttVsHeightMap
mutableprivate

Definition at line 138 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates().

utl::ShadowPtr<ZoneFunction> atm::MeasuredDBMieModel::fCentralVAODVsHeightMap
mutableprivate

Definition at line 144 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates(), and ToggleVAODPtr().

utl::TimeStamp atm::MeasuredDBMieModel::fCurrentTime
mutableprivate

Definition at line 127 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates().

bool atm::MeasuredDBMieModel::fDbIsEmptyNow
mutableprivate

Definition at line 167 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates().

utl::ShadowPtr<ZoneFunction> atm::MeasuredDBMieModel::fMaxVAODVsHeightMap
mutableprivate

Definition at line 146 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates(), and ToggleVAODPtr().

utl::ShadowPtr<ZoneFunction> atm::MeasuredDBMieModel::fMinVAODVsHeightMap
mutableprivate

Definition at line 145 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates(), and ToggleVAODPtr().

double atm::MeasuredDBMieModel::fNSigma
mutableprivate

Definition at line 169 of file MeasuredDBMieModel.h.

Referenced by SetUncertaintyBound(), and ToggleVAODPtr().

utl::ShadowPtr<ZonePhaseFunction> atm::MeasuredDBMieModel::fPhaseFuncMap
mutableprivate

Definition at line 165 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates().

std::vector<ZoneParam> atm::MeasuredDBMieModel::fSwapZones
private

Definition at line 176 of file MeasuredDBMieModel.h.

Referenced by GetZoneName(), and Init().

double atm::MeasuredDBMieModel::fSystematicShift
private

Definition at line 171 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates(), and Init().

ZoneFunction* atm::MeasuredDBMieModel::fVAODVsHeightMap
mutableprivate

Definition at line 142 of file MeasuredDBMieModel.h.

Referenced by ToggleVAODPtr().

ZoneParam atm::MeasuredDBMieModel::fZoneParam
mutableprivate

Definition at line 175 of file MeasuredDBMieModel.h.

Referenced by GetZoneName(), HasData(), and Init().

ZonePosition atm::MeasuredDBMieModel::fZonePositions
mutableprivate

Definition at line 133 of file MeasuredDBMieModel.h.

Referenced by CheckForUpdates(), GetZoneName(), HasData(), and HasZone().


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

, generated on Tue Sep 26 2023.