6 Shade::Shade(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) {
7 PvlGroup &algorithm = pvl.findObject(
"NormalizationModel").findGroup(
"Algorithm",
Pvl::Traverse);
14 if(algorithm.hasKeyword(
"Incref")) {
15 SetNormIncref(algorithm[
"Incref"]);
18 if(algorithm.hasKeyword(
"Pharef")) {
19 SetNormPharef(algorithm[
"Pharef"]);
22 p_normPharef = p_normIncref;
25 if(algorithm.hasKeyword(
"Emaref")) {
26 SetNormEmaref(algorithm[
"Emaref"]);
29 if(algorithm.hasKeyword(
"Albedo")) {
30 SetNormAlbedo(algorithm[
"Albedo"]);
34 void Shade::NormModelAlgorithm(
double phase,
double incidence,
double emission,
35 double demincidence,
double dememission,
double dn,
36 double &albedo,
double &mult,
double &base) {
42 psurfref = GetPhotoModel()->
CalcSurfAlbedo(p_normPharef, p_normIncref, p_normEmaref);
46 std::string msg =
"Divide by zero error";
50 rho = p_normAlbedo / psurfref;
52 albedo = rho * GetPhotoModel()->
CalcSurfAlbedo(phase, demincidence, dememission);
65 if(pharef < 0.0 || pharef >= 180.0) {
66 std::string msg =
"Invalid value of normalization pharef [" +
IString(pharef) +
"]";
70 p_normPharef = pharef;
83 if(incref < 0.0 || incref >= 90.0) {
84 std::string msg =
"Invalid value of normalization incref [" +
IString(incref) +
"]";
88 p_normIncref = incref;
101 if(emaref < 0.0 || emaref >= 90.0) {
102 std::string msg =
"Invalid value of normalization emaref [" +
IString(emaref) +
"]";
106 p_normEmaref = emaref;
119 p_normAlbedo = albedo;
void SetNormPharef(const double pharef)
Set parameters needed for albedo normalization.
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 SetNormIncref(const double incref)
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.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
virtual void SetStandardConditions(bool standard)
Sets whether standard conditions will be used.