91 void init(
HiCalData &cal,
const HiCalConf &conf) {
96 int line0 =
toInt(
ConfKey(prof,
"ZeroReverseFirstLine",QString(
"0")));
97 int lineN =
toInt(
ConfKey(prof,
"ZeroReverseLastLine",QString(
"19")));
98 QString tfile= conf.getMatrixSource(
"ReverseClockStatistics",prof);
102 _stats.
AddData(revclk[0], revclk.dim1()*revclk.dim2());
112 DbAccess triggers(
Pvl(tfile).findObject(
"ReverseClockStatistics"));
113 QString tprofName = conf.resolve(
"{FILTER}{CCD}_{CHANNEL}_{BIN}",prof);
115 "],Profile["+tprofName+
"])");
118 if (triggers.profileExists(tprofName)) {
119 DbProfile tprof(prof, triggers.getProfile(tprofName), tprofName);
127 "],RevStdDevTrigger["+
ToString(revstddev)+
128 "],RevLisTolerance["+
ToString(lisTol)+
129 "],RevHisTolerance["+
ToString(hisTol)+
130 "],RevNulTolerance["+
ToString(nulTol)+
"])");
137 _history.
add(
"Trigger(True - Reverse Clock set to constant,"
138 "ReverseClock["+
ToString(revmean)+
"])");
141 _history.
add(
"Trigger(False - Reverse Clock processing invoked)");
146 _history.
add(
"Trigger(Profile["+tprofName+
"],NotFound!)");
151 SplineFill spline(_revClock,
_history);
152 _data = spline.ref();
160 virtual void printOn(std::ostream &o)
const {
161 o <<
"# History = " <<
_history << std::endl;
164 << std::setw(
_fmtWidth+1) <<
"Applied\n";
166 for (
int i = 0 ; i <
_data.dim() ; i++) {
DbAccess manages programatic access to a database through profiles.
Definition DbAccess.h:106
A DbProfile is a container for access parameters to a database.
Definition DbProfile.h:51
Container for HiRISE calibration data.
Definition HiCalData.h:35
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
int _fmtWidth
Default field with of double.
Definition Module.h:153
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
Definition Module.h:169
Container for cube-like labels.
Definition Pvl.h:119
This class is used to accumulate statistics on double arrays.
Definition Statistics.h:93
BigInt NullPixels() const
Returns the total number of NULL pixels encountered.
Definition Statistics.cpp:616
double Average() const
Computes and returns the average.
Definition Statistics.cpp:451
BigInt LisPixels() const
Returns the total number of low instrument saturation (LIS) pixels encountered.
Definition Statistics.cpp:627
BigInt HisPixels() const
Returns the total number of high instrument saturation (HIS) pixels encountered.
Definition Statistics.cpp:649
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition Statistics.cpp:292
double StandardDeviation() const
Computes and returns the standard deviation.
Definition Statistics.cpp:463
void Reset()
Reset all accumulators and counters to zero.
Definition Statistics.cpp:264
Processes Reverse Clock calibration data (ZeroReverse Module)
Definition ZeroReverse.h:46
virtual ~ZeroReverse()
Destructor.
Definition ZeroReverse.h:57
ZeroReverse(HiCalData &cal, const HiCalConf &conf)
Definition ZeroReverse.h:51
ZeroReverse()
Definition ZeroReverse.h:50
bool wasTriggered() const
Specifies if the input trigger conditions were met.
Definition ZeroReverse.h:74
const Statistics & Stats() const
Return statistics for raw Reverse Clock buffer.
Definition ZeroReverse.h:64
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition IString.cpp:211
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition IString.cpp:93
TNT::Array2D< double > HiMatrix
2-D buffer
Definition HiCalTypes.h:28
T ConfKey(const DbProfile &conf, const QString &keyname, const T &defval, int index=0)
Find a keyword in a profile using default for non-existant keywords.
Definition HiCalUtil.h:195
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
HiVector averageLines(const HiMatrix &m, int sline=0, int eline=-1)
Reduces by averaging specified lines from a buffer.
Definition HiCalUtil.h:147
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition IString.cpp:149
HiMatrix cropLines(const HiMatrix &m, int sline, int eline)
Crop specified lines from a buffer.
Definition HiCalUtil.h:101