20#include "HiCalTypes.h"
24#include "SplineFill.h"
25#include "Statistics.h"
26#include "SpecialPixel.h"
27#include "IException.h"
94 _history.add(
"Profile["+ prof.Name()+
"]");
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);
114 _history.add(
"ReverseClockStatistics(File["+tfile+
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!)");
152 _data = spline.ref();
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.
A DbProfile is a container for access parameters to a database.
Container for HiRISE calibration data.
Module manages HiRISE calibration vectors from various sources.
HiVector _data
Data vector.
HiHistory _history
Hierarchial component history.
int _fmtWidth
Default field with of double.
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
Container for cube-like labels.
Compute a low pass filter from a Module class content.
This class is used to accumulate statistics on double arrays.
BigInt NullPixels() const
Returns the total number of NULL pixels encountered.
double Average() const
Computes and returns the average.
BigInt LisPixels() const
Returns the total number of low instrument saturation (LIS) pixels encountered.
BigInt HisPixels() const
Returns the total number of high instrument saturation (HIS) pixels encountered.
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
double StandardDeviation() const
Computes and returns the standard deviation.
void Reset()
Reset all accumulators and counters to zero.
Processes Reverse Clock calibration data (ZeroReverse Module)
virtual ~ZeroReverse()
Destructor.
void init(HiCalData &cal, const HiCalConf &conf)
Initialize and compute data solution.
bool wasTriggered() const
Specifies if the input trigger conditions were met.
virtual void printOn(std::ostream &o) const
Virtual dump of data processing vectors.
const Statistics & Stats() const
Return statistics for raw Reverse Clock buffer.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
int toInt(const QString &string)
Global function to convert from a string to an integer.
TNT::Array2D< double > HiMatrix
2-D buffer
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.
TNT::Array1D< double > HiVector
1-D Buffer
QString ToString(const T &value)
Helper function to convert values to strings.
HiVector averageLines(const HiMatrix &m, int sline=0, int eline=-1)
Reduces by averaging specified lines from a buffer.
double toDouble(const QString &string)
Global function to convert from a string to a double.
HiMatrix cropLines(const HiMatrix &m, int sline, int eline)
Crop specified lines from a buffer.