|
Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef AtmosModel_h 00002 #define AtmosModel_h 00003 00026 #include <string> 00027 #include <vector> 00028 #include "PhotoModel.h" 00029 #include "NumericalApproximation.h" 00030 #include "NumericalAtmosApprox.h" 00031 00032 using namespace std; 00033 namespace Isis { 00034 class Pvl; 00035 00076 class AtmosModel { 00077 public: 00078 AtmosModel(Pvl &pvl, PhotoModel &pmodel); 00080 virtual ~AtmosModel() {}; 00081 00082 // These methods were moved here from the NumericalMethods class 00083 static double G11Prime(double tau); 00084 static double Ei(double x); 00085 static double En(unsigned int n, double x); 00086 // Calculate atmospheric scattering effect 00087 void CalcAtmEffect(double pha, double inc, double ema, double *pstd, 00088 double *trans, double *trans0, double *sbar, double *transs); 00089 // Used to calculate atmosphere at standard conditions 00090 virtual void SetStandardConditions(bool standard); 00091 // Obtain hemispheric and bihemispheric albedo by integrating the photometric function 00092 void GenerateAhTable(); 00093 // Perform integration for Hapke Henyey-Greenstein atmosphere correction 00094 void GenerateHahgTables(); 00095 // Perform integration for Hapke Henyey-Greenstein atmosphere correction. This 00096 // version is used for shadow modeling and does not tabulate the first and third 00097 // integrals like GenerateHahgTables. It only evaluates the middle integral 00098 // that corrects the sbar variable (which is the illumination of the ground 00099 // by the sky). 00100 void GenerateHahgTablesShadow(); 00101 // Set parameters needed for atmospheric correction 00102 void SetAtmosAtmSwitch(const int atmswitch); 00103 void SetAtmosBha(const double bha); 00104 void SetAtmosHga(const double hga); 00105 void SetAtmosInc(const double inc); 00106 void SetAtmosNulneg(const string nulneg); 00107 void SetAtmosPhi(const double phi); 00108 void SetAtmosTau(const double tau); 00109 void SetAtmosTauref(const double tauref); 00110 void SetAtmosWha(const double wha); 00111 void SetAtmosHnorm(const double hnorm); 00112 void SetAtmosIord(const string offset); 00113 void SetAtmosEstTau(const string esttau); 00114 00116 string AlgorithmName() const { 00117 return p_atmosAlgorithmName; 00118 }; 00119 00121 bool AtmosAdditiveOffset() const { 00122 return p_atmosAddOffset; 00123 }; 00124 00126 double AtmosHnorm() const { 00127 return p_atmosHnorm; 00128 }; 00129 00131 double AtmosBha() const { 00132 return p_atmosBha; 00133 }; 00135 double AtmosTau() const { 00136 return p_atmosTau; 00137 }; 00139 double AtmosWha() const { 00140 return p_atmosWha; 00141 }; 00143 double AtmosHga() const { 00144 return p_atmosHga; 00145 }; 00147 double AtmosTauref() const { 00148 return p_atmosTauref; 00149 }; 00151 bool AtmosNulneg() const { 00152 return p_atmosNulneg; 00153 }; 00155 double AtmosAb() const { 00156 return p_atmosAb; 00157 }; 00159 double AtmosHahgsb() const { 00160 return p_atmosHahgsb; 00161 }; 00163 int AtmosNinc() const { 00164 return p_atmosNinc; 00165 }; 00167 double AtmosMunot() const { 00168 return p_atmosMunot; 00169 }; 00170 00172 vector <double> AtmosIncTable() { 00173 return p_atmosIncTable; 00174 }; 00176 vector <double> AtmosAhTable() { 00177 return p_atmosAhTable; 00178 }; 00180 vector <double> AtmosHahgtTable() { 00181 return p_atmosHahgtTable; 00182 }; 00184 vector <double> AtmosHahgt0Table() { 00185 return p_atmosHahgt0Table; 00186 }; 00187 00199 NumericalApproximation AtmosAhSpline() { 00200 return p_atmosAhSpline; 00201 }; 00213 NumericalApproximation AtmosHahgtSpline() { 00214 return p_atmosHahgtSpline; 00215 }; 00227 NumericalApproximation AtmosHahgt0Spline() { 00228 return p_atmosHahgt0Spline; 00229 }; 00230 00231 protected: 00232 virtual void AtmosModelAlgorithm(double phase, double incidence, double emission) = 0; 00233 00234 void SetAlgorithmName(string name) { 00235 p_atmosAlgorithmName = name; 00236 } 00237 void SetAtmosNulneg(bool nulneg) { 00238 p_atmosNulneg = nulneg; 00239 } 00240 void SetAtmosIord(bool offset) { 00241 p_atmosAddOffset = offset; 00242 } 00243 void SetAtmosEstTau(bool esttau) { 00244 p_atmosEstTau = esttau; 00245 } 00246 void SetOldTau(double tau) { 00247 p_atmosTauold = tau; 00248 } 00249 void SetOldWha(double wha) { 00250 p_atmosWhaold = wha; 00251 } 00252 00253 PhotoModel *GetPhotoModel() const { 00254 return p_atmosPM; 00255 } 00256 bool StandardConditions() const { 00257 return p_standardConditions; 00258 } 00259 bool TauOrWhaChanged() const; 00260 double Eulgam() const { 00261 return p_atmosEulgam; 00262 } 00263 00264 int p_atmosAtmSwitch; 00265 int p_atmosNinc; 00266 00267 double p_atmosBha; 00268 double p_atmosBhasave; 00269 double p_atmosHgasave; 00270 double p_atmosTauref; 00271 double p_atmosTausave; 00272 double p_atmosWhasave; 00273 00274 double p_pstd; 00275 double p_trans; 00276 double p_trans0; 00277 double p_transs; 00278 double p_sbar; 00279 double p_atmosHga; 00280 double p_atmosTau; 00281 double p_atmosWha; 00282 double p_atmosAb; 00283 double p_atmosHnorm; 00284 bool p_atmosAddOffset; 00285 bool p_atmosEstTau; 00286 vector <double> p_atmosIncTable; 00287 vector <double> p_atmosAhTable; 00288 double p_atmosHahgsb; 00289 vector <double> p_atmosHahgtTable; 00290 vector <double> p_atmosHahgt0Table; 00291 double p_atmosInc; 00292 double p_atmosPhi; 00293 double p_atmosMunot; 00294 double p_atmosSini; 00295 double p_atmosCosphi; 00296 double p_atmosEulgam; 00297 00299 NumericalApproximation p_atmosAhSpline; 00301 NumericalApproximation p_atmosHahgtSpline; 00303 NumericalApproximation p_atmosHahgt0Spline; 00304 00305 private: 00306 bool p_standardConditions; 00307 00308 string p_atmosAlgorithmName; 00309 00310 PhotoModel *p_atmosPM; 00311 00312 bool p_atmosNulneg; 00313 00314 double p_atmosTauold; 00315 double p_atmosWhaold; 00316 friend class NumericalAtmosApprox; 00317 }; 00318 }; 00319 00320 #endif