1#ifndef GainUnitConversion_h
2#define GainUnitConversion_h
18#include "HiCalTypes.h"
24#include "IException.h"
49 Module(
"GainUnitConversion"), _units(units) {
59 void init(HiCalConf &conf,
Cube *cube) {
62 _history.add(
"Profile["+ prof.Name()+
"]");
64 double sed =
ToDouble(prof(
"ScanExposureDuration"));
67 double au = conf.sunDistanceAU(cube);
69 double suncorr = 1.5 / au;
72 double zbin =
ToDouble(prof(
"GainUnitConversionBinFactor"));
77 double ziof = (zbin * ztemp) * (sed * 1.0e-6) * suncorr;
83 else if (
IsEqual(_units,
"DN/US") ) {
89 _history.add(
"Units[DNs/microsecond]");
112 double zgain =
ToDouble(prof(
"FilterGainCorrection"));
115 double fpa_py_temp =
ToDouble(prof(
"FpaPositiveYTemperature"));
116 double fpa_my_temp =
ToDouble(prof(
"FpaNegativeYTemperature"));
117 double T = (fpa_py_temp+fpa_my_temp) / 2.0;
120 double baseT =
ToDouble(prof(
"IoverFbasetemperature"));
123 double QEpcntC =
ToDouble(prof(
"QEpercentincreaseperC"));
126 double absGainTdi =
ToDouble(prof(
"AbsGain_TDI128"));
129 double QETD = zgain * ( 1.0 + (T - baseT) * QEpcntC * absGainTdi);
IO Handler for Isis Cubes.
A DbProfile is a container for access parameters to a database.
Computes units parameters for HiRISE data calibration (Ziof Module)
virtual ~GainUnitConversion()
Destructor.
double getTempDepGain(const HiCalConf &conf, const DbProfile &prof)
Compute CalFact, CCD QE, Temperature I/F dependancy.
Module manages HiRISE calibration vectors from various sources.
HiVector _data
Data vector.
HiHistory _history
Hierarchial component history.
This is free and unencumbered software released into the public domain.
TNT::Array1D< double > HiVector
1-D Buffer
QString ToString(const T &value)
Helper function to convert values to strings.
double ToDouble(const T &value)
Helper function to convert values to doubles.
bool IsEqual(const QString &v1, const QString &v2="TRUE")
Shortened string equality test.