|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef ZeroBufferFit_h
2 #define ZeroBufferFit_h
71 inline int size()
const {
return (_data.dim()); }
84 int nSize()
const {
return (_b2.dim()); }
97 void setabsErr(
double absError) { _absErr = absError; }
99 void setrelErr(
double relError) { _relErr = relError; }
101 double absErr()
const {
return (_absErr); }
103 double relErr()
const {
return (_relErr); }
108 const NLVector &uncerts,
double cplxconj,
115 double Chisq()
const {
return (_chisq); }
142 virtual void printOn(std::ostream &o)
const;
144 int goodLines(
const HiVector &d)
const {
return (d.dim() - _badLines); }
146 bool gotGoodLines(
const HiVector &d)
const {
147 return (goodLines(d) >= _minLines);
HiHistory _history
Hierarchial component history.
Definition: Module.h:152
void setrelErr(double relError)
Sets the relative error parameter
Definition: ZeroBufferFit.h:99
bool IsEqual(const QString &v1, const QString &v2="TRUE")
Shortened string equality test.
Definition: HiCalUtil.h:258
int _fmtWidth
Default field with of double.
Definition: Module.h:153
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition: Statistics.cpp:141
QString Name() const
Returns the name of this property.
Definition: DbProfile.h:104
HiVector Solve(const HiVector &d)
Compute non-linear fit to (typically) ZeroBufferSmooth module.
Definition: ZeroBufferFit.cpp:91
QString ToString(const T &value)
Helper function to convert values to strings.
Definition: HiCalUtil.h:246
bool exists(const QString &key) const
Checks for the existance of a keyword.
Definition: DbProfile.h:115
int size() const
Returns the size of the data buffer.
Definition: ZeroBufferFit.h:71
Module manages HiRISE calibration vectors from various sources.
Definition: Module.h:39
const HiVector & ref() const
Return data via a const reference.
Definition: Module.h:111
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.
Definition: HiCalUtil.h:205
ZeroBufferFit(const HiCalConf &conf)
Compute second level drift correction (Zf module)
Definition: ZeroBufferFit.cpp:38
void setabsErr(double absError)
Sets the absolute error parameter.
Definition: ZeroBufferFit.h:97
Computes non-linear lsq fit of HiRISE Drift (Zd module)
Definition: ZeroBufferFit.h:42
void Reset()
Reset all accumulators and counters to zero.
Definition: Statistics.cpp:113
int curvefit()
Definition: NonLinearLSQ.cpp:28
double absErr() const
Returns the current value of the absolute error.
Definition: ZeroBufferFit.h:101
NLVector uncert() const
Return uncertainties from last fit processing.
Definition: NonLinearLSQ.h:105
void setLineTime(double ltime)
Set scan line time.
Definition: ZeroBufferFit.h:61
void setMaxIters(int m)
Sets the maximum number of iterations.
Definition: NonLinearLSQ.h:62
Compute a low pass filter from a Module class content.
Definition: LowPassFilter.h:30
void AddData(const double *x, const double *y, const unsigned int count)
Add two arrays of doubles to the accumulators and counters.
Definition: MultivariateStatistics.cpp:66
NLVector coefs() const
Return coefficients from last fit processing.
Definition: NonLinearLSQ.h:103
int DoF() const
Returns the Degrees of Freedom.
Definition: ZeroBufferFit.h:117
TNT::Array1D< double > NLVector
Definition: NonLinearLSQ.h:44
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
Definition: Module.h:169
HiVector Normalize(const HiVector &v)
Compute normalized solution vector from result.
Definition: ZeroBufferFit.cpp:282
bool success() const
Determine success from last fit processing.
Definition: NonLinearLSQ.h:83
NonLinearLSQ Computes a fit using a Levenberg-Marquardt algorithm.
Definition: NonLinearLSQ.h:42
Container of multivariate statistics.
Definition: MultivariateStatistics.h:54
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
int maxIters() const
Maximum number iterations for valid solution.
Definition: NonLinearLSQ.h:70
void setLineTime(double ltime)
Definition: HiCalUtil.h:367
Compute HiRISE line times.
Definition: HiCalUtil.h:361
int ToInteger(const T &value)
Helper function to convert values to Integers.
Definition: HiCalUtil.h:222
NLMatrix df_x(const NLVector &a)
Computes the first derivative of the function at the current iteration.
Definition: ZeroBufferFit.cpp:245
bool IsTrueValue(const DbProfile &prof, const QString &key, const QString &value="TRUE")
Determines if the keyword value is the expected value.
Definition: HiCalUtil.h:276
T MIN(const T &A, const T &B)
Implement templatized MIN fumnction.
Definition: PhotometricFunction.h:34
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:51
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:27
void add(const QString &event)
Definition: HiCalTypes.h:55
std::string statusstr() const
Return error message pertaining to last fit procesing.
Definition: NonLinearLSQ.h:87
void setBin(int bin)
Set binning/summing mode.
Definition: ZeroBufferFit.h:54
int nParms() const
Number of parameter to be fitted.
Definition: ZeroBufferFit.h:94
double Average() const
Computes and returns the average.
Definition: Statistics.cpp:300
double ToDouble(const T &value)
Helper function to convert values to doubles.
Definition: HiCalUtil.h:234
void LinearRegression(double &a, double &b) const
Fits a line.
Definition: MultivariateStatistics.cpp:222
HiVector Yfit() const
Computes the solution vector using current coefficents.
Definition: ZeroBufferFit.cpp:266
double relErr() const
Returns the current value of the relative error.
Definition: ZeroBufferFit.h:103
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Namespace for the standard library.
int checkIteration(const int Iter, const NLVector &fitcoefs, const NLVector &uncerts, double cplxconj, int Istatus)
Computes the interation check for convergence.
Definition: ZeroBufferFit.cpp:219
TNT::Array2D< double > NLMatrix
Definition: NonLinearLSQ.h:45
int nSize() const
Returns the size of the fitted buffer.
Definition: ZeroBufferFit.h:84
void setBin(int bin)
Definition: HiCalUtil.h:368
NLVector f_x(const NLVector &a)
Computes the function value at the current iteration.
Definition: ZeroBufferFit.cpp:227
NLVector guess()
Compute the initial guess of the fit.
Definition: ZeroBufferFit.cpp:162
virtual ~ZeroBufferFit()
Destructor.
Definition: ZeroBufferFit.h:47
int nIterations() const
Return number of iterations from last fit processing.
Definition: NonLinearLSQ.h:107
double Chisq() const
Returns the Chi-Square value of the fit solution.
Definition: ZeroBufferFit.h:115
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16