Isis 3 Developer Reference
GainNonLinearity.h
Go to the documentation of this file.
1 #ifndef GainNonLinearity_h
2 #define GainNonLinearity_h
3 
26 #include <cmath>
27 #include <string>
28 #include <vector>
29 
30 #include "IString.h"
31 #include "HiCalTypes.h"
32 #include "HiCalUtil.h"
33 #include "HiCalConf.h"
34 #include "Module.h"
35 #include "FileName.h"
36 #include "Statistics.h"
37 #include "IException.h"
38 
39 namespace Isis {
53  class GainNonLinearity : public Module {
54 
55  public:
56  // Constructors and Destructor
57  GainNonLinearity() : Module("GainNonLinearity") { }
58  GainNonLinearity(const HiCalConf &conf) : Module("GainNonLinearity") {
59  init(conf);
60  }
61 
63  virtual ~GainNonLinearity() { }
64 
65  private:
66  std::string _gainFile;
67  double _gainFactor; // Temperature factor
68 
69  void init(const HiCalConf &conf) {
70  _history.clear();
71  DbProfile prof = conf.getMatrixProfile();
72  _history.add("Profile["+ prof.Name()+"]");
73 
74  // Get temperature factor
75  HiVector factor = loadCsv("NonLinearityGain", conf, prof, 1);
76  _gainFactor = factor[0];
77  _data = HiVector(1, _gainFactor);
78 
79  // History
80  _history.add("NonLinearityGainFactor[" + ToString(_gainFactor) + "]");
81  return;
82  }
83 
84  };
85 
86 } // namespace Isis
87 #endif
GainNonLinearity Module - Applies non-linear, line-dependant gain.
Definition: GainNonLinearity.h:53
HiVector _data
Data vector.
Definition: Module.h:166
virtual ~GainNonLinearity()
Destructor.
Definition: GainNonLinearity.h:63
void clear()
Definition: HiCalTypes.h:78
HiHistory _history
Hierarchial component history.
Definition: Module.h:167
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
Definition: Module.h:116
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:65
Module manages HiRISE calibration vectors from various sources.
Definition: Module.h:54
GainNonLinearity()
Definition: GainNonLinearity.h:57
void add(const QString &event)
Definition: HiCalTypes.h:68
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:118
QString ToString(const T &value)
Helper function to convert values to strings.
Definition: HiCalUtil.h:260
GainNonLinearity(const HiCalConf &conf)
Definition: GainNonLinearity.h:58
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:40