Isis 3 Programmer Reference
GainNonLinearity.h
1 #ifndef GainNonLinearity_h
2 #define GainNonLinearity_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <cmath>
13 #include <string>
14 #include <vector>
15 
16 #include "IString.h"
17 #include "HiCalTypes.h"
18 #include "HiCalUtil.h"
19 #include "HiCalConf.h"
20 #include "Module.h"
21 #include "FileName.h"
22 #include "Statistics.h"
23 #include "IException.h"
24 
25 namespace Isis {
39  class GainNonLinearity : public Module {
40 
41  public:
42  // Constructors and Destructor
43  GainNonLinearity() : Module("GainNonLinearity") { }
44  GainNonLinearity(const HiCalConf &conf) : Module("GainNonLinearity") {
45  init(conf);
46  }
47 
49  virtual ~GainNonLinearity() { }
50 
51  private:
52  std::string _gainFile;
53  double _gainFactor; // Temperature factor
54 
55  void init(const HiCalConf &conf) {
56  _history.clear();
57  DbProfile prof = conf.getMatrixProfile();
58  _history.add("Profile["+ prof.Name()+"]");
59 
60  // Get temperature factor
61  HiVector factor = loadCsv("NonLinearityGain", conf, prof, 1);
62  _gainFactor = factor[0];
63  _data = HiVector(1, _gainFactor);
64 
65  // History
66  _history.add("NonLinearityGainFactor[" + ToString(_gainFactor) + "]");
67  return;
68  }
69 
70  };
71 
72 } // namespace Isis
73 #endif
Isis::Module::_history
HiHistory _history
Hierarchial component history.
Definition: Module.h:152
Isis::DbProfile::Name
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:104
Isis::GainNonLinearity::~GainNonLinearity
virtual ~GainNonLinearity()
Destructor.
Definition: GainNonLinearity.h:49
Isis::ToString
QString ToString(const T &value)
Helper function to convert values to strings.
Definition: HiCalUtil.h:246
Isis::Module
Module manages HiRISE calibration vectors from various sources.
Definition: Module.h:39
Isis::GainNonLinearity
GainNonLinearity Module - Applies non-linear, line-dependant gain.
Definition: GainNonLinearity.h:39
Isis::Module::_data
HiVector _data
Data vector.
Definition: Module.h:151
Isis::Module::loadCsv
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:101
Isis::DbProfile
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:51
Isis::HiVector
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:27
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16