1 #ifndef GainUnitConversion_h 2 #define GainUnitConversion_h 60 Module(
"GainUnitConversion"), _units(units) {
70 void init(HiCalConf &conf) {
75 double sed =
ToDouble(prof(
"ScanExposureDuration"));
78 double au = conf.sunDistanceAU();
80 double suncorr = 1.5 / au;
83 double zbin =
ToDouble(prof(
"GainUnitConversionBinFactor"));
86 double ztemp = getTempDepGain(conf, prof);
88 double ziof = (zbin * ztemp) * (sed * 1.0e-6) * suncorr;
94 else if (
IsEqual(_units,
"DN/US") ) {
122 double getTempDepGain(
const HiCalConf &conf,
const DbProfile &prof) {
123 double zgain =
ToDouble(prof(
"FilterGainCorrection"));
126 double fpa_py_temp =
ToDouble(prof(
"FpaPositiveYTemperature"));
127 double fpa_my_temp =
ToDouble(prof(
"FpaNegativeYTemperature"));
128 double T = (fpa_py_temp+fpa_my_temp) / 2.0;
131 double baseT =
ToDouble(prof(
"IoverFbasetemperature"));
134 double QEpcntC =
ToDouble(prof(
"QEpercentincreaseperC"));
137 double absGainTdi =
ToDouble(prof(
"AbsGain_TDI128"));
140 double QETD = zgain * ( 1.0 + (T - baseT) * QEpcntC * absGainTdi);
HiVector _data
Data vector.
Definition: Module.h:166
void clear()
Definition: HiCalTypes.h:78
HiHistory _history
Hierarchial component history.
Definition: Module.h:167
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:65
bool IsEqual(const QString &v1, const QString &v2="TRUE")
Shortened string equality test.
Definition: HiCalUtil.h:272
virtual ~GainUnitConversion()
Destructor.
Definition: GainUnitConversion.h:65
Module manages HiRISE calibration vectors from various sources.
Definition: Module.h:54
Computes units parameters for HiRISE data calibration (Ziof Module)
Definition: GainUnitConversion.h:54
double ToDouble(const T &value)
Helper function to convert values to doubles.
Definition: HiCalUtil.h:248
void add(const QString &event)
Definition: HiCalTypes.h:68
GainUnitConversion(HiCalConf &conf, const QString &units)
Definition: GainUnitConversion.h:59
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
GainUnitConversion()
Definition: GainUnitConversion.h:58
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
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:40