USGS

Isis 3.0 Application Source Code Reference

Home

ZeroBufferFit Class Reference

Computes non-linear lsq fit of HiRISE Drift (Zd module). More...

#include <ZeroBufferFit.h>

List of all members.

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)

Detailed Description

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.

Author:
2007-11-07 Kris Becker

Definition at line 56 of file ZeroBufferFit.h.


Constructor & Destructor Documentation

ZeroBufferFit ( const HiCalConf &  conf  ) 

Compute second level drift correction (Zf module).

This class provides the second level drift correction that is

Parameters:
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.


Member Function Documentation

void setBin ( int  bin  )  [inline]

Set binning/summing mode.

Parameters:
bin Summing mode of observatio

Definition at line 68 of file ZeroBufferFit.h.

void setLineTime ( double  ltime  )  [inline]

Set scan line time.

Parameters:
ltime Scan line time

Definition at line 75 of file ZeroBufferFit.h.

int size (  )  const [inline]

Returns the size of the data buffer.

This is the size of the original data buffer.

See also:
nSize()
Returns:
int Size of the input 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!

Returns:
int Size of buffer being fitted

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.

Returns:
int Number of parameter to fit

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.

HiVector Solve ( const HiVector d  ) 

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.

Parameters:
d ZeroBufferSmooth data solution as input to this method
Returns:
HiVector Returns result of the processing

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.

Returns:
NLVector 4-element vector of the initial guess coefficients

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.

Parameters:
Iter Current iteration
fitcoefs Vector of current fit coefficients
uncerts Uncertainties
cplxconj Complex conjugate of the current iteration
Istatus State of current iteration
Returns:
int Simply passes on the Istatus value

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.

HiVector Normalize ( const HiVector v  ) 

Compute normalized solution vector from result.

Definition at line 297 of file ZeroBufferFit.cpp.

void setBin ( int  bin  )  [inline]

Set binning/summing mode.

Parameters:
bin Summing mode of observatio

Definition at line 68 of file ZeroBufferFit.h.

void setLineTime ( double  ltime  )  [inline]

Set scan line time.

Parameters:
ltime Scan line time

Definition at line 75 of file ZeroBufferFit.h.

int size (  )  const [inline]

Returns the size of the data buffer.

This is the size of the original data buffer.

See also:
nSize()
Returns:
int Size of the input 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!

Returns:
int Size of buffer being fitted

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.

Returns:
int Number of parameter to fit

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.

HiVector Solve ( const HiVector d  ) 
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.

NLVector f_x ( const NLVector a  )  [virtual]

Implements NonLinearLSQ.

NLMatrix df_x ( const NLVector a  )  [virtual]

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
HiVector Normalize ( const HiVector v  ) 

The documentation for this class was generated from the following files: