Class for computing aerosol scattering and attenuation using database measurements. More...
#include <MeasuredDBMieModel.h>
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::VRandomSampler & | EvaluateScatteringAngleDistribution (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 |
Class for computing aerosol scattering and attenuation using database measurements.
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.
|
private |
Definition at line 136 of file MeasuredDBMieModel.h.
|
private |
Definition at line 163 of file MeasuredDBMieModel.h.
|
private |
Definition at line 131 of file MeasuredDBMieModel.h.
|
private |
Definition at line 130 of file MeasuredDBMieModel.h.
|
private |
Enumerator | |
---|---|
eLosLeones | |
eLosMorados | |
eLomaAmarilla | |
eCoihueco | |
eAll |
Definition at line 174 of file MeasuredDBMieModel.h.
MeasuredDBMieModel::MeasuredDBMieModel | ( | ) |
Definition at line 46 of file MeasuredDBMieModel.cc.
|
inlinevirtual |
Definition at line 33 of file MeasuredDBMieModel.h.
|
private |
Definition at line 367 of file MeasuredDBMieModel.cc.
References DEBUGLOG, atm::MeasuredDBMieModel::PFParameters::f, fAttLambdaVsHeightMap, fAttVsHeightMap, fCentralVAODVsHeightMap, fCurrentTime, fDbIsEmptyNow, atm::MeasuredDBMieModel::PFParameters::fErr, atm::MeasuredDBMieModel::PFParameters::fLambda, atm::MeasuredDBMieModel::PFParameters::fLambdaErr, fMaxVAODVsHeightMap, fMinVAODVsHeightMap, fPhaseFuncMap, fSystematicShift, fZonePositions, atm::MeasuredDBMieModel::PFParameters::g, atm::MeasuredDBMieModel::PFParameters::gErr, atm::MeasuredDBMieModel::PFParameters::gLambda, atm::MeasuredDBMieModel::PFParameters::gLambdaErr, utl::TabulatedFunction::PushBack(), ToggleVAODPtr(), WARNING, atm::AerosolDB::ZonesBegin(), and atm::AerosolDB::ZonesEnd().
Referenced by EvaluateMieAttenuation(), EvaluateMieScattering(), GetVerticalAerosolOpticalDepth(), and HasData().
|
private |
Definition at line 599 of file MeasuredDBMieModel.cc.
|
virtual |
Implements atm::VMieModel.
Definition at line 171 of file MeasuredDBMieModel.cc.
References utl::TabulatedFunctionErrors::PushBack().
Referenced by atm::SuperMieModel::EvaluateMieAttenuation(), and EvaluateMieScattering().
|
virtual |
Implements atm::VMieModel.
Definition at line 198 of file MeasuredDBMieModel.cc.
References utl::abs(), CheckForUpdates(), fwk::CoordinateSystemRegistry::Get(), GetZoneName(), utl::TabulatedFunction::InterpolateY(), utl::kLn10, utl::m, max, utl::nanometer, utl::ReferenceEllipsoid::PointToLatitudeLongitudeHeight(), std::pow(), utl::TabulatedFunction::XBack(), and utl::TabulatedFunction::XFront().
|
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().
|
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().
|
virtual |
Implements atm::VMieModel.
Definition at line 141 of file MeasuredDBMieModel.cc.
References EvaluateMieAttenuation(), and EvaluateMieScattering().
|
virtual |
Implements atm::VMieModel.
Definition at line 152 of file MeasuredDBMieModel.cc.
References CheckForUpdates(), EvaluateScatteringAngle(), and std::pow().
|
virtual |
Implements atm::VMieModel.
Definition at line 346 of file MeasuredDBMieModel.cc.
References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, RdGeoCeLDFFitter::c, atm::MeasuredDBMieModel::PFParameters::f, atm::MeasuredDBMieModel::PFParameters::g, GetZoneName(), utl::kPi, and std::pow().
Referenced by EvaluateMieScattering(), and atm::SuperMieModel::EvaluateScatteringAngle().
|
virtualinherited |
Definition at line 35 of file VMieModel.cc.
References utl::deg, atm::VMieModel::EvaluateScatteringAngle(), atm::VMieModel::fAngularDistribution, and utl::TabulatedFunction::PushBack().
|
virtual |
Implements atm::VMieModel.
Definition at line 304 of file MeasuredDBMieModel.cc.
References fwk::CoordinateSystemRegistry::Get(), GetZoneName(), max, utl::nanometer, utl::ReferenceEllipsoid::PointToLatitudeLongitudeHeight(), std::pow(), utl::TabulatedFunction::XBack(), utl::TabulatedFunction::XFront(), and utl::TabulatedFunction::Y().
Referenced by atm::SuperMieModel::GetAttenuationLength().
|
virtual |
Implements atm::VMieModel.
Definition at line 274 of file MeasuredDBMieModel.cc.
References CheckForUpdates(), GetZoneName(), utl::TabulatedFunction::InterpolateY(), km, WARNING, utl::TabulatedFunction::XBack(), and utl::TabulatedFunction::YBack().
Referenced by atm::SuperMieModel::GetVerticalAerosolOpticalDepth().
|
private |
Definition at line 525 of file MeasuredDBMieModel.cc.
References utl::ContainsSubstringEquivalent(), eAll, fSwapZones, fZoneParam, fZonePositions, HasZone(), max, ZoneMatch(), and ZoneParamToString().
Referenced by EvaluateMieAttenuation(), EvaluateScatteringAngle(), GetAttenuationLength(), GetVerticalAerosolOpticalDepth(), and GetZoneName().
|
private |
Definition at line 589 of file MeasuredDBMieModel.cc.
References GetZoneName().
|
virtual |
Determine if the DB tables are full or if an update is needed.
Implements atm::VModel.
Definition at line 85 of file MeasuredDBMieModel.cc.
References CheckForUpdates(), eAll, fZoneParam, fZonePositions, ZoneMatch(), and ZoneParamToString().
Referenced by atm::SuperMieModel::EvaluateMieAttenuation(), atm::SuperMieModel::EvaluateMieScattering(), atm::SuperMieModel::EvaluateScatteringAngle(), atm::SuperMieModel::GetAttenuationLength(), atm::SuperMieModel::GetVerticalAerosolOpticalDepth(), testMeasuredDBMieModel::testHasData(), and otoa::fd::UsingMieAttenuationDatabase().
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().
|
virtual |
Initialize model using an XML card.
Implements atm::VModel.
Definition at line 57 of file MeasuredDBMieModel.cc.
References fSwapZones, fSystematicShift, fZoneParam, utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetTopBranch(), and StringToZoneParam().
Referenced by atm::SuperMieModel::Init(), and testMeasuredDBMieModel::testHasData().
|
private |
|
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().
|
private |
Definition at line 633 of file MeasuredDBMieModel.cc.
References utl::ContainsSubstringEquivalent(), eAll, eCoihueco, eLomaAmarilla, eLosLeones, and eLosMorados.
Referenced by Init().
|
private |
Definition at line 615 of file MeasuredDBMieModel.cc.
References fCentralVAODVsHeightMap, fMaxVAODVsHeightMap, fMinVAODVsHeightMap, fNSigma, fVAODVsHeightMap, and utl::ShadowPtr< T, DereferenceCheck >::Get().
Referenced by CheckForUpdates(), and SetUncertaintyBound().
|
private |
Definition at line 675 of file MeasuredDBMieModel.cc.
References utl::ContainsSubstringEquivalent().
Referenced by GetZoneName(), HasData(), and HasZone().
|
private |
Definition at line 649 of file MeasuredDBMieModel.cc.
References eCoihueco, eLomaAmarilla, eLosLeones, and eLosMorados.
Referenced by GetZoneName(), and HasData().
|
mutableprivate |
Definition at line 140 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates().
|
mutableprivate |
Definition at line 138 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates().
|
mutableprivate |
Definition at line 144 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates(), and ToggleVAODPtr().
|
mutableprivate |
Definition at line 127 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates().
|
mutableprivate |
Definition at line 167 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates().
|
mutableprivate |
Definition at line 146 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates(), and ToggleVAODPtr().
|
mutableprivate |
Definition at line 145 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates(), and ToggleVAODPtr().
|
mutableprivate |
Definition at line 169 of file MeasuredDBMieModel.h.
Referenced by SetUncertaintyBound(), and ToggleVAODPtr().
|
mutableprivate |
Definition at line 165 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates().
|
private |
Definition at line 176 of file MeasuredDBMieModel.h.
Referenced by GetZoneName(), and Init().
|
private |
Definition at line 171 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates(), and Init().
|
mutableprivate |
Definition at line 142 of file MeasuredDBMieModel.h.
Referenced by ToggleVAODPtr().
|
mutableprivate |
Definition at line 175 of file MeasuredDBMieModel.h.
Referenced by GetZoneName(), HasData(), and Init().
|
mutableprivate |
Definition at line 133 of file MeasuredDBMieModel.h.
Referenced by CheckForUpdates(), GetZoneName(), HasData(), and HasZone().