Isis Developer Reference
AtmosModel.h
Go to the documentation of this file.
1 #ifndef AtmosModel_h
2 #define AtmosModel_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <string>
11 #include <vector>
12 #include "PhotoModel.h"
13 #include "NumericalApproximation.h"
14 #include "NumericalAtmosApprox.h"
15 
16 using namespace std;
17 namespace Isis {
18  class Pvl;
19 
60  class AtmosModel {
61  public:
62  AtmosModel(Pvl &pvl, PhotoModel &pmodel);
64  virtual ~AtmosModel() {};
65 
66  // These methods were moved here from the NumericalMethods class
67  static double G11Prime(double tau);
68  static double Ei(double x);
69  static double En(unsigned int n, double x);
70  // Calculate atmospheric scattering effect
71  void CalcAtmEffect(double pha, double inc, double ema, double *pstd,
72  double *trans, double *trans0, double *sbar, double *transs);
73  // Used to calculate atmosphere at standard conditions
74  virtual void SetStandardConditions(bool standard);
75  // Obtain hemispheric and bihemispheric albedo by integrating the photometric function
76  void GenerateAhTable();
77  // Perform integration for Hapke Henyey-Greenstein atmosphere correction
78  void GenerateHahgTables();
79  // Perform integration for Hapke Henyey-Greenstein atmosphere correction. This
80  // version is used for shadow modeling and does not tabulate the first and third
81  // integrals like GenerateHahgTables. It only evaluates the middle integral
82  // that corrects the sbar variable (which is the illumination of the ground
83  // by the sky).
84  void GenerateHahgTablesShadow();
85  // Set parameters needed for atmospheric correction
86  void SetAtmosAtmSwitch(const int atmswitch);
87  void SetAtmosBha(const double bha);
88  void SetAtmosHga(const double hga);
89  void SetAtmosInc(const double inc);
90  void SetAtmosNulneg(const string nulneg);
91  void SetAtmosPhi(const double phi);
92  void SetAtmosTau(const double tau);
93  void SetAtmosTauref(const double tauref);
94  void SetAtmosWha(const double wha);
95  void SetAtmosHnorm(const double hnorm);
96  void SetAtmosIord(const string offset);
97  void SetAtmosEstTau(const string esttau);
98 
100  string AlgorithmName() const {
101  return p_atmosAlgorithmName;
102  };
103 
105  bool AtmosAdditiveOffset() const {
106  return p_atmosAddOffset;
107  };
108 
110  double AtmosHnorm() const {
111  return p_atmosHnorm;
112  };
113 
115  double AtmosBha() const {
116  return p_atmosBha;
117  };
119  double AtmosTau() const {
120  return p_atmosTau;
121  };
123  double AtmosWha() const {
124  return p_atmosWha;
125  };
127  double AtmosHga() const {
128  return p_atmosHga;
129  };
131  double AtmosTauref() const {
132  return p_atmosTauref;
133  };
135  bool AtmosNulneg() const {
136  return p_atmosNulneg;
137  };
139  double AtmosAb() const {
140  return p_atmosAb;
141  };
143  double AtmosHahgsb() const {
144  return p_atmosHahgsb;
145  };
147  int AtmosNinc() const {
148  return p_atmosNinc;
149  };
151  double AtmosMunot() const {
152  return p_atmosMunot;
153  };
154 
156  vector <double> AtmosIncTable() {
157  return p_atmosIncTable;
158  };
160  vector <double> AtmosAhTable() {
161  return p_atmosAhTable;
162  };
164  vector <double> AtmosHahgtTable() {
165  return p_atmosHahgtTable;
166  };
168  vector <double> AtmosHahgt0Table() {
169  return p_atmosHahgt0Table;
170  };
171 
184  return p_atmosAhSpline;
185  };
198  return p_atmosHahgtSpline;
199  };
212  return p_atmosHahgt0Spline;
213  };
214 
215  protected:
216  virtual void AtmosModelAlgorithm(double phase, double incidence, double emission) = 0;
217 
218  void SetAlgorithmName(string name) {
219  p_atmosAlgorithmName = name;
220  }
221  void SetAtmosNulneg(bool nulneg) {
222  p_atmosNulneg = nulneg;
223  }
224  void SetAtmosIord(bool offset) {
225  p_atmosAddOffset = offset;
226  }
227  void SetAtmosEstTau(bool esttau) {
228  p_atmosEstTau = esttau;
229  }
230  void SetOldTau(double tau) {
231  p_atmosTauold = tau;
232  }
233  void SetOldWha(double wha) {
234  p_atmosWhaold = wha;
235  }
236 
238  return p_atmosPM;
239  }
240  bool StandardConditions() const {
241  return p_standardConditions;
242  }
243  bool TauOrWhaChanged() const;
244  double Eulgam() const {
245  return p_atmosEulgam;
246  }
247 
250 
251  double p_atmosBha;
257 
258  double p_pstd;
259  double p_trans;
260  double p_trans0;
261  double p_transs;
262  double p_sbar;
263  double p_atmosHga;
264  double p_atmosTau;
265  double p_atmosWha;
266  double p_atmosAb;
267  double p_atmosHnorm;
270  vector <double> p_atmosIncTable;
271  vector <double> p_atmosAhTable;
273  vector <double> p_atmosHahgtTable;
274  vector <double> p_atmosHahgt0Table;
275  double p_atmosInc;
276  double p_atmosPhi;
277  double p_atmosMunot;
278  double p_atmosSini;
281 
288 
289  private:
290  bool p_standardConditions;
291 
292  string p_atmosAlgorithmName;
293 
294  PhotoModel *p_atmosPM;
295 
296  bool p_atmosNulneg;
297 
298  double p_atmosTauold;
299  double p_atmosWhaold;
300  friend class NumericalAtmosApprox;
301  };
302 };
303 
304 #endif
Isis::NumericalAtmosApprox::IntegFunc
IntegFunc
This enum defines function to be integrated by Romberg's method.
Definition: NumericalAtmosApprox.h:43
Isis::AtmosModel::SetAtmosEstTau
void SetAtmosEstTau(bool esttau)
Definition: AtmosModel.h:227
Isis::AtmosModel::p_atmosWhasave
double p_atmosWhasave
Definition: AtmosModel.h:256
Isis::AtmosModel::p_atmosHga
double p_atmosHga
Definition: AtmosModel.h:263
Isis::AtmosModel::p_atmosCosphi
double p_atmosCosphi
Definition: AtmosModel.h:279
Isis::AtmosModel::AtmosHahgtSpline
NumericalApproximation AtmosHahgtSpline()
If GenerateHahgTables() has been called this returns a clamped cubic spline of the data set (p_atmosI...
Definition: AtmosModel.h:197
FileName.h
Isis::AtmosModel::AtmosWha
double AtmosWha() const
Return atmospheric Wha value.
Definition: AtmosModel.h:123
Isis::AtmosModel::p_atmosIncTable
vector< double > p_atmosIncTable
Definition: AtmosModel.h:270
Isis::AtmosModel::SetAlgorithmName
void SetAlgorithmName(string name)
Definition: AtmosModel.h:218
Isis::AtmosModel::p_atmosAb
double p_atmosAb
Definition: AtmosModel.h:266
Plugin.h
Isis::PhotoModel
Definition: PhotoModel.h:41
Isis::PI
const double PI
The mathematical constant PI.
Definition: Constants.h:40
Isis::AtmosModel::p_pstd
double p_pstd
Pure atmospheric-scattering term.
Definition: AtmosModel.h:258
AtmosModel.h
Isis::LunarLambert
Lunar (Lommel-Seeliger)-Lambert law photometric model Derive model albedo for Lunar (Lommel-Seeliger)...
Definition: LunarLambert.h:32
Isis::AtmosModel::AtmosModelAlgorithm
virtual void AtmosModelAlgorithm(double phase, double incidence, double emission)=0
Isis::AtmosModel::p_atmosNinc
int p_atmosNinc
Definition: AtmosModel.h:249
Isis::NumericalAtmosApprox
This class extends Isis::NumericalApproximation.
Definition: NumericalAtmosApprox.h:32
PhotoModel.h
Isis::AtmosModel::AtmosIncTable
vector< double > AtmosIncTable()
Return atmospheric IncTable value.
Definition: AtmosModel.h:156
Isis::AtmosModel::Eulgam
double Eulgam() const
Definition: AtmosModel.h:244
Isis::Minnaert
Minnaert photometric model Derive model albedo using Minnaert equation.
Definition: Minnaert.h:42
Isis::AtmosModel
Isotropic atmos scattering model.
Definition: AtmosModel.h:60
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::AtmosModel::AtmosAhTable
vector< double > AtmosAhTable()
Return atmospheric AhTable value.
Definition: AtmosModel.h:160
Isis::AtmosModel::StandardConditions
bool StandardConditions() const
Definition: AtmosModel.h:240
Isis::AtmosModel::p_atmosAtmSwitch
int p_atmosAtmSwitch
Definition: AtmosModel.h:248
Isis::AtmosModel::p_atmosHahgt0Table
vector< double > p_atmosHahgt0Table
Definition: AtmosModel.h:274
Isis::AtmosModel::AtmosHahgtTable
vector< double > AtmosHahgtTable()
Return atmospheric HahgtTable value.
Definition: AtmosModel.h:164
Isis::AtmosModel::AlgorithmName
string AlgorithmName() const
Return atmospheric algorithm name.
Definition: AtmosModel.h:100
Isis::AtmosModel::p_atmosMunot
double p_atmosMunot
Definition: AtmosModel.h:277
Isis::AtmosModel::p_atmosBha
double p_atmosBha
Definition: AtmosModel.h:251
NumericalApproximation.h
Isis::AtmosModel::AtmosHahgsb
double AtmosHahgsb() const
Return atmospheric Hahgsb value.
Definition: AtmosModel.h:143
Isis::AtmosModel::p_atmosAddOffset
bool p_atmosAddOffset
Allow additive offset in fit.
Definition: AtmosModel.h:268
Isis::AtmosModel::p_atmosInc
double p_atmosInc
Definition: AtmosModel.h:275
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::AtmosModel::AtmosTauref
double AtmosTauref() const
Return atmospheric Tauref value.
Definition: AtmosModel.h:131
IString.h
Isis::AtmosModel::p_trans
double p_trans
Transmission of surface reflected light through the atmosphere overall.
Definition: AtmosModel.h:259
Isis::AtmosModel::p_atmosEstTau
bool p_atmosEstTau
Estimate optical depth tau using shadows.
Definition: AtmosModel.h:269
Isis::AtmosModel::AtmosNulneg
bool AtmosNulneg() const
Return atmospheric Nulneg value.
Definition: AtmosModel.h:135
Isis::AtmosModel::p_atmosBhasave
double p_atmosBhasave
Definition: AtmosModel.h:252
Isis::AtmosModel::p_atmosSini
double p_atmosSini
Definition: AtmosModel.h:278
Isis::IString::UpCase
IString UpCase()
Converst any lower case characters in the object IString with uppercase characters.
Definition: IString.cpp:617
Isis::AtmosModel::p_atmosHahgsb
double p_atmosHahgsb
Definition: AtmosModel.h:272
Isis::AtmosModel::p_atmosTausave
double p_atmosTausave
Definition: AtmosModel.h:255
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::AtmosModel::AtmosHga
double AtmosHga() const
Return atmospheric Hga value.
Definition: AtmosModel.h:127
Pvl.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
MAX
#define MAX(x, y)
Definition: AtmosModel.cpp:23
Isis::AtmosModel::AtmosBha
double AtmosBha() const
Return atmospheric Bha value.
Definition: AtmosModel.h:115
Isis::AtmosModel::p_transs
double p_transs
Transmission of light that must be subtracted from the flat surface model to get the shadow model.
Definition: AtmosModel.h:261
Isis::AtmosModel::AtmosAhSpline
NumericalApproximation AtmosAhSpline()
If GenerateAhTable() has been called this returns a clamped cubic spline of the data set (p_atmosIncT...
Definition: AtmosModel.h:183
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::AtmosModel::p_atmosHahgtSpline
NumericalApproximation p_atmosHahgtSpline
Spline object for the atmospheric Hahg Table. Properties are set in GenerateHahgTables().
Definition: AtmosModel.h:285
Minnaert.h
NumericalAtmosApprox.h
Isis::IException
Isis exception class.
Definition: IException.h:91
LunarLambert.h
Isis::AtmosModel::p_atmosTau
double p_atmosTau
Definition: AtmosModel.h:264
Isis::AtmosModel::AtmosAb
double AtmosAb() const
Return atmospheric Ab value.
Definition: AtmosModel.h:139
Isis::AtmosModel::p_atmosHnorm
double p_atmosHnorm
Atmospheric shell thickness normalized to planet radius.
Definition: AtmosModel.h:267
IException.h
Isis::AtmosModel::p_atmosHahgt0Spline
NumericalApproximation p_atmosHahgt0Spline
Spline object for the atmospheric Hahg0 Table. Properties are set in GenerateHahgTables().
Definition: AtmosModel.h:287
std
Namespace for the standard library.
Isis::AtmosModel::AtmosHnorm
double AtmosHnorm() const
Return atmospheric Hnorm value.
Definition: AtmosModel.h:110
Isis::AtmosModel::SetOldTau
void SetOldTau(double tau)
Definition: AtmosModel.h:230
Isis::AtmosModel::SetOldWha
void SetOldWha(double wha)
Definition: AtmosModel.h:233
Isis::AtmosModel::SetAtmosNulneg
void SetAtmosNulneg(bool nulneg)
Definition: AtmosModel.h:221
Isis::AtmosModel::AtmosAdditiveOffset
bool AtmosAdditiveOffset() const
Allow additive offset in fit?
Definition: AtmosModel.h:105
Isis::AtmosModel::AtmosTau
double AtmosTau() const
Return atmospheric Tau value.
Definition: AtmosModel.h:119
Isis::AtmosModel::p_atmosHahgtTable
vector< double > p_atmosHahgtTable
Definition: AtmosModel.h:273
Isis::AtmosModel::p_sbar
double p_sbar
Illumination of the ground by the sky.
Definition: AtmosModel.h:262
Isis::AtmosModel::AtmosNinc
int AtmosNinc() const
Return atmospheric Ninc value.
Definition: AtmosModel.h:147
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::AtmosModel::p_atmosHgasave
double p_atmosHgasave
Definition: AtmosModel.h:253
Isis::AtmosModel::AtmosHahgt0Spline
NumericalApproximation AtmosHahgt0Spline()
If GenerateHahgTables() has been called this returns a clamped cubic spline of the data set (p_atmosI...
Definition: AtmosModel.h:211
Isis::AtmosModel::p_atmosWha
double p_atmosWha
Definition: AtmosModel.h:265
Isis::AtmosModel::p_trans0
double p_trans0
Transmission of surface reflected light through the atmosphere with no scatterings in the atmosphere.
Definition: AtmosModel.h:260
Isis::NumericalAtmosApprox::RombergsMethod
double RombergsMethod(AtmosModel *am, IntegFunc sub, double a, double b)
This variation on the NumericalApproximation method integrates a specified AtmosModel function rather...
Definition: NumericalAtmosApprox.cpp:52
Isis::AtmosModel::~AtmosModel
virtual ~AtmosModel()
Empty destructor.
Definition: AtmosModel.h:64
Isis::NumericalApproximation::Reset
void Reset()
Resets the state of the object.
Definition: NumericalApproximation.cpp:2251
Isis::AtmosModel::p_atmosTauref
double p_atmosTauref
Definition: AtmosModel.h:254
Isis::AtmosModel::GetPhotoModel
PhotoModel * GetPhotoModel() const
Definition: AtmosModel.h:237
Isis::AtmosModel::p_atmosAhTable
vector< double > p_atmosAhTable
Definition: AtmosModel.h:271
Isis::AtmosModel::SetAtmosIord
void SetAtmosIord(bool offset)
Definition: AtmosModel.h:224
Isis::AtmosModel::p_atmosEulgam
double p_atmosEulgam
Definition: AtmosModel.h:280
Isis::AtmosModel::AtmosMunot
double AtmosMunot() const
Return atmospheric Munot value.
Definition: AtmosModel.h:151
Isis::NumericalApproximation
NumericalApproximation provides various numerical analysis methods of interpolation,...
Definition: NumericalApproximation.h:726
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::AtmosModel::p_atmosPhi
double p_atmosPhi
Definition: AtmosModel.h:276
Isis::AtmosModel::AtmosHahgt0Table
vector< double > AtmosHahgt0Table()
Return atmospheric Hahgt0Table value.
Definition: AtmosModel.h:168
Isis::AtmosModel::p_atmosAhSpline
NumericalApproximation p_atmosAhSpline
Spline object for the atmospheric Ah Table. Properties are set in GenerateAhTable().
Definition: AtmosModel.h:283