|
Isis 3 Programmer Reference
|
3 #include "NumericalApproximation.h"
4 #include "IException.h"
7 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
8 #define MAX(x,y) (((x) > (y)) ? (x) : (y))
87 double demincidence,
double dememission,
double dn,
88 double &albedo,
double &mult,
double &base) {
90 static double ahInterp;
106 static double old_phase = -9999;
107 static double old_incidence = -9999;
108 static double old_emission = -9999;
109 static double old_demincidence = -9999;
110 static double old_dememission = -9999;
112 if (old_phase != phase || old_incidence != incidence || old_emission != emission ||
113 old_demincidence != demincidence || old_dememission != dememission) {
120 munot = cos(incidence * (
PI / 180.0));
123 old_incidence = incidence;
124 old_emission = emission;
125 old_demincidence = demincidence;
126 old_dememission = dememission;
134 dpm = (psurf - ahInterp * munot) * trans0;
135 q = ahInterp * munot * trans + GetAtmosModel()->
AtmosAb() *
p_normSbar * dpo + dpm;
137 if(dpo <= 0.0 && GetAtmosModel()->AtmosNulneg()) {
142 secondterm = dpo * dpm;
143 thirdterm = firsterm * secondterm;
144 fourthterm = pow(q, 2.0) - 4.0 * thirdterm;
146 if(fourthterm < 0.0) {
147 QString msg =
"Square root of negative (math) encountered";
151 fifthterm = q + sqrt(fourthterm);
154 rho = 2 * dpo / fifthterm;
158 if((1.0 - rho * GetAtmosModel()->AtmosAb()*
p_normSbar) <= 0.0) {
159 QString msg =
"Divide by zero (math) encountered";
180 if(pharef < 0.0 || pharef >= 180.0) {
181 QString msg =
"Invalid value of normalization pharef [" +
199 if(incref < 0.0 || incref >= 90.0) {
200 QString msg =
"Invalid value of normalization incref [" +
218 if(emaref < 0.0 || emaref >= 90.0) {
219 QString msg =
"Invalid value of normalization emaref [" +
virtual void NormModelAlgorithm(double pha, double inc, double ema, double dn, double &albedo, double &mult, double &base)
Performs the normalization.
@ Extrapolate
Evaluate() attempts to extrapolate if a is outside of the domain. This is only valid for NumericalApp...
const double PI
The mathematical constant PI.
void SetNormPharef(const double pharef)
Set parameters needed for albedo normalization.
@ Unknown
A type of error that cannot be classified as any of the other error types.
void SetNormIncref(const double incref)
Set the normalization function parameter.
Isotropic atmos scattering model.
void SetNormEmaref(const double emaref)
Set the normalization function parameter.
double p_normIncref
The reference incidence angle.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
double CalcSurfAlbedo(double pha, double inc, double ema)
Calculate the surface brightness using photometric angle information.
Container for cube-like labels.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
AlbedoAtm(Pvl &pvl, PhotoModel &pmodel, AtmosModel &amodel)
Constructs AlbedoAtm object using a Pvl, PhotoModel, and AtmosModel.
@ Traverse
Search child objects.
Albedo normalization with atmosphere.
Contains multiple PvlContainers.
void GenerateAhTable()
This method computes the values of the atmospheric Ah table and sets the properties of the atmospheri...
NumericalApproximation AtmosAhSpline()
If GenerateAhTable() has been called this returns a clamped cubic spline of the data set (p_atmosIncT...
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
double p_normEmaref
The reference emission angle.
double p_normTrans0ref
???
virtual void SetStandardConditions(bool standard)
Sets whether standard conditions will be used.
double AtmosAb() const
Return atmospheric Ab value.
double p_normPharef
The reference phase angle.
virtual void SetStandardConditions(bool standard)
Used to calculate atmosphere at standard conditions.
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.
This is free and unencumbered software released into the public domain.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....