13 PvlGroup &algorithm = pvl.findObject(
"NormalizationModel").findGroup(
"Algorithm", Pvl::Traverse);
20 if(algorithm.hasKeyword(
"Incref")) {
21 SetNormIncref(algorithm[
"Incref"]);
24 if(algorithm.hasKeyword(
"Pharef")) {
25 SetNormPharef(algorithm[
"Pharef"]);
28 p_normPharef = p_normIncref;
31 if(algorithm.hasKeyword(
"Emaref")) {
32 SetNormEmaref(algorithm[
"Emaref"]);
35 if(algorithm.hasKeyword(
"Albedo")) {
36 SetNormAlbedo(algorithm[
"Albedo"]);
40 void Shade::NormModelAlgorithm(
double phase,
double incidence,
double emission,
41 double demincidence,
double dememission,
double dn,
42 double &albedo,
double &mult,
double &base) {
47 GetPhotoModel()->SetStandardConditions(
true);
48 psurfref = GetPhotoModel()->CalcSurfAlbedo(p_normPharef, p_normIncref, p_normEmaref);
49 GetPhotoModel()->SetStandardConditions(
false);
52 std::string msg =
"Divide by zero error";
53 throw IException(IException::Unknown, msg, _FILEINFO_);
56 rho = p_normAlbedo / psurfref;
58 albedo = rho * GetPhotoModel()->CalcSurfAlbedo(phase, demincidence, dememission);
71 if(pharef < 0.0 || pharef >= 180.0) {
72 std::string msg =
"Invalid value of normalization pharef [" + IString(pharef) +
"]";
73 throw IException(IException::User, msg, _FILEINFO_);
76 p_normPharef = pharef;
89 if(incref < 0.0 || incref >= 90.0) {
90 std::string msg =
"Invalid value of normalization incref [" + IString(incref) +
"]";
91 throw IException(IException::User, msg, _FILEINFO_);
94 p_normIncref = incref;
107 if(emaref < 0.0 || emaref >= 90.0) {
108 std::string msg =
"Invalid value of normalization emaref [" + IString(emaref) +
"]";
109 throw IException(IException::User, msg, _FILEINFO_);
112 p_normEmaref = emaref;
125 p_normAlbedo = albedo;
void SetNormEmaref(const double emaref)
Set the normalization function parameter.
void SetNormPharef(const double pharef)
Set parameters needed for albedo normalization.
void SetNormAlbedo(const double albedo)
Set the normalization function parameter.
void SetNormIncref(const double incref)
Set the normalization function parameter.
This is free and unencumbered software released into the public domain.