1#ifndef ZeroBufferSmooth_h
2#define ZeroBufferSmooth_h
20#include "HiCalTypes.h"
24#include "SplineFill.h"
25#include "LowPassFilter.h"
26#include "Statistics.h"
27#include "SpecialPixel.h"
28#include "IException.h"
68 Module(
"ZeroBufferSmooth") {
100 _history.add(
"Profile["+ prof.Name()+
"]");
102 int samp0 =
toInt(
ConfKey(prof,
"ZeroBufferSmoothFirstSample",QString(
"0")));
103 int sampN =
toInt(
ConfKey(prof,
"ZeroBufferSmoothLastSample",QString(
"11")));
109 toInt(
ConfKey(prof,
"ZeroBufferSmoothFilterWidth",QString(
"201"))),
110 toInt(
ConfKey(prof,
"ZeroBufferSmoothFilterIterations",QString(
"2"))));
113 _data = spline.ref();
118 for (
int i = 0 ; i <
_data.dim() ; i++ ) {
137 o <<
"# History = " <<
_history << std::endl;
140 << std::setw(
_fmtWidth+1) <<
"Filtered\n";
142 for (
int i = 0 ; i <
_data.dim() ; i++) {
A DbProfile is a container for access parameters to a database.
Container for HiRISE calibration data.
Compute a low pass filter from a Module class content.
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.
Compute a low pass filter from a Module class content.
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.
Processes Buffer calibration data (ZeroBufferSmooth Module)
virtual ~ZeroBufferSmooth()
Destructor.
const Statistics & Stats() const
Return statistics for filtered - raw Buffer.
virtual void printOn(std::ostream &o) const
Virtualized parameter reporting method.
ZeroBufferSmooth(HiCalData &cal, const HiCalConf &conf)
Construct with data parameters.
void init(HiCalData &cal, const HiCalConf &conf)
Workhorse of the zero buffer computation.
This is free and unencumbered software released into the public domain.
int toInt(const QString &string)
Global function to convert from a string to an integer.
HiVector averageSamples(const HiMatrix &m, int ssamp=0, int esamp=-1)
Reduces by averaging specified samples from a 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.
bool IsSpecial(const double d)
Returns if the input pixel is special.
TNT::Array1D< double > HiVector
1-D Buffer
QString ToString(const T &value)
Helper function to convert values to strings.