Isis 3 Programmer Reference
PhotoModel.h
1 #ifndef PhotoModel_h
2 #define PhotoModel_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <string>
11 #include <vector>
12 
13 #include <QString>
14 #include "NumericalApproximation.h"
15 #include "Pvl.h"
16 
17 namespace Isis {
41  class PhotoModel {
42  public:
43  PhotoModel(Pvl &pvl);
44  virtual ~PhotoModel() {};
45 
47  inline QString AlgorithmName() const {
48  return p_photoAlgorithmName;
49  }
50 
51  virtual void SetStandardConditions(bool standard);
53  bool StandardConditions() const {
54  return p_standardConditions;
55  }
56 
57  // Obtain topographic derivative
58  double PhtTopder(double phase, double incidence, double emission);
59 
60  // Obtain arccosine
61  static double PhtAcos(double cosang);
62 
63  // Calculate the surface brightness
64  double CalcSurfAlbedo(double pha, double inc, double ema);
65 
66  virtual void SetPhotoL(const double l) {
67  p_photoL = l;
68  }
69 
71  inline double PhotoL() const {
72  return p_photoL;
73  }
74 
75  virtual void SetPhotoK(const double k) {
76  p_photoK = k;
77  }
78 
80  inline double PhotoK() const {
81  return p_photoK;
82  }
83 
84  virtual void SetPhotoHg1(const double hg1) {
85  p_photoHg1 = hg1;
86  }
87 
89  inline double PhotoHg1() const {
90  return p_photoHg1;
91  }
92 
93  virtual void SetPhotoHg2(const double hg2) {
94  p_photoHg2 = hg2;
95  }
96 
98  inline double PhotoHg2() const {
99  return p_photoHg2;
100  }
101 
102  virtual void SetPhotoBh(const double bh) {
103  p_photoBh = bh;
104  }
105 
107  inline double PhotoBh() const {
108  return p_photoBh;
109  }
110 
111  virtual void SetPhotoCh(const double ch) {
112  p_photoCh = ch;
113  }
114 
116  inline double PhotoCh() const {
117  return p_photoCh;
118  }
119 
120  virtual void SetPhotoWh(const double wh) {
121  p_photoWh = wh;
122  }
123 
125  inline double PhotoWh() const {
126  return p_photoWh;
127  }
128 
129  virtual void SetPhotoHh(const double hh) {
130  p_photoHh = hh;
131  }
132 
134  inline double PhotoHh() const {
135  return p_photoHh;
136  }
137 
138  virtual void SetPhotoB0(const double b0) {
139  p_photoB0 = b0;
140  }
141 
143  inline double PhotoB0() const {
144  return p_photoB0;
145  }
146 
147  virtual void SetPhotoTheta(const double theta) {
148  p_photoTheta = theta;
149  }
150 
152  inline double PhotoTheta() const {
153  return p_photoTheta;
154  }
155 
156  // virtual void SetOldTheta(double theta) = 0;
157 
158  virtual void SetPhoto0B0Standard(const QString &b0standard) {
159  p_photo0B0Standard = b0standard;
160  }
161 
163  inline QString Photo0B0Standard() const {
164  return p_photo0B0Standard;
165  }
166 
168  inline double Hfunc(double u, double gamma) {
169  return (1.0 + 2.0 * u) / (1.0 + 2.0 * u * gamma);
170  }
171 
172  virtual void SetPhotoPhaseList(const QString) {}
173  virtual void SetPhotoKList(const QString) {}
174  virtual void SetPhotoLList(const QString) {}
175  virtual void SetPhotoPhaseCurveList(const QString) {}
176 
178  inline std::vector<double> PhotoPhaseList() const {
179  return p_photoPhaseList;
180  }
181 
183  inline std::vector<double> PhotoKList() const {
184  return p_photoKList;
185  }
186 
188  inline std::vector<double> PhotoLList() const {
189  return p_photoLList;
190  }
191 
193  inline std::vector<double> PhotoPhaseCurveList() const {
194  return p_photoPhaseCurveList;
195  }
196 
197  protected:
198  virtual double PhotoModelAlgorithm(double phase,
199  double incidence, double emission) = 0;
200 
201  double p_photoL;
202  double p_photoK;
203  double p_photoHg1;
204  double p_photoHg2;
205  double p_photoBh;
206  double p_photoCh;
207  double p_photoCott;
208  double p_photoCot2t;
209  double p_photoTant;
210  double p_photoSr;
211  double p_photoOsr;
212  QString p_algName;
213  QString p_photo0B0Standard;
214  double p_photoWh;
215  double p_photoHh;
216  double p_photoB0;
217  double p_photoB0save;
218  double p_photoTheta;
219  double p_photoThetaold;
220 
221  std::vector<double> p_photoPhaseList;
222  std::vector<double> p_photoKList;
223  std::vector<double> p_photoLList;
224  std::vector<double> p_photoPhaseCurveList;
225  int p_photoPhaseAngleCount;
226  NumericalApproximation p_photoKSpline;
227  NumericalApproximation p_photoLSpline;
228  NumericalApproximation p_photoBSpline;
229 
230  private:
235  };
236 };
237 
238 #endif
Isis::PhotoModel
Definition: PhotoModel.h:41
Isis::PhotoModel::PhotoPhaseList
std::vector< double > PhotoPhaseList() const
Return photometric phase angle list.
Definition: PhotoModel.h:178
Isis::PhotoModel::PhotoModel
PhotoModel(Pvl &pvl)
Create a PhotoModel object.
Definition: PhotoModel.cpp:26
Isis::PhotoModel::PhotoCh
double PhotoCh() const
Return photometric Ch value.
Definition: PhotoModel.h:116
Isis::PhotoModel::AlgorithmName
QString AlgorithmName() const
Return algorithm name found in Pvl file from constructor.
Definition: PhotoModel.h:47
Isis::PhotoModel::CalcSurfAlbedo
double CalcSurfAlbedo(double pha, double inc, double ema)
Calculate the surface brightness using photometric angle information.
Definition: PhotoModel.cpp:177
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::PhotoModel::PhotoB0
double PhotoB0() const
Return photometric B0 value.
Definition: PhotoModel.h:143
Isis::PhotoModel::PhtTopder
double PhtTopder(double phase, double incidence, double emission)
Obtain topographic derivative of an arbitrary photometric function.
Definition: PhotoModel.cpp:64
Isis::PhotoModel::PhotoPhaseCurveList
std::vector< double > PhotoPhaseCurveList() const
Return photometric phase curve value list.
Definition: PhotoModel.h:193
Isis::PhotoModel::StandardConditions
bool StandardConditions() const
Returns true if standard conditions are used, i.e., if SetStandardConditions(true) has been called....
Definition: PhotoModel.h:53
Isis::PhotoModel::PhotoKList
std::vector< double > PhotoKList() const
Return photometric k value list.
Definition: PhotoModel.h:183
Isis::PhotoModel::PhotoBh
double PhotoBh() const
Return photometric Bh value.
Definition: PhotoModel.h:107
Isis::PhotoModel::p_standardConditions
bool p_standardConditions
Indicates whether standard conditions are used.
Definition: PhotoModel.h:234
Isis::PhotoModel::PhotoK
double PhotoK() const
Return photometric K value.
Definition: PhotoModel.h:80
Isis::PhotoModel::PhotoHg1
double PhotoHg1() const
Return photometric Hg1 value.
Definition: PhotoModel.h:89
Isis::PhotoModel::PhotoWh
double PhotoWh() const
Return photometric Wh value.
Definition: PhotoModel.h:125
Isis::PhotoModel::SetStandardConditions
virtual void SetStandardConditions(bool standard)
Sets whether standard conditions will be used.
Definition: PhotoModel.cpp:50
Isis::PhotoModel::PhtAcos
static double PhtAcos(double cosang)
Obtain arccosine of input value.
Definition: PhotoModel.cpp:150
Isis::PhotoModel::PhotoLList
std::vector< double > PhotoLList() const
Return photometric l value list.
Definition: PhotoModel.h:188
Isis::PhotoModel::Photo0B0Standard
QString Photo0B0Standard() const
Return photometric B0 standardization value.
Definition: PhotoModel.h:163
Isis::PhotoModel::PhotoHh
double PhotoHh() const
Return photometric Hh value.
Definition: PhotoModel.h:134
Isis::PhotoModel::Hfunc
double Hfunc(double u, double gamma)
Hapke's approximation to Chandra's H function.
Definition: PhotoModel.h:168
Isis::PhotoModel::PhotoL
double PhotoL() const
Return photometric L value.
Definition: PhotoModel.h:71
Isis::NumericalApproximation
NumericalApproximation provides various numerical analysis methods of interpolation,...
Definition: NumericalApproximation.h:726
Isis::PhotoModel::p_photoAlgorithmName
QString p_photoAlgorithmName
Unique name of the photometric model.
Definition: PhotoModel.h:232
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::PhotoModel::PhotoTheta
double PhotoTheta() const
Return photometric Theta value.
Definition: PhotoModel.h:152
Isis::PhotoModel::PhotoHg2
double PhotoHg2() const
Return photometric Hg2 value.
Definition: PhotoModel.h:98