Isis 3 Programmer Reference
AtmosModel.h
Go to the documentation of this file.
1 #ifndef AtmosModel_h
2 #define AtmosModel_h
3 
26 #include <string>
27 #include <vector>
28 #include "PhotoModel.h"
29 #include "NumericalApproximation.h"
30 #include "NumericalAtmosApprox.h"
31 
32 using namespace std;
33 namespace Isis {
34  class Pvl;
35 
76  class AtmosModel {
77  public:
78  AtmosModel(Pvl &pvl, PhotoModel &pmodel);
80  virtual ~AtmosModel() {};
81 
82  // These methods were moved here from the NumericalMethods class
83  static double G11Prime(double tau);
84  static double Ei(double x);
85  static double En(unsigned int n, double x);
86  // Calculate atmospheric scattering effect
87  void CalcAtmEffect(double pha, double inc, double ema, double *pstd,
88  double *trans, double *trans0, double *sbar, double *transs);
89  // Used to calculate atmosphere at standard conditions
90  virtual void SetStandardConditions(bool standard);
91  // Obtain hemispheric and bihemispheric albedo by integrating the photometric function
92  void GenerateAhTable();
93  // Perform integration for Hapke Henyey-Greenstein atmosphere correction
94  void GenerateHahgTables();
95  // Perform integration for Hapke Henyey-Greenstein atmosphere correction. This
96  // version is used for shadow modeling and does not tabulate the first and third
97  // integrals like GenerateHahgTables. It only evaluates the middle integral
98  // that corrects the sbar variable (which is the illumination of the ground
99  // by the sky).
100  void GenerateHahgTablesShadow();
101  // Set parameters needed for atmospheric correction
102  void SetAtmosAtmSwitch(const int atmswitch);
103  void SetAtmosBha(const double bha);
104  void SetAtmosHga(const double hga);
105  void SetAtmosInc(const double inc);
106  void SetAtmosNulneg(const string nulneg);
107  void SetAtmosPhi(const double phi);
108  void SetAtmosTau(const double tau);
109  void SetAtmosTauref(const double tauref);
110  void SetAtmosWha(const double wha);
111  void SetAtmosHnorm(const double hnorm);
112  void SetAtmosIord(const string offset);
113  void SetAtmosEstTau(const string esttau);
114 
116  string AlgorithmName() const {
117  return p_atmosAlgorithmName;
118  };
119 
121  bool AtmosAdditiveOffset() const {
122  return p_atmosAddOffset;
123  };
124 
126  double AtmosHnorm() const {
127  return p_atmosHnorm;
128  };
129 
131  double AtmosBha() const {
132  return p_atmosBha;
133  };
135  double AtmosTau() const {
136  return p_atmosTau;
137  };
139  double AtmosWha() const {
140  return p_atmosWha;
141  };
143  double AtmosHga() const {
144  return p_atmosHga;
145  };
147  double AtmosTauref() const {
148  return p_atmosTauref;
149  };
151  bool AtmosNulneg() const {
152  return p_atmosNulneg;
153  };
155  double AtmosAb() const {
156  return p_atmosAb;
157  };
159  double AtmosHahgsb() const {
160  return p_atmosHahgsb;
161  };
163  int AtmosNinc() const {
164  return p_atmosNinc;
165  };
167  double AtmosMunot() const {
168  return p_atmosMunot;
169  };
170 
172  vector <double> AtmosIncTable() {
173  return p_atmosIncTable;
174  };
176  vector <double> AtmosAhTable() {
177  return p_atmosAhTable;
178  };
180  vector <double> AtmosHahgtTable() {
181  return p_atmosHahgtTable;
182  };
184  vector <double> AtmosHahgt0Table() {
185  return p_atmosHahgt0Table;
186  };
187 
200  return p_atmosAhSpline;
201  };
214  return p_atmosHahgtSpline;
215  };
228  return p_atmosHahgt0Spline;
229  };
230 
231  protected:
232  virtual void AtmosModelAlgorithm(double phase, double incidence, double emission) = 0;
233 
234  void SetAlgorithmName(string name) {
235  p_atmosAlgorithmName = name;
236  }
237  void SetAtmosNulneg(bool nulneg) {
238  p_atmosNulneg = nulneg;
239  }
240  void SetAtmosIord(bool offset) {
241  p_atmosAddOffset = offset;
242  }
243  void SetAtmosEstTau(bool esttau) {
244  p_atmosEstTau = esttau;
245  }
246  void SetOldTau(double tau) {
247  p_atmosTauold = tau;
248  }
249  void SetOldWha(double wha) {
250  p_atmosWhaold = wha;
251  }
252 
253  PhotoModel *GetPhotoModel() const {
254  return p_atmosPM;
255  }
256  bool StandardConditions() const {
257  return p_standardConditions;
258  }
259  bool TauOrWhaChanged() const;
260  double Eulgam() const {
261  return p_atmosEulgam;
262  }
263 
264  int p_atmosAtmSwitch;
265  int p_atmosNinc;
266 
267  double p_atmosBha;
268  double p_atmosBhasave;
269  double p_atmosHgasave;
270  double p_atmosTauref;
271  double p_atmosTausave;
272  double p_atmosWhasave;
273 
274  double p_pstd;
275  double p_trans;
276  double p_trans0;
277  double p_transs;
278  double p_sbar;
279  double p_atmosHga;
280  double p_atmosTau;
281  double p_atmosWha;
282  double p_atmosAb;
283  double p_atmosHnorm;
286  vector <double> p_atmosIncTable;
287  vector <double> p_atmosAhTable;
288  double p_atmosHahgsb;
289  vector <double> p_atmosHahgtTable;
290  vector <double> p_atmosHahgt0Table;
291  double p_atmosInc;
292  double p_atmosPhi;
293  double p_atmosMunot;
294  double p_atmosSini;
295  double p_atmosCosphi;
296  double p_atmosEulgam;
297 
304 
305  private:
306  bool p_standardConditions;
307 
308  string p_atmosAlgorithmName;
309 
310  PhotoModel *p_atmosPM;
311 
312  bool p_atmosNulneg;
313 
314  double p_atmosTauold;
315  double p_atmosWhaold;
316  friend class NumericalAtmosApprox;
317  };
318 };
319 
320 #endif
NumericalApproximation AtmosHahgt0Spline()
If GenerateHahgTables() has been called this returns a clamped cubic spline of the data set (p_atmosI...
Definition: AtmosModel.h:227
double p_atmosHnorm
Atmospheric shell thickness normalized to planet radius.
Definition: AtmosModel.h:283
NumericalApproximation p_atmosAhSpline
Spline object for the atmospheric Ah Table. Properties are set in GenerateAhTable().
Definition: AtmosModel.h:299
double p_trans0
Transmission of surface reflected light through the atmosphere with no scatterings in the atmosphere...
Definition: AtmosModel.h:276
NumericalApproximation p_atmosHahgt0Spline
Spline object for the atmospheric Hahg0 Table. Properties are set in GenerateHahgTables().
Definition: AtmosModel.h:303
bool p_atmosEstTau
Estimate optical depth tau using shadows.
Definition: AtmosModel.h:285
bool p_atmosAddOffset
Allow additive offset in fit.
Definition: AtmosModel.h:284
NumericalApproximation p_atmosHahgtSpline
Spline object for the atmospheric Hahg Table. Properties are set in GenerateHahgTables().
Definition: AtmosModel.h:301
bool AtmosAdditiveOffset() const
Allow additive offset in fit?
Definition: AtmosModel.h:121
Namespace for the standard library.
NumericalApproximation provides various numerical analysis methods of interpolation, extrapolation and approximation of a tabulated set of x, y data.
double AtmosTauref() const
Return atmospheric Tauref value.
Definition: AtmosModel.h:147
double AtmosHga() const
Return atmospheric Hga value.
Definition: AtmosModel.h:143
NumericalApproximation AtmosAhSpline()
If GenerateAhTable() has been called this returns a clamped cubic spline of the data set (p_atmosIncT...
Definition: AtmosModel.h:199
double p_trans
Transmission of surface reflected light through the atmosphere overall.
Definition: AtmosModel.h:275
Isotropic atmos scattering model.
Definition: AtmosModel.h:76
double AtmosHahgsb() const
Return atmospheric Hahgsb value.
Definition: AtmosModel.h:159
double p_sbar
Illumination of the ground by the sky.
Definition: AtmosModel.h:278
vector< double > AtmosHahgt0Table()
Return atmospheric Hahgt0Table value.
Definition: AtmosModel.h:184
vector< double > AtmosIncTable()
Return atmospheric IncTable value.
Definition: AtmosModel.h:172
double AtmosHnorm() const
Return atmospheric Hnorm value.
Definition: AtmosModel.h:126
double AtmosMunot() const
Return atmospheric Munot value.
Definition: AtmosModel.h:167
Container for cube-like labels.
Definition: Pvl.h:135
double p_transs
Transmission of light that must be subtracted from the flat surface model to get the shadow model...
Definition: AtmosModel.h:277
double p_pstd
Pure atmospheric-scattering term.
Definition: AtmosModel.h:274
int AtmosNinc() const
Return atmospheric Ninc value.
Definition: AtmosModel.h:163
bool AtmosNulneg() const
Return atmospheric Nulneg value.
Definition: AtmosModel.h:151
double AtmosTau() const
Return atmospheric Tau value.
Definition: AtmosModel.h:135
virtual ~AtmosModel()
Empty destructor.
Definition: AtmosModel.h:80
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double AtmosAb() const
Return atmospheric Ab value.
Definition: AtmosModel.h:155
double AtmosWha() const
Return atmospheric Wha value.
Definition: AtmosModel.h:139
NumericalApproximation AtmosHahgtSpline()
If GenerateHahgTables() has been called this returns a clamped cubic spline of the data set (p_atmosI...
Definition: AtmosModel.h:213
vector< double > AtmosHahgtTable()
Return atmospheric HahgtTable value.
Definition: AtmosModel.h:180
This class extends Isis::NumericalApproximation.
string AlgorithmName() const
Return atmospheric algorithm name.
Definition: AtmosModel.h:116
double AtmosBha() const
Return atmospheric Bha value.
Definition: AtmosModel.h:131
vector< double > AtmosAhTable()
Return atmospheric AhTable value.
Definition: AtmosModel.h:176