  | 
  
    Isis 3 Programmer Reference
    
   | 
 
 
 
 
   17 #include "HiCalTypes.h" 
   18 #include "HiCalUtil.h" 
   19 #include "HiCalConf.h" 
   23 #include "LowPassFilter.h" 
   24 #include "Statistics.h" 
   25 #include "IException.h" 
   80       void init(
const HiCalConf &conf) {
 
   89         _BM = 
loadCsv(
"DarkCurrent", conf, prof, samples);
 
   90         _slope = 
loadCsv(
"DarkSlope", conf, prof, 256);
 
   91         _intercept = 
loadCsv(
"DarkIntercept", conf, prof, 256);
 
  103         double fpa_py_temp = 
ToDouble(prof(
"FpaPositiveYTemperature"));
 
  104         double fpa_my_temp = 
ToDouble(prof(
"FpaNegativeYTemperature"));
 
  105         double temp = (fpa_py_temp+fpa_my_temp) / 2.0;
 
  109         smooth.Process(_slope);
 
  110         _slope = smooth.ref();
 
  112         smooth.Process(_intercept);
 
  113         _intercept = smooth.ref();
 
  116         for (
int i = 0 ; i < _slope.dim() ; i++) {
 
  117           t_prof[i] = _intercept[i] + _slope[i] * temp;
 
  120         _tempProf = 
rebin(t_prof, samples);
 
  125         double linetime = 
ToDouble(prof(
"ScanExposureDuration"));
 
  126         double scale = linetime * 1.0E-6 * (_bin*_bin) *
 
  127                        (20.0*103.0/89.0 + _tdi);
 
  129         for (
int j = 0 ; j < samples ; j++) {
 
  130           dc[j] = _BM[j] * scale * 
HiTempEqn(_tempProf[j]) / baseT;
 
  135         _data = smooth.ref();
 
  139         for ( 
int i = 0 ; i < 
_data.dim() ; i++ ) {
 
  150         o << 
"#  History = " << 
_history << std::endl;
 
  152         o << std::setw(
_fmtWidth)   << 
"DarkMatrix" 
  154           << std::setw(
_fmtWidth+1) << 
"ZeroDark\n";
 
  156         for (
int i = 0 ; i < 
_data.dim() ; i++) {
 
  
 
HiHistory _history
Hierarchial component history.
 
virtual ~ZeroDark()
Destructor.
 
int _fmtWidth
Default field with of double.
 
This class is used to accumulate statistics on double arrays.
 
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
 
QString Name() const
Returns the name of this property.
 
QString ToString(const T &value)
Helper function to convert values to strings.
 
HiVector rebin(const HiVector &v, int n)
Rebins a vector to a different size.
 
Module manages HiRISE calibration vectors from various sources.
 
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.
 
const Statistics & Stats() const
Return statistics for filtered - raw Buffer.
 
Computes a complex dark subtraction component (ZeroDark module)
 
void Reset()
Reset all accumulators and counters to zero.
 
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
 
Compute a low pass filter from a Module class content.
 
HiVector _data
Data vector.
 
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
 
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
 
int toInt(const QString &string)
Global function to convert from a string to an integer.
 
double StandardDeviation() const
Computes and returns the standard deviation.
 
int ToInteger(const T &value)
Helper function to convert values to Integers.
 
double HiTempEqn(const double temperature, const double napcm2=2.0, const double px=12.0)
Implements (classic) HiRISE temperature equation.
 
A DbProfile is a container for access parameters to a database.
 
TNT::Array1D< double > HiVector
1-D Buffer
 
virtual void printOn(std::ostream &o) const
Virtualized data dump method.
 
double Average() const
Computes and returns the average.
 
double ToDouble(const T &value)
Helper function to convert values to doubles.
 
double toDouble(const QString &string)
Global function to convert from a string to a double.
 
This is free and unencumbered software released into the public domain.