Isis 3.0 Application Source Code Reference |
Home |
00001 #if !defined(Exponential_h) 00002 #define Exponential_h 00003 /** 00004 * @file 00005 * $Revision$ 00006 * $Date$ 00007 * 00008 * Unless noted otherwise, the portions of Isis written by the USGS are 00009 * public domain. See individual third-party library and package descriptions 00010 * for intellectual property information, user agreements, and related 00011 * information. 00012 * 00013 * Although Isis has been used by the USGS, no warranty, expressed or 00014 * implied, is made by the USGS as to the accuracy and functioning of such 00015 * software and related material nor shall the fact of distribution 00016 * constitute any such warranty, and no responsibility is assumed by the 00017 * USGS in connection therewith. 00018 * 00019 * For additional information, launch 00020 * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html 00021 * in a browser or see the Privacy & Disclaimers page on the Isis website, 00022 * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on 00023 * http://www.usgs.gov/privacy.html. 00024 */ 00025 00026 #include <iostream> 00027 #include <sstream> 00028 #include <iomanip> 00029 #include <vector> 00030 00031 #include "PhotometricFunction.h" 00032 #include "iString.h" 00033 #include "Camera.h" 00034 #include "DbProfile.h" 00035 #include "SpecialPixel.h" 00036 00037 namespace Isis { 00038 00039 class PvlObject; 00040 class Camera; 00041 00042 /** 00043 * @brief An implementation of the Exponential photometric function 00044 * 00045 * This class implements the Exponential-Buratti-Hill photometric 00046 * equation as outline in thier paper "Multispectral Photometry 00047 * of the Moon and Absolute Calibration of the Clementine UV/VIS 00048 * Camera", published in Icaris v141, pg. 205-255 (1999). 00049 * 00050 * @author 2010-02-15 Kris Becker 00051 * 00052 * @internal 00053 */ 00054 class Exponential : public PhotometricFunction { 00055 public: 00056 /** 00057 * @brief Create Hilier photometric object 00058 * 00059 */ 00060 Exponential (PvlObject &pvl, Cube &cube, bool useCamera) : PhotometricFunction(pvl, cube, useCamera) {init(pvl, cube);} 00061 00062 //! Destructor 00063 virtual ~Exponential () {} 00064 00065 double photometry ( double i, double e, double g, int band = 1 ) const; 00066 void Report ( PvlContainer &pvl ); 00067 00068 private: 00069 /** 00070 * @brief Container for band photometric correction parameters 00071 * 00072 * @author Kris Becker - 2/21/2010 00073 */ 00074 struct Parameters { 00075 Parameters () : 00076 aTerms(), bTerms(), wavelength(0.0), tolerance(0.0), units("Degrees"), phaUnit(1.0), band(0), phoStd( 00077 0.0), iProfile(-1) { 00078 } 00079 ~Parameters () { 00080 } 00081 bool IsValid () const { 00082 return (iProfile != -1); 00083 } 00084 std::vector<double> aTerms; //<! a-terms for exponential in form a*e^(b*x) 00085 std::vector<double> bTerms; //<! b-terms for exponential in form a*e^(b*x) 00086 double wavelength; //<! Wavelength for correction 00087 double tolerance; //<! Wavelength Range/Tolerance 00088 iString units; //<! Phase units of Hiller eq. 00089 double phaUnit; // 1 for degrees, Pi/180 for radians 00090 int band; //<! Cube band parameters 00091 double phoStd; //<! Computed photometric std. 00092 int iProfile; //<! Profile index of this data 00093 }; 00094 00095 std::vector<DbProfile> _profiles; 00096 std::vector<Parameters> _bandpho; 00097 00098 void init(PvlObject &pvl, Cube &cube); 00099 00100 double photometry ( const Parameters &parms, double i, double e, double g ) const; 00101 00102 Parameters findParameters ( const double wavelength ) const; 00103 Parameters extract ( const DbProfile &profile ) const; 00104 }; 00105 00106 } 00107 ; 00108 00109 #endif 00110