|
Isis 3.0 Application Source Code Reference |
Home |
Computes non-linear lsq fit of HiRISE Drift (Zd module). More...
#include <ZeroBufferFit.h>
Public Member Functions | |
| ZeroBufferFit (const HiCalConf &conf) | |
| Compute second level drift correction (Zf module). | |
| virtual | ~ZeroBufferFit () |
| Destructor. | |
| void | setBin (int bin) |
| Set binning/summing mode. | |
| void | setLineTime (double ltime) |
| Set scan line time. | |
| int | size () const |
| Returns the size of the data buffer. | |
| int | nSize () const |
| Returns the size of the fitted buffer. | |
| int | nParms () const |
| Number of parameter to be fitted. | |
| void | setabsErr (double absError) |
| Sets the absolute error parameter. | |
| void | setrelErr (double relError) |
| Sets the relative error parameter. | |
| double | absErr () const |
| Returns the current value of the absolute error. | |
| double | relErr () const |
| Returns the current value of the relative error. | |
| HiVector | Solve (const HiVector &d) |
| Compute non-linear fit to (typically) ZeroBufferSmooth module. | |
| NLVector | guess () |
| Compute the initial guess of the fit. | |
| int | checkIteration (const int Iter, const NLVector &fitcoefs, const NLVector &uncerts, double cplxconj, int Istatus) |
| Computes the interation check for convergence. | |
| NLVector | f_x (const NLVector &a) |
| Computes the function value at the current iteration. | |
| NLMatrix | df_x (const NLVector &a) |
| Computes the first derivative of the function at the current iteration. | |
| double | Chisq () const |
| Returns the Chi-Square value of the fit solution. | |
| int | DoF () const |
| Returns the Degrees of Freedom. | |
| HiVector | Yfit () const |
| Computes the solution vector using current coefficents. | |
| HiVector | Normalize (const HiVector &v) |
| Compute normalized solution vector from result. | |
| ZeroBufferFit (const HiCalConf &conf) | |
| virtual | ~ZeroBufferFit () |
| Destructor. | |
| void | setBin (int bin) |
| Set binning/summing mode. | |
| void | setLineTime (double ltime) |
| Set scan line time. | |
| int | size () const |
| Returns the size of the data buffer. | |
| int | nSize () const |
| Returns the size of the fitted buffer. | |
| int | nParms () const |
| Number of parameter to be fitted. | |
| void | setabsErr (double absError) |
| Sets the absolute error parameter. | |
| void | setrelErr (double relError) |
| Sets the relative error parameter. | |
| double | absErr () const |
| Returns the current value of the absolute error. | |
| double | relErr () const |
| Returns the current value of the relative error. | |
| HiVector | Solve (const HiVector &d) |
| NLVector | guess () |
| int | checkIteration (const int Iter, const NLVector &fitcoefs, const NLVector &uncerts, double cplxconj, int Istatus) |
| Default interation test simply returns input status. | |
| NLVector | f_x (const NLVector &a) |
| NLMatrix | df_x (const NLVector &a) |
| double | Chisq () const |
| Returns the Chi-Square value of the fit solution. | |
| int | DoF () const |
| Returns the Degrees of Freedom. | |
| HiVector | Yfit () const |
| HiVector | Normalize (const HiVector &v) |
Computes non-linear lsq fit of HiRISE Drift (Zd module).
This class is best used with individual HiRISE images as the number of lines is critical to proper use. It is best applied by getting the buffer as a reference and applying it during systematic processing.
This class models the drift correction using the Levenberg-Marquardt algorithm.
Definition at line 56 of file ZeroBufferFit.h.
| ZeroBufferFit | ( | const HiCalConf & | conf | ) |
Compute second level drift correction (Zf module).
This class provides the second level drift correction that is
| conf |
Definition at line 53 of file ZeroBufferFit.cpp.
| virtual ~ZeroBufferFit | ( | ) | [inline, virtual] |
Destructor.
Definition at line 61 of file ZeroBufferFit.h.
| ZeroBufferFit | ( | const HiCalConf & | conf | ) |
| virtual ~ZeroBufferFit | ( | ) | [inline, virtual] |
Destructor.
Definition at line 61 of file ZeroBufferFit.h.
| void setBin | ( | int | bin | ) | [inline] |
Set binning/summing mode.
| bin | Summing mode of observatio |
Definition at line 68 of file ZeroBufferFit.h.
| void setLineTime | ( | double | ltime | ) | [inline] |
| int size | ( | ) | const [inline] |
Returns the size of the data buffer.
This is the size of the original data buffer.
Reimplemented from Module.
Definition at line 85 of file ZeroBufferFit.h.
| int nSize | ( | ) | const [inline, virtual] |
Returns the size of the fitted buffer.
Important: This returns the size of the buffer being fitted and not the size of original data buffer. This is a requirement of the NonLinearLSQ class. USE WITH CAUTION!
Implements NonLinearLSQ.
Definition at line 98 of file ZeroBufferFit.h.
| int nParms | ( | ) | const [inline, virtual] |
Number of parameter to be fitted.
This is the number of parameters that ZeroBufferFit needs to fit. This method is a requirement of the NonLinearLSQ class.
Implements NonLinearLSQ.
Definition at line 108 of file ZeroBufferFit.h.
| void setabsErr | ( | double | absError | ) | [inline] |
Sets the absolute error parameter.
Definition at line 111 of file ZeroBufferFit.h.
| void setrelErr | ( | double | relError | ) | [inline] |
Sets the relative error parameter.
Definition at line 113 of file ZeroBufferFit.h.
| double absErr | ( | ) | const [inline, virtual] |
Returns the current value of the absolute error.
Reimplemented from NonLinearLSQ.
Definition at line 115 of file ZeroBufferFit.h.
| double relErr | ( | ) | const [inline, virtual] |
Returns the current value of the relative error.
Reimplemented from NonLinearLSQ.
Definition at line 117 of file ZeroBufferFit.h.
Compute non-linear fit to (typically) ZeroBufferSmooth module.
This method computes a non-linear fit to the result of the ZeroBufferSmooth module. There are several things that can go wrong and some config conditions that dictate behavior of this process.
Should the image be a short exposure (i.e., not many lines) the fit will not succeed so it simply skips this entire module providing the input result (d) as the solution. This wil also occur when the user has selected the skip option for the module.
A fit is attempted on the ZeroBufferSmooth data. The non-linear solution must converge within the specifed number of iterations (MaximumIterations) or a polynomial fit will be used in leui of a valid solution.
| d | ZeroBufferSmooth data solution as input to this method |
Definition at line 106 of file ZeroBufferFit.cpp.
| NonLinearLSQ::NLVector guess | ( | ) | [virtual] |
Compute the initial guess of the fit.
This method provides the non-linear fit with an initial guess of the solution. It involves a linear fit to the latter half of the data to provide the first two coefficents, the difference of the averages of the residuals at both ends of the data set and 5 times the last line time as the final (fourth) element...a bit involved really.
Implements NonLinearLSQ.
Definition at line 177 of file ZeroBufferFit.cpp.
| int checkIteration | ( | const int | Iter, | |
| const NLVector & | fitcoefs, | |||
| const NLVector & | uncerts, | |||
| double | cplxconj, | |||
| int | Istatus | |||
| ) | [virtual] |
Computes the interation check for convergence.
| Iter | Current iteration | |
| fitcoefs | Vector of current fit coefficients | |
| uncerts | Uncertainties | |
| cplxconj | Complex conjugate of the current iteration | |
| Istatus | State of current iteration |
Reimplemented from NonLinearLSQ.
Definition at line 234 of file ZeroBufferFit.cpp.
| NonLinearLSQ::NLVector f_x | ( | const NLVector & | a | ) | [virtual] |
Computes the function value at the current iteration.
Implements NonLinearLSQ.
Definition at line 242 of file ZeroBufferFit.cpp.
| NonLinearLSQ::NLMatrix df_x | ( | const NLVector & | a | ) | [virtual] |
Computes the first derivative of the function at the current iteration.
Implements NonLinearLSQ.
Definition at line 260 of file ZeroBufferFit.cpp.
| double Chisq | ( | ) | const [inline] |
Returns the Chi-Square value of the fit solution.
Definition at line 129 of file ZeroBufferFit.h.
| int DoF | ( | ) | const [inline] |
Returns the Degrees of Freedom.
Definition at line 131 of file ZeroBufferFit.h.
| HiVector Yfit | ( | ) | const |
Computes the solution vector using current coefficents.
Definition at line 281 of file ZeroBufferFit.cpp.
Compute normalized solution vector from result.
Definition at line 297 of file ZeroBufferFit.cpp.
| void setBin | ( | int | bin | ) | [inline] |
Set binning/summing mode.
| bin | Summing mode of observatio |
Definition at line 68 of file ZeroBufferFit.h.
| void setLineTime | ( | double | ltime | ) | [inline] |
| int size | ( | ) | const [inline] |
Returns the size of the data buffer.
This is the size of the original data buffer.
Reimplemented from Module.
Definition at line 85 of file ZeroBufferFit.h.
| int nSize | ( | ) | const [inline, virtual] |
Returns the size of the fitted buffer.
Important: This returns the size of the buffer being fitted and not the size of original data buffer. This is a requirement of the NonLinearLSQ class. USE WITH CAUTION!
Implements NonLinearLSQ.
Definition at line 98 of file ZeroBufferFit.h.
| int nParms | ( | ) | const [inline, virtual] |
Number of parameter to be fitted.
This is the number of parameters that ZeroBufferFit needs to fit. This method is a requirement of the NonLinearLSQ class.
Implements NonLinearLSQ.
Definition at line 108 of file ZeroBufferFit.h.
| void setabsErr | ( | double | absError | ) | [inline] |
Sets the absolute error parameter.
Definition at line 111 of file ZeroBufferFit.h.
| void setrelErr | ( | double | relError | ) | [inline] |
Sets the relative error parameter.
Definition at line 113 of file ZeroBufferFit.h.
| double absErr | ( | ) | const [inline, virtual] |
Returns the current value of the absolute error.
Reimplemented from NonLinearLSQ.
Definition at line 115 of file ZeroBufferFit.h.
| double relErr | ( | ) | const [inline, virtual] |
Returns the current value of the relative error.
Reimplemented from NonLinearLSQ.
Definition at line 117 of file ZeroBufferFit.h.
| NLVector guess | ( | ) | [virtual] |
Implements NonLinearLSQ.
| int checkIteration | ( | const int | Iter, | |
| const NLVector & | fitcoefs, | |||
| const NLVector & | uncerts, | |||
| double | cplxconj, | |||
| int | Istatus | |||
| ) | [virtual] |
Default interation test simply returns input status.
Reimplemented from NonLinearLSQ.
Implements NonLinearLSQ.
Implements NonLinearLSQ.
| double Chisq | ( | ) | const [inline] |
Returns the Chi-Square value of the fit solution.
Definition at line 129 of file ZeroBufferFit.h.
| int DoF | ( | ) | const [inline] |
Returns the Degrees of Freedom.
Definition at line 131 of file ZeroBufferFit.h.
| HiVector Yfit | ( | ) | const |