USGS

Isis 3.0 Developer's Reference (API)

Home

MocLabels.h

Go to the documentation of this file.
00001 #ifndef MocLabels_h
00002 #define MocLabels_h
00003 
00025 #include <map>
00026 #include "Filename.h"
00027 
00028 
00029 namespace Isis {
00030   class Pvl;
00057   class MocLabels {
00058     public:
00059       MocLabels(Pvl &lab);
00060       MocLabels(const std::string &file);
00062       ~MocLabels() {};
00063 
00068       inline bool NarrowAngle() const {
00069         return p_mocNA;
00070       };
00075       inline bool WideAngle() const {
00076         return !p_mocNA;
00077       };
00083       inline bool WideAngleRed() const {
00084         return p_mocRedWA;
00085       };
00091       inline bool WideAngleBlue() const {
00092         return p_mocBlueWA;
00093       };
00099       inline int CrosstrackSumming() const {
00100         return p_crosstrackSumming;
00101       };
00106       inline int DowntrackSumming() const {
00107         return p_downtrackSumming;
00108       };
00113       inline int FirstLineSample() const {
00114         return p_startingSample;
00115       };
00121       inline double FocalPlaneTemperature() const {
00122         return p_focalPlaneTemp;
00123       };
00130       inline double LineRate() const {
00131         return p_trueLineRate;
00132       };
00138       inline double ExposureDuration() const {
00139         return p_exposureDuration;
00140       };
00145       inline std::string StartTime() const {
00146         return p_startTime;
00147       };
00152       inline int Detectors() const {
00153         return p_mocNA ? 2048 : 3456;
00154       };
00155       int StartDetector(int sample) const;
00156       int EndDetector(int sample) const;
00157       double Sample(int detector) const;
00158       double EphemerisTime(double line) const;
00159       double Gain(int line = 1);
00160       double Offset(int line = 1);
00161 
00162     private:
00163       void Init(Pvl &lab);
00164       void ReadLabels(Pvl &lab);
00165       void ValidateLabels();
00166       void Compute();
00167 
00168       int p_crosstrackSumming;
00169       int p_downtrackSumming;
00170       int p_startingSample;
00171       int p_orbitNumber;
00172       double p_exposureDuration;
00173       double p_trueLineRate;
00174       double p_focalPlaneTemp;
00175       bool p_mocNA;
00176       bool p_mocRedWA;
00177       bool p_mocBlueWA;
00178       std::string p_instrumentId;
00179       std::string p_filter;
00180       std::string p_clockCount;
00181       std::string p_gainModeId;
00182       int p_offsetModeId;
00183       std::string p_startTime;
00184       std::string p_dataQuality;
00185       double p_etStart;
00186       double p_etEnd;
00187 
00188       void InitGainMaps();
00189       std::map<std::string, double> p_gainMapNA;
00190       std::map<std::string, double> p_gainMapWA;
00191       double p_gain;
00192       double p_offset;
00193 
00194       int p_nl;
00195       int p_ns;
00196       int p_startDetector[3456];
00197       int p_endDetector[3456];
00198       double p_sample[3456];
00199       void InitDetectorMaps();
00200 
00201       struct WAGO {
00202         double et;
00203         double gain;
00204         double offset;
00205         inline bool operator<(const WAGO &w) const {
00206           return (et < w.et);
00207         };
00208         inline bool operator==(const WAGO &w) const {
00209           return (et == w.et);
00210         };
00211       };
00212       std::vector<WAGO> p_wagos;
00213       void InitWago();
00214 
00215       Filename p_lsk;
00216       Filename p_sclk;
00217   };
00218 };
00219 #endif