Isis 3 Programmer Reference
|
#include <Photometry.h>
Public Member Functions | |
Photometry (Pvl &pvl) | |
Create Photometry object. More... | |
virtual | ~Photometry () |
Destroy Photometry object. More... | |
void | Compute (double pha, double inc, double ema, double dn, double &albedo, double &mult, double &base) |
Calculate the surface brightness. More... | |
void | Compute (double pha, double inc, double ema, double deminc, double demema, double dn, double &albedo, double &mult, double &base) |
Calculate the surface brightness using ellipsoid and dem. More... | |
virtual void | SetPhotomWl (double wl) |
Set the wavelength. More... | |
PhotoModel * | GetPhotoModel () const |
AtmosModel * | GetAtmosModel () const |
NormModel * | GetNormModel () const |
Static Public Member Functions | |
static void | minbracket (double &xa, double &xb, double &xc, double &fa, double &fb, double &fc, double Func(double par, void *params), void *params) |
Double precision version of bracketing algorithm ported from Python. Solution bracketing for 1-D minimization routine. More... | |
static int | brentminimizer (double x_lower, double x_upper, gsl_function *Func, double &x_minimum, double tolerance) |
Brent's method 1-D minimization routine using GSL's r8Brent minimization Algorithm. More... | |
static int | brentsolver (double x_lo, double x_hi, gsl_function *Func, double tolerance, double &root) |
GSL's the Brent-Dekker method (Brent's method) combines an interpolation strategy with the bisection algorithm to estimate the root of the quadratic function. More... | |
Protected Attributes | |
AtmosModel * | p_phtAmodel |
PhotoModel * | p_phtPmodel |
NormModel * | p_phtNmodel |
2007-08-02 Steven Lambright - Fixed memory leak
2008-03-07 Janet Barrett - Added SetPhotomWl method to allow the application to set the p_normWavelength variable for use by MoonAlbedo normalization.
2008-06-18 Steven Koechle - Fixed Documentation Errors
2008-07-09 Steven Lambright - Fixed unit test
2011-08-19 Sharmila Prasad - Implemented brentminimizer using GSL
2011-09-15 Sharmila Prasad - Implemented brent's root solver using GSL
Definition at line 51 of file Photometry.h.
Isis::Photometry::Photometry | ( | Pvl & | pvl | ) |
Create Photometry object.
pvl | A pvl object containing a valid Photometry specification |
Definition at line 22 of file Photometry.cpp.
References _FILEINFO_, Isis::AtmosModelFactory::Create(), Isis::PhotoModelFactory::Create(), Isis::NormModelFactory::Create(), Isis::PvlObject::hasObject(), and Isis::IException::User.
|
virtual |
Destroy Photometry object.
Definition at line 45 of file Photometry.cpp.
|
static |
Brent's method 1-D minimization routine using GSL's r8Brent minimization Algorithm.
The Brent minimization algorithm combines a parabolic interpolation with the golden section algorithm.
This produces a fast algorithm which is still robust. The outline of the algorithm can be summarized as follows: on each iteration Brent's method approximates the function using an interpolating parabola through three existing points. The minimum of the parabola is taken as a guess for the minimum. If it lies within the bounds of the current interval then the interpolating point is accepted, and used to generate a smaller interval. If the interpolating point is not accepted then the algorithm falls back to an ordinary golden section step. The full details of Brent's method include some additional checks to improve convergence.
x_lower | - x_lower interval |
x_upper | - x_upper interval |
Func | - gsl_function, high-level driver for the algorithm Continuous function of one variable for the minimizers to operate on |
x_minimum | - x_minimum calculated parabola min value |
Definition at line 168 of file Photometry.cpp.
|
static |
GSL's the Brent-Dekker method (Brent's method) combines an interpolation strategy with the bisection algorithm to estimate the root of the quadratic function.
GSL's the Brent-Dekker method (referred to here as Brent's method) combines an interpolation strategy with the bisection algorithm.
This produces a fast algorithm which is still robust.On each iteration Brent's method approximates the function using an interpolating curve. On the first iteration this is a linear interpolation of the two endpoints. For subsequent iterations the algorithm uses an inverse quadratic fit to the last three points, for higher accuracy. The intercept of the interpolating curve with the x-axis is taken as a guess for the root. If it lies within the bounds of the current interval then the interpolating point is accepted, and used to generate a smaller interval. If the interpolating point is not accepted then the algorithm falls back to an ordinary bisection step.
The best estimate of the root is taken from the most recent interpolation or bisection.
x_lo | - Initial lower search interval |
x_hi | - Initial higher search interval |
Func | - Continuous function of one variable for the root finders to operate on |
tolerance | - Root Error Tolerance |
root | - Output calculated root |
Definition at line 125 of file Photometry.cpp.
void Isis::Photometry::Compute | ( | double | pha, |
double | inc, | ||
double | ema, | ||
double | dn, | ||
double & | albedo, | ||
double & | mult, | ||
double & | base | ||
) |
Calculate the surface brightness.
Calculate the surface brightness using only ellipsoid.
Definition at line 77 of file Photometry.cpp.
References Isis::NormModel::CalcNrmAlbedo().
void Isis::Photometry::Compute | ( | double | pha, |
double | inc, | ||
double | ema, | ||
double | deminc, | ||
double | demema, | ||
double | dn, | ||
double & | albedo, | ||
double & | mult, | ||
double & | base | ||
) |
Calculate the surface brightness using ellipsoid and dem.
Definition at line 92 of file Photometry.cpp.
References Isis::NormModel::CalcNrmAlbedo().
|
static |
Double precision version of bracketing algorithm ported from Python. Solution bracketing for 1-D minimization routine.
This bracketing algorithm was taken from http://cxc.harvard.edu/sherpa/methods/fminpowell.py.txt and converted to C++.
Definition at line 207 of file Photometry.cpp.
References _FILEINFO_, and Isis::IException::User.
|
virtual |
Set the wavelength.
Set the wavelength parameter.
This value is obtained from the BandBin Center keyword of the image.
Definition at line 67 of file Photometry.cpp.
References Isis::NormModel::SetNormWavelength().