17#include "HiCalTypes.h"
23#include "LowPassFilter.h"
24#include "Statistics.h"
25#include "IException.h"
79 void init(
const HiCalConf &conf) {
82 _history.add(
"Profile["+ prof.Name()+
"]");
102 QString msg =
"Zero Dark Rate coefficient CSV has [" +
toString(
_coeffMat.dim2()) +
103 "] columns, expected 3.";
107 QString msg =
"Zero Dark Rate coefficient CSV has [" +
toString(
_coeffMat.dim1()) +
108 "] rows, expected " +
toString(samples) +
".";
113 double fpa_py_temp =
ToDouble(prof(
"FpaPositiveYTemperature"));
114 double fpa_my_temp =
ToDouble(prof(
"FpaNegativeYTemperature"));
115 _temp = (fpa_py_temp+fpa_my_temp) / 2.0;
120 for (
int j = 0 ; j < samples ; j++) {
126 for (
int i = 0 ; i <
_data.dim() ; i++ ) {
137 o <<
"# History = " <<
_history << std::endl;
139 o << std::setw(
_fmtWidth+1) <<
"FPA_Temperature\n"
140 << std::setw(
_fmtWidth+1) <<
"ZeroDarkRate\n";
142 for (
int i = 0 ; i <
_data.dim() ; i++) {
A DbProfile is a container for access parameters to a database.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Provides generalized access to HiRISE calibration CSV files.
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.
This class is used to accumulate statistics on double arrays.
double Average() const
Computes and returns the average.
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.
Computes a complex dark subtraction component (ZeroDarkRate module)
const Statistics & Stats() const
Return statistics for filtered - raw Buffer.
virtual ~ZeroDarkRate()
Destructor.
HiMatrix _coeffMat
The coefficients are stored in a csv text file as a 3-column, 1024/bin row matrix.
virtual void printOn(std::ostream &o) const
Virtualized data dump method.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
TNT::Array2D< double > HiMatrix
2-D buffer
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.
int ToInteger(const T &value)
Helper function to convert values to Integers.