USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::BundleAdjust Class Reference

#include <BundleAdjust.h>

List of all members.

Classes

struct  SpacecraftWeights

Public Types

enum  DecompositionMethod { NoneSelected, SPECIALK, CHOLMOD }
enum  CmatrixSolveType {
  None, AnglesOnly, AnglesVelocity, AnglesVelocityAcceleration,
  CKAll
}
enum  SpacecraftPositionSolveType {
  Nothing, PositionOnly, PositionVelocity, PositionVelocityAcceleration,
  SPKAll
}

Public Member Functions

 BundleAdjust (const QString &cnetFile, const QString &cubeList, bool printSummary=true)
 BundleAdjust (const QString &cnetFile, const QString &cubeList, const QString &heldList, bool printSummary=true)
 BundleAdjust (Isis::ControlNet &cnet, Isis::SerialNumberList &snlist, bool printSummary=true)
 BundleAdjust (Isis::ControlNet &cnet, Isis::SerialNumberList &snlist, Isis::SerialNumberList &heldsnlist, bool printSummary=true)
 ~BundleAdjust ()
double Solve ()
 compute partials for measure
bool SolveCholesky ()
 The solve method is a least squares solution for updating the camera pointing, etc.
Isis::ControlNetControlNet ()
Isis::SerialNumberListSerialNumberList ()
int Images () const
int Observations () const
 Return the number of observations in list given to the constructor.
QString FileName (int index)
 Return the ith filename in the cube list file given to constructor.
bool IsHeld (int index)
 Return whether the ith file in the cube list is held.
Table Cmatrix (int index)
 Return a table cmatrix for the ith cube in the cube list given to the constructor.
Table SpVector (int index)
 Return a table spacecraft vector for the ith cube in the cube list given to the constructor.
void SetSolveTwist (bool solve)
void SetSolveRadii (bool solve)
void SetUpdateCubes (bool update)
void SetSolvePolyOverHermite (bool b)
void SetSolvePolyOverPointing (bool b)
void SetErrorPropagation (bool b)
void SetOutlierRejection (bool b)
void SetRejectionMultiplier (double d)
void SetGlobalLatitudeAprioriSigma (double d)
void SetGlobalLongitudeAprioriSigma (double d)
void SetGlobalRadiiAprioriSigma (double d)
void SetGlobalSpacecraftPositionAprioriSigma (double d)
void SetGlobalSpacecraftVelocityAprioriSigma (double d)
void SetGlobalSpacecraftAccelerationAprioriSigma (double d)
void SetGlobalCameraAnglesAprioriSigma (double d)
void SetGlobalCameraAngularVelocityAprioriSigma (double d)
void SetGlobalCameraAngularAccelerationAprioriSigma (double d)
void SetStandardOutput (bool b)
void SetCSVOutput (bool b)
void SetResidualOutput (bool b)
void SetOutputFilePrefix (const QString &str)
void SetDecompositionMethod (DecompositionMethod method)
 Set decomposition method.
void SetSolveCmatrix (CmatrixSolveType type)
 For which camera angle coefficients do we solve?
void SetSolveSpacecraftPosition (SpacecraftPositionSolveType type)
 For which camera position coefficients do we solve?
void SetCKDegree (int degree)
 Set the degree of the polynomial to fit to the camera angles.
void SetSolveCKDegree (int degree)
 Set the degree of the polynomial to adjust in the solution.
void SetSPKDegree (int degree)
 Set the degree of the polynomial to fit to the camera position.
void SetSolveSPKDegree (int degree)
 Set the degree of the camera position polynomial to adjust in the solution.
int BasisColumns ()
 Determine number of columns needed for least squares.
int ComputeConstrainedParameters ()
double Error () const
double Iteration () const
int IgnoredPoints () const
int FixedPoints () const
void SetObservationMode (bool bObservationMode)
 This method turns on observation mode and creates the observation number list.
void SetConvergenceThreshold (double d)
void SetMaxIterations (int n)
void SetSolutionMethod (QString str)
 This method sets the solution method for solving the matrix and fills the point index map, which is dependent on the solution method.
void GetSparseParameterCorrections ()
 Retrieve parameter correction vector for old sparse least-squares object and parse into m_Image_Corrections and m_Point_Corrections vectors so we can use the same output as SpecialK and Cholmod Sparse solutions.
bool IsConverged ()
QString IterationSummaryGroup () const
void maximumLikelihoodSetup (QList< QString > models, QList< double > quantiles)
 This method steps up the maximum likelihood estimation solution.

Detailed Description

Author:
2006-05-30 Jeff Anderson, Debbie A. Cook, and Tracie Sucharski

Member Enumeration Documentation

Enumerator:
None 
AnglesOnly 
AnglesVelocity 
AnglesVelocityAcceleration 
CKAll 
Enumerator:
NoneSelected 
SPECIALK 
CHOLMOD 
Enumerator:
Nothing 
PositionOnly 
PositionVelocity 
PositionVelocityAcceleration 
SPKAll 

Constructor & Destructor Documentation

Isis::BundleAdjust::BundleAdjust ( const QString &  cnetFile,
const QString &  cubeList,
bool  printSummary = true 
)
Isis::BundleAdjust::BundleAdjust ( const QString &  cnetFile,
const QString &  cubeList,
const QString &  heldList,
bool  printSummary = true 
)
Isis::BundleAdjust::BundleAdjust ( Isis::ControlNet cnet,
Isis::SerialNumberList snlist,
bool  printSummary = true 
)
Isis::BundleAdjust::BundleAdjust ( Isis::ControlNet cnet,
Isis::SerialNumberList snlist,
Isis::SerialNumberList heldsnlist,
bool  printSummary = true 
)
Isis::BundleAdjust::~BundleAdjust (  ) 

Member Function Documentation

int Isis::BundleAdjust::BasisColumns (  ) 

Determine number of columns needed for least squares.

When we create a row of data we store all image partials first and then the point partials.

References Isis::ControlNet::GetNumValidPoints(), and Observations().

Referenced by Solve().

Table Isis::BundleAdjust::Cmatrix ( int  index  ) 

Return a table cmatrix for the ith cube in the cube list given to the constructor.

References Isis::SpiceRotation::Cache(), Isis::ControlNet::Camera(), and Isis::Spice::instrumentRotation().

int Isis::BundleAdjust::ComputeConstrainedParameters (  ) 
Isis::ControlNet* Isis::BundleAdjust::ControlNet (  )  [inline]

Referenced by BundleAdjust().

double Isis::BundleAdjust::Error (  )  const [inline]
QString Isis::BundleAdjust::FileName ( int  index  ) 

Return the ith filename in the cube list file given to constructor.

References Isis::SerialNumberList::fileName().

int Isis::BundleAdjust::FixedPoints (  )  const [inline]
void Isis::BundleAdjust::GetSparseParameterCorrections (  ) 

Retrieve parameter correction vector for old sparse least-squares object and parse into m_Image_Corrections and m_Point_Corrections vectors so we can use the same output as SpecialK and Cholmod Sparse solutions.

References Isis::LeastSquares::GetEpsilons(), Isis::ControlNet::GetNumPoints(), Isis::ControlNet::GetNumValidPoints(), Isis::ControlNet::GetPoint(), and Isis::ControlPoint::IsIgnored().

Referenced by Solve().

int Isis::BundleAdjust::IgnoredPoints (  )  const [inline]
int Isis::BundleAdjust::Images (  )  const [inline]

References Isis::SerialNumberList::size().

Referenced by Solve(), and SolveCholesky().

bool Isis::BundleAdjust::IsConverged (  )  [inline]
bool Isis::BundleAdjust::IsHeld ( int  index  ) 

Return whether the ith file in the cube list is held.

References Isis::SerialNumberList::hasSerialNumber(), and Isis::SerialNumberList::serialNumber().

double Isis::BundleAdjust::Iteration (  )  const [inline]
QString Isis::BundleAdjust::IterationSummaryGroup (  )  const [inline]
void Isis::BundleAdjust::maximumLikelihoodSetup ( QList< QString >  models,
QList< double >  quantiles 
)
int Isis::BundleAdjust::Observations (  )  const

Return the number of observations in list given to the constructor.

References Isis::ObservationNumberList::observationSize(), and Isis::SerialNumberList::size().

Referenced by BasisColumns(), and Solve().

Isis::SerialNumberList* Isis::BundleAdjust::SerialNumberList (  )  [inline]

Referenced by BundleAdjust().

void Isis::BundleAdjust::SetCKDegree ( int  degree  )  [inline]

Set the degree of the polynomial to fit to the camera angles.

void Isis::BundleAdjust::SetConvergenceThreshold ( double  d  )  [inline]
void Isis::BundleAdjust::SetCSVOutput ( bool  b  )  [inline]
void Isis::BundleAdjust::SetDecompositionMethod ( DecompositionMethod  method  ) 

Set decomposition method.

Choices are... SpecialK (dense normal equations matrix) Sparse (Cholmod sparse normal equations matrix)

void Isis::BundleAdjust::SetErrorPropagation ( bool  b  )  [inline]
void Isis::BundleAdjust::SetGlobalCameraAnglesAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalCameraAngularAccelerationAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalCameraAngularVelocityAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalLatitudeAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalLongitudeAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalRadiiAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalSpacecraftAccelerationAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalSpacecraftPositionAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetGlobalSpacecraftVelocityAprioriSigma ( double  d  )  [inline]
void Isis::BundleAdjust::SetMaxIterations ( int  n  )  [inline]
void Isis::BundleAdjust::SetObservationMode ( bool  observationMode  ) 

This method turns on observation mode and creates the observation number list.

It also checks to make sure the held image list is consistent for all images in an observation.

Is this still going to be necessary. Is the code that uses it still intact?

References _FILEINFO_, Isis::SerialNumberList::fileName(), Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::observationNumber(), Isis::SerialNumberList::serialNumber(), Isis::SerialNumberList::size(), and Isis::IException::User.

void Isis::BundleAdjust::SetOutlierRejection ( bool  b  )  [inline]
void Isis::BundleAdjust::SetOutputFilePrefix ( const QString &  str  )  [inline]
void Isis::BundleAdjust::SetRejectionMultiplier ( double  d  )  [inline]
void Isis::BundleAdjust::SetResidualOutput ( bool  b  )  [inline]
void Isis::BundleAdjust::SetSolutionMethod ( QString  str  ) 

This method sets the solution method for solving the matrix and fills the point index map, which is dependent on the solution method.

void Isis::BundleAdjust::SetSolveCKDegree ( int  degree  )  [inline]

Set the degree of the polynomial to adjust in the solution.

void Isis::BundleAdjust::SetSolveCmatrix ( CmatrixSolveType  type  ) 

For which camera angle coefficients do we solve?

References _FILEINFO_, AnglesOnly, AnglesVelocity, AnglesVelocityAcceleration, CKAll, Isis::toString(), and Isis::IException::User.

void Isis::BundleAdjust::SetSolvePolyOverHermite ( bool  b  )  [inline]
void Isis::BundleAdjust::SetSolvePolyOverPointing ( bool  b  )  [inline]
void Isis::BundleAdjust::SetSolveRadii ( bool  solve  )  [inline]
void Isis::BundleAdjust::SetSolveSpacecraftPosition ( SpacecraftPositionSolveType  type  ) 

For which camera position coefficients do we solve?

References _FILEINFO_, PositionOnly, PositionVelocity, PositionVelocityAcceleration, SPKAll, Isis::toString(), and Isis::IException::User.

void Isis::BundleAdjust::SetSolveSPKDegree ( int  degree  )  [inline]

Set the degree of the camera position polynomial to adjust in the solution.

void Isis::BundleAdjust::SetSolveTwist ( bool  solve  )  [inline]
void Isis::BundleAdjust::SetSPKDegree ( int  degree  )  [inline]

Set the degree of the polynomial to fit to the camera position.

void Isis::BundleAdjust::SetStandardOutput ( bool  b  )  [inline]
void Isis::BundleAdjust::SetUpdateCubes ( bool  update  )  [inline]
double Isis::BundleAdjust::Solve (  ) 

compute partials for measure

The solve method is an least squares solution for updating the camera pointing, etc. It is iterative as the equations are non-linear. During each iteration it is updating portions of the control net, as well as the instrument pointing/position in the camera. If it doesn't converge to a solution in maxIterations it will throw an error. However, even if an error is thrown the control network will contain the errors (residuals) at each control measure.

Parameters:
tol Maximum pixel error for any control network measurement
maxIterations Maximum iterations, if tolerance is never met an iException will be thrown.

References _FILEINFO_, Isis::Statistics::AddData(), Isis::Statistics::Average(), Isis::ControlNet::AverageResidual(), BasisColumns(), Isis::ControlNet::Camera(), Isis::ControlNet::ComputeApriori(), Isis::ControlNet::ComputeResiduals(), Isis::SpicePosition::GetBaseTime(), Isis::SpiceRotation::GetBaseTime(), Isis::LeastSquares::GetDegreesOfFreedom(), Isis::ControlNet::GetMaximumResidual(), Isis::ControlNet::GetNumPoints(), Isis::ControlNet::GetNumValidMeasures(), Isis::SpicePosition::GetPolynomial(), Isis::SpiceRotation::GetPolynomial(), Isis::LeastSquares::GetSigma0(), GetSparseParameterCorrections(), Isis::SpicePosition::GetTimeScale(), Isis::SpiceRotation::GetTimeScale(), Images(), Isis::Spice::instrumentPosition(), Isis::Spice::instrumentRotation(), Isis::LeastSquares::Knowns(), None, Nothing, Isis::ObservationNumberList::observationNumberMapIndex(), Observations(), Isis::ObservationNumberList::observationSize(), Isis::LeastSquares::QRD, Isis::LeastSquares::Reset(), Isis::Statistics::Reset(), Isis::LeastSquares::Residuals(), Isis::SpicePosition::SetOverrideBaseTime(), Isis::SpiceRotation::SetOverrideBaseTime(), Isis::SpicePosition::SetPolynomial(), Isis::SpiceRotation::SetPolynomial(), Isis::SpicePosition::SetPolynomialDegree(), Isis::SpiceRotation::SetPolynomialDegree(), Isis::Progress::SetText(), Isis::LeastSquares::Solve(), Isis::LeastSquares::SPARSE, Isis::LeastSquares::SparseErrorPropagation(), Isis::Statistics::SumSquare(), Isis::LeastSquares::SVD, Isis::toString(), Isis::Statistics::TotalPixels(), Isis::IException::Unknown, and Isis::IException::User.

bool Isis::BundleAdjust::SolveCholesky (  ) 

The solve method is a least squares solution for updating the camera pointing, etc.

It is iterative as the equations are non-linear. If it doesn't iterate to a solution in maxIterations it will throw an error. During each iteration it is updating portions of the control net, as well as the instrument pointing in the camera. An error is thrown if it does not converge within the maximum iterations. However, even if an error is thrown the control network will contain the errors (residuals) for each control measure.

Parameters:
tol Maximum pixel error for any control network measurement
maxIterations Maximum iterations, if tolerance is never met an iException will be thrown.

References _FILEINFO_, Isis::ControlNet::Camera(), CHOLMOD, Isis::ControlNet::ComputeApriori(), Isis::SpicePosition::GetBaseTime(), Isis::SpiceRotation::GetBaseTime(), Isis::SpicePosition::GetPolynomial(), Isis::SpiceRotation::GetPolynomial(), Isis::SpicePosition::GetTimeScale(), Isis::SpiceRotation::GetTimeScale(), Images(), Isis::Spice::instrumentPosition(), Isis::Spice::instrumentRotation(), Isis::IException::Io, None, Nothing, Isis::ObservationNumberList::observationNumberMapIndex(), Isis::ObservationNumberList::observationSize(), Isis::SpicePosition::SetOverrideBaseTime(), Isis::SpiceRotation::SetOverrideBaseTime(), Isis::SpicePosition::SetPolynomial(), Isis::SpiceRotation::SetPolynomial(), Isis::SpicePosition::SetPolynomialDegree(), Isis::SpiceRotation::SetPolynomialDegree(), Isis::StatCumProbDistDynCalc::setQuantiles(), Isis::MaximumLikelihoodWFunctions::setTweakingConstant(), SPECIALK, Isis::toString(), Isis::IException::User, Isis::StatCumProbDistDynCalc::value(), and Isis::SparseBlockMatrix::zeroBlocks().

Table Isis::BundleAdjust::SpVector ( int  index  ) 

Return a table spacecraft vector for the ith cube in the cube list given to the constructor.

References Isis::ControlNet::Camera(), and Isis::Spice::instrumentPosition().


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