Isis Developer Reference
GainNonLinearity.h
Go to the documentation of this file.
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
25namespace 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) {
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
A DbProfile is a container for access parameters to a database.
Definition DbProfile.h:51
GainNonLinearity Module - Applies non-linear, line-dependant gain.
Definition GainNonLinearity.h:39
GainNonLinearity()
Definition GainNonLinearity.h:43
GainNonLinearity(const HiCalConf &conf)
Definition GainNonLinearity.h:44
virtual ~GainNonLinearity()
Destructor.
Definition GainNonLinearity.h:49
void clear()
Definition HiCalTypes.h:65
void add(const QString &event)
Definition HiCalTypes.h:55
Module manages HiRISE calibration vectors from various sources.
Definition Module.h:39
HiVector _data
Data vector.
Definition Module.h:151
HiHistory _history
Hierarchial component history.
Definition Module.h:152
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
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
TNT::Array1D< double > HiVector
1-D Buffer
Definition HiCalTypes.h:27
QString ToString(const T &value)
Helper function to convert values to strings.
Definition HiCalUtil.h:236