8 Albedo::Albedo(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) {
9 PvlGroup &algorithm = pvl.findObject(
"NormalizationModel").findGroup(
"Algorithm",
Pvl::Traverse);
19 if(algorithm.hasKeyword(
"Incref")) {
20 SetNormIncref(algorithm[
"Incref"]);
23 if(algorithm.hasKeyword(
"Pharef")) {
24 SetNormPharef(algorithm[
"Pharef"]);
26 p_normPharef = p_normIncref;
29 if(algorithm.hasKeyword(
"Emaref")) {
30 SetNormEmaref(algorithm[
"Emaref"]);
33 if(algorithm.hasKeyword(
"Incmat")) {
34 SetNormIncmat(algorithm[
"Incmat"]);
37 if(algorithm.hasKeyword(
"Thresh")) {
38 SetNormThresh(algorithm[
"Thresh"]);
41 if(algorithm.hasKeyword(
"Albedo")) {
42 SetNormAlbedo(algorithm[
"Albedo"]);
46 GetPhotoModel()->SetStandardConditions(
true);
47 p_normPsurfref = GetPhotoModel()->CalcSurfAlbedo(p_normPharef, p_normIncref, p_normEmaref);
48 GetPhotoModel()->SetStandardConditions(
false);
52 void Albedo::NormModelAlgorithm(
double phase,
double incidence,
53 double emission,
double demincidence,
double dememission,
54 double dn,
double &albedo,
double &mult,
double &base) {
59 psurf = GetPhotoModel()->
CalcSurfAlbedo(phase, demincidence, dememission);
62 if(p_normPsurfref > psurf * p_normThresh) {
70 QString msg =
"Albedo math divide by zero error";
74 result = dn * p_normPsurfref / psurf;
76 mult = p_normPsurfref / psurf;
92 if(pharef < 0.0 || pharef >= 180.0) {
93 QString msg =
"Invalid value of normalization pharef [" +
97 p_normPharef = pharef;
110 if(incref < 0.0 || incref >= 90.0) {
111 QString msg =
"Invalid value of normalization incref [" +
115 p_normIncref = incref;
128 if(emaref < 0.0 || emaref >= 90.0) {
129 QString msg =
"Invalid value of normalization emaref [" +
133 p_normEmaref = emaref;
143 if(incmat < 0.0 || incmat >= 90.0) {
144 QString msg =
"Invalid value of normalization incmat [" +
148 p_normIncmat = incmat;
160 p_normAlbedo = albedo;
178 p_normThresh = thresh;
void SetNormIncref(const double incref)
Set the normalization function parameter.
void SetNormAlbedo(const double albedo)
Set the normalization function parameter.
double CalcSurfAlbedo(double pha, double inc, double ema)
Calculate the surface brightness using photometric angle information.
void SetNormPharef(const double pharef)
Set parameters needed for albedo normalization.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
void SetNormIncmat(const double incmat)
Set the normalization function parameter.
void SetNormThresh(const double thresh)
Set the normalization function parameter.
#define _FILEINFO_
Macro for the filename and line number.
A type of error that could only have occurred due to a mistake on the user's part (e...
A type of error that cannot be classified as any of the other error types.
Container for cube-like labels.
void SetNormEmaref(const double emaref)
Set the normalization function parameter.