Isis Developer Reference
AtmosModel.h
Go to the documentation of this file.
1#ifndef AtmosModel_h
2#define AtmosModel_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include <string>
11#include <vector>
12#include "PhotoModel.h"
15
16using namespace std;
17namespace 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).
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
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
257
258 double p_pstd;
259 double p_trans;
260 double p_trans0;
261 double p_transs;
262 double p_sbar;
266 double p_atmosAb;
270 vector <double> p_atmosIncTable;
271 vector <double> p_atmosAhTable;
273 vector <double> p_atmosHahgtTable;
274 vector <double> p_atmosHahgt0Table;
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;
301 };
302};
303
304#endif
Isotropic atmos scattering model.
Definition AtmosModel.h:60
double p_trans
Transmission of surface reflected light through the atmosphere overall.
Definition AtmosModel.h:259
static double En(unsigned int n, double x)
This routine evaluates the generalized exponential integral, En(x).
Definition AtmosModel.cpp:370
void SetAtmosHga(const double hga)
Set the Hapke atmospheric function parameter.
Definition AtmosModel.cpp:820
double p_atmosEulgam
Definition AtmosModel.h:280
double p_atmosHnorm
Atmospheric shell thickness normalized to planet radius.
Definition AtmosModel.h:267
NumericalApproximation AtmosHahgtSpline()
If GenerateHahgTables() has been called this returns a clamped cubic spline of the data set (p_atmosI...
Definition AtmosModel.h:197
double AtmosHahgsb() const
Return atmospheric Hahgsb value.
Definition AtmosModel.h:143
double p_atmosTau
Definition AtmosModel.h:264
double p_sbar
Illumination of the ground by the sky.
Definition AtmosModel.h:262
NumericalApproximation AtmosHahgt0Spline()
If GenerateHahgTables() has been called this returns a clamped cubic spline of the data set (p_atmosI...
Definition AtmosModel.h:211
double p_atmosHgasave
Definition AtmosModel.h:253
bool p_atmosEstTau
Estimate optical depth tau using shadows.
Definition AtmosModel.h:269
vector< double > p_atmosAhTable
Definition AtmosModel.h:271
vector< double > AtmosHahgt0Table()
Return atmospheric Hahgt0Table value.
Definition AtmosModel.h:168
void SetAtmosInc(const double inc)
Set the incidence angle.
Definition AtmosModel.cpp:839
double AtmosHnorm() const
Return atmospheric Hnorm value.
Definition AtmosModel.h:110
void SetOldWha(double wha)
Definition AtmosModel.h:233
int p_atmosAtmSwitch
Definition AtmosModel.h:248
void SetAtmosIord(bool offset)
Definition AtmosModel.h:224
void SetAtmosEstTau(const string esttau)
Estimate the optical depth tau using shadows.
Definition AtmosModel.cpp:1002
NumericalApproximation p_atmosAhSpline
Spline object for the atmospheric Ah Table. Properties are set in GenerateAhTable().
Definition AtmosModel.h:283
double AtmosBha() const
Return atmospheric Bha value.
Definition AtmosModel.h:115
double p_atmosTausave
Definition AtmosModel.h:255
double p_atmosTauref
Definition AtmosModel.h:254
double p_atmosCosphi
Definition AtmosModel.h:279
double AtmosTau() const
Return atmospheric Tau value.
Definition AtmosModel.h:119
static double G11Prime(double tau)
Perform Chandra and Van de Hulst's series approximation for the g'11 function needed in second order ...
Definition AtmosModel.cpp:153
vector< double > AtmosIncTable()
Return atmospheric IncTable value.
Definition AtmosModel.h:156
double AtmosMunot() const
Return atmospheric Munot value.
Definition AtmosModel.h:151
void SetAtmosWha(const double wha)
Set the Atmospheric function parameter.
Definition AtmosModel.cpp:941
void SetOldTau(double tau)
Definition AtmosModel.h:230
double p_atmosBha
Definition AtmosModel.h:251
bool p_atmosAddOffset
Allow additive offset in fit.
Definition AtmosModel.h:268
double p_atmosWhasave
Definition AtmosModel.h:256
void SetAtmosTau(const double tau)
Set the Atmospheric function parameter.
Definition AtmosModel.cpp:903
void SetAtmosBha(const double bha)
Set the Anisotropic Atmospheric function parameter.
Definition AtmosModel.cpp:799
double p_transs
Transmission of light that must be subtracted from the flat surface model to get the shadow model.
Definition AtmosModel.h:261
NumericalApproximation AtmosAhSpline()
If GenerateAhTable() has been called this returns a clamped cubic spline of the data set (p_atmosIncT...
Definition AtmosModel.h:183
NumericalApproximation p_atmosHahgt0Spline
Spline object for the atmospheric Hahg0 Table. Properties are set in GenerateHahgTables().
Definition AtmosModel.h:287
void SetAtmosNulneg(bool nulneg)
Definition AtmosModel.h:221
static double Ei(double x)
This routine computes the exponential integral, Ei(x).
Definition AtmosModel.cpp:229
void SetAtmosIord(const string offset)
Set additive offset in fit.
Definition AtmosModel.cpp:983
double p_atmosAb
Definition AtmosModel.h:266
double AtmosTauref() const
Return atmospheric Tauref value.
Definition AtmosModel.h:131
double p_atmosPhi
Definition AtmosModel.h:276
vector< double > p_atmosHahgtTable
Definition AtmosModel.h:273
double AtmosAb() const
Return atmospheric Ab value.
Definition AtmosModel.h:139
void GenerateAhTable()
This method computes the values of the atmospheric Ah table and sets the properties of the atmospheri...
Definition AtmosModel.cpp:537
void SetAtmosHnorm(const double hnorm)
Set the Atmospheric function parameter.
Definition AtmosModel.cpp:968
PhotoModel * GetPhotoModel() const
Definition AtmosModel.h:237
vector< double > p_atmosHahgt0Table
Definition AtmosModel.h:274
void SetAtmosAtmSwitch(const int atmswitch)
Set the switch that controls the function that will be integrated.
Definition AtmosModel.cpp:779
vector< double > AtmosAhTable()
Return atmospheric AhTable value.
Definition AtmosModel.h:160
virtual void SetStandardConditions(bool standard)
Used to calculate atmosphere at standard conditions.
Definition AtmosModel.cpp:498
void SetAlgorithmName(string name)
Definition AtmosModel.h:218
void GenerateHahgTablesShadow()
This method is a modified version of the GenerateHahgTables method and is used solely for shadow mode...
Definition AtmosModel.cpp:726
AtmosModel(Pvl &pvl, PhotoModel &pmodel)
Create an AtmosModel object.
Definition AtmosModel.cpp:41
virtual void AtmosModelAlgorithm(double phase, double incidence, double emission)=0
int p_atmosNinc
Definition AtmosModel.h:249
double p_atmosSini
Definition AtmosModel.h:278
double p_pstd
Pure atmospheric-scattering term.
Definition AtmosModel.h:258
void SetAtmosPhi(const double phi)
Set the azimuth angle.
Definition AtmosModel.cpp:884
vector< double > AtmosHahgtTable()
Return atmospheric HahgtTable value.
Definition AtmosModel.h:164
void SetAtmosNulneg(const string nulneg)
Set the Atmospheric function parameter.
Definition AtmosModel.cpp:861
double p_atmosInc
Definition AtmosModel.h:275
double p_atmosHga
Definition AtmosModel.h:263
double p_trans0
Transmission of surface reflected light through the atmosphere with no scatterings in the atmosphere.
Definition AtmosModel.h:260
void CalcAtmEffect(double pha, double inc, double ema, double *pstd, double *trans, double *trans0, double *sbar, double *transs)
Calculate the atmospheric scattering effect using photometric angle information.
Definition AtmosModel.cpp:475
double p_atmosBhasave
Definition AtmosModel.h:252
bool AtmosAdditiveOffset() const
Allow additive offset in fit?
Definition AtmosModel.h:105
NumericalApproximation p_atmosHahgtSpline
Spline object for the atmospheric Hahg Table. Properties are set in GenerateHahgTables().
Definition AtmosModel.h:285
double p_atmosMunot
Definition AtmosModel.h:277
void SetAtmosEstTau(bool esttau)
Definition AtmosModel.h:227
double Eulgam() const
Definition AtmosModel.h:244
int AtmosNinc() const
Return atmospheric Ninc value.
Definition AtmosModel.h:147
double AtmosWha() const
Return atmospheric Wha value.
Definition AtmosModel.h:123
double p_atmosHahgsb
Definition AtmosModel.h:272
bool AtmosNulneg() const
Return atmospheric Nulneg value.
Definition AtmosModel.h:135
void GenerateHahgTables()
This method computes the values of the atmospheric Hahg and Hahg0 tables and sets the properties of t...
Definition AtmosModel.cpp:637
virtual ~AtmosModel()
Empty destructor.
Definition AtmosModel.h:64
double p_atmosWha
Definition AtmosModel.h:265
string AlgorithmName() const
Return atmospheric algorithm name.
Definition AtmosModel.h:100
double AtmosHga() const
Return atmospheric Hga value.
Definition AtmosModel.h:127
bool StandardConditions() const
Definition AtmosModel.h:240
void SetAtmosTauref(const double tauref)
Set the Atmospheric function parameter.
Definition AtmosModel.cpp:922
vector< double > p_atmosIncTable
Definition AtmosModel.h:270
bool TauOrWhaChanged() const
Checks whether tau or wha have changed.
Definition AtmosModel.cpp:954
NumericalApproximation provides various numerical analysis methods of interpolation,...
Definition NumericalApproximation.h:726
This class extends Isis::NumericalApproximation.
Definition NumericalAtmosApprox.h:32
Definition PhotoModel.h:41
Container for cube-like labels.
Definition Pvl.h:119
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Namespace for the standard library.