17#include "HiCalTypes.h"
23#include "LowPassFilter.h"
24#include "Statistics.h"
25#include "IException.h"
47 class ZeroDarkRate :
public Module {
51 ZeroDarkRate() : Module(
"ZeroDarkRate") { }
52 ZeroDarkRate(
const HiCalConf &conf) : Module(
"ZeroDarkRate") {
79 void init(
const HiCalConf &conf) {
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++ ) {
127 _stats.AddData(
_data[i]);
130 "],StdDev["+
ToString(_stats.StandardDeviation())+
"])");
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++) {
47 class ZeroDarkRate :
public Module {
…};
A DbProfile is a container for access parameters to a database.
QString Name() const
Returns the name of this property.
@ 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.
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.
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.