Isis 3 Programmer Reference
Isis::CsmBundleObservation Class Reference

Class for observations that use CSM camera models in bundle adjustment. More...

#include <CsmBundleObservation.h>

Inheritance diagram for Isis::CsmBundleObservation:
Inheritance graph
Collaboration diagram for Isis::CsmBundleObservation:
Collaboration graph

Public Member Functions

 CsmBundleObservation ()
 Constructs a CsmBundleObservation initialized to a default state.
 
 CsmBundleObservation (BundleImageQsp image, QString observationNumber, QString instrumentId, BundleTargetBodyQsp bundleTargetBody)
 Constructs a CsmBundleObservation from a BundleImage, an instrument id, an observation number to assign to this CsmBundleObservation, and a target body.
 
 CsmBundleObservation (const CsmBundleObservation &src)
 Creates a copy of another CsmBundleObservation.
 
 ~CsmBundleObservation ()
 Destructor.
 
CsmBundleObservationoperator= (const CsmBundleObservation &src)
 Assignment operator.
 
void copy (const CsmBundleObservation &src)
 
virtual bool setSolveSettings (BundleObservationSolveSettings solveSettings)
 Set solve parameters.
 
int numberParameters ()
 Returns the number of total parameters there are for solving.
 
const BundleObservationSolveSettingsQsp solveSettings ()
 Accesses the solve settings.
 
bool applyParameterCorrections (LinearAlgebra::Vector corrections)
 Applies the parameter corrections.
 
void bundleOutputString (std::ostream &fpOut, bool errorPropagation)
 Takes in an open std::ofstream and writes out information which goes into the bundleout.txt file.
 
QString bundleOutputCSV (bool errorPropagation)
 Creates and returns a formatted QString representing the bundle coefficients and parameters in csv format.
 
virtual QStringList parameterList ()
 Returns the list of observation parameter names.
 
bool computeTargetPartials (LinearAlgebra::Matrix &coeffTarget, BundleMeasure &measure, BundleSettingsQsp &bundleSettings, BundleTargetBodyQsp &bundleTargetBody)
 Cannot compute target body parameters for a CSM observation, so always throws an exception.
 
bool computeImagePartials (LinearAlgebra::Matrix &coeffImage, BundleMeasure &measure)
 Calculates the sensor partials with respect to the solve parameters and populates the coeffImage matrix.
 
bool computePoint3DPartials (LinearAlgebra::Matrix &coeffPoint3D, BundleMeasure &measure, SurfacePoint::CoordinateType coordType)
 Calculates the ground partials for the line, sample currently set in the sensor model.
 
bool computeRHSPartials (LinearAlgebra::Vector &coeffRHS, BundleMeasure &measure)
 Calculates the sample, line residuals between the values measured in the image and the ground-to-image sample, line calculated by the sensor model.
 
double computeObservationValue (BundleMeasure &measure, double deltaVal)
 Returns the observed value in (sample, line) coordinates.
 
void copy (const BundleObservation &src)
 
virtual void append (const BundleImageQsp &value)
 Appends a BundleImage shared pointer to the BundleObservation.
 
BundleImageQsp imageByCubeSerialNumber (QString cubeSerialNumber)
 Returns the BundleImage shared pointer associated with the given serial number.
 
void setIndex (int n)
 Sets the index for the observation.
 
int index ()
 Accesses the observation's index.
 
QString instrumentId ()
 Accesses the instrument id.
 
double vtpv ()
 Compute vtpv, the weighted sum of squares of constrained image parameter residuals.
 
virtual LinearAlgebra::VectorparameterWeights ()
 Accesses the solve parameter weights.
 
virtual LinearAlgebra::VectorparameterCorrections ()
 Accesses the parameter corrections.
 
virtual LinearAlgebra::VectoraprioriSigmas ()
 Accesses the a priori sigmas.
 
virtual LinearAlgebra::VectoradjustedSigmas ()
 Accesses the adjusted sigmas.
 
virtual QStringList imageNames ()
 Access to image names for CorrelationMatrix to use.
 

Protected Attributes

QString m_observationNumber
 The shared portion of the serial numbers of all images in the observation.
 
int m_index
 Index of this observation in the set of observations. Map between cube serial number and BundleImage pointers.
 
QMap< QString, BundleImageQspm_cubeSerialNumberToBundleImageMap
 
QStringList m_serialNumbers
 List of all cube serial numbers in observation.
 
QStringList m_imageNames
 List of all cube names.
 
QString m_instrumentId
 Spacecraft instrument id.
 
LinearAlgebra::Vector m_weights
 Parameter weights. Cumulative parameter correction vector.
 
LinearAlgebra::Vector m_corrections
 
LinearAlgebra::Vector m_aprioriSigmas
 A posteriori (adjusted) parameter sigmas.
 
LinearAlgebra::Vector m_adjustedSigmas
 A posteriori (adjusted) parameter sigmas.
 

Private Member Functions

bool initParameterWeights ()
 

Private Attributes

BundleObservationSolveSettingsQsp m_solveSettings
 Solve settings for this observation.
 
std::vector< int > m_paramIndices
 The indices of the parameters the observation is solving for.
 

Detailed Description

Class for observations that use CSM camera models in bundle adjustment.

Definition at line 28 of file CsmBundleObservation.h.

Constructor & Destructor Documentation

◆ CsmBundleObservation() [1/3]

Isis::CsmBundleObservation::CsmBundleObservation ( )

Constructs a CsmBundleObservation initialized to a default state.

Definition at line 33 of file CsmBundleObservation.cpp.

◆ CsmBundleObservation() [2/3]

Isis::CsmBundleObservation::CsmBundleObservation ( BundleImageQsp image,
QString observationNumber,
QString instrumentId,
BundleTargetBodyQsp bundleTargetBody )

Constructs a CsmBundleObservation from a BundleImage, an instrument id, an observation number to assign to this CsmBundleObservation, and a target body.

Parameters
imageQSharedPointer to the primary image in the observation
observationNumberObservation number of the observation
instrumentIdId of the instrument for the observation
bundleTargetBodyQSharedPointer to the target body of the observation

Definition at line 46 of file CsmBundleObservation.cpp.

References Isis::IException::User.

◆ CsmBundleObservation() [3/3]

Isis::CsmBundleObservation::CsmBundleObservation ( const CsmBundleObservation & src)

Creates a copy of another CsmBundleObservation.

Parameters
srcReference to the CsmBundleObservation to copy

Definition at line 60 of file CsmBundleObservation.cpp.

References m_paramIndices, and m_solveSettings.

◆ ~CsmBundleObservation()

Isis::CsmBundleObservation::~CsmBundleObservation ( )

Destructor.

Contained BundleImages will remain until all shared pointers are deleted.

Definition at line 71 of file CsmBundleObservation.cpp.

Member Function Documentation

◆ adjustedSigmas()

LinearAlgebra::Vector & Isis::BundleObservation::adjustedSigmas ( )
virtualinherited

Accesses the adjusted sigmas.

Returns
LinearAlgebra::Vector Returns the adjusted sigmas

Definition at line 207 of file BundleObservation.cpp.

References Isis::BundleObservation::m_adjustedSigmas.

◆ append()

void Isis::BundleObservation::append ( const BundleImageQsp & value)
virtualinherited

Appends a BundleImage shared pointer to the BundleObservation.

If the pointer is valid, then the BundleImage and its serial number will be inserted into the serial number to BundleImage map.

Parameters
valueThe BundleImage to be appended.
See also
QVector::append()

Definition at line 135 of file BundleObservation.cpp.

Referenced by Isis::BundleObservation::BundleObservation().

◆ applyParameterCorrections()

bool Isis::CsmBundleObservation::applyParameterCorrections ( LinearAlgebra::Vector corrections)
virtual

Applies the parameter corrections.

Parameters
correctionsVector of corrections to apply
Exceptions
IException::Unknown"Instrument position is NULL, but position solve option is [not NoPositionFactors]"
IException::Unknown"Instrument position is NULL, but pointing solve option is [not NoPointingFactors]"
IException::Unknown"Unable to apply parameter corrections to CsmBundleObservation."
Returns
bool Returns true upon successful application of corrections

Implements Isis::BundleObservation.

Definition at line 163 of file CsmBundleObservation.cpp.

References Isis::CSMCamera::applyParameterCorrection(), m_paramIndices, and Isis::IException::Programmer.

◆ aprioriSigmas()

LinearAlgebra::Vector & Isis::BundleObservation::aprioriSigmas ( )
virtualinherited

Accesses the a priori sigmas.

Returns
LinearAlgebra::Vector Returns the a priori sigmas

Definition at line 197 of file BundleObservation.cpp.

References Isis::BundleObservation::m_aprioriSigmas.

◆ bundleOutputCSV()

QString Isis::CsmBundleObservation::bundleOutputCSV ( bool errorPropagation)
virtual

Creates and returns a formatted QString representing the bundle coefficients and parameters in csv format.

Parameters
errorPropagationBoolean indicating whether or not to attach more information (corrections, sigmas, adjusted sigmas...) to the output QString
Returns
QString Returns a formatted QString representing the CsmBundleObservation in csv format

Implements Isis::BundleObservation.

Definition at line 274 of file CsmBundleObservation.cpp.

References Isis::CSMCamera::getParameterValue(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, m_paramIndices, and Isis::toString().

◆ bundleOutputString()

void Isis::CsmBundleObservation::bundleOutputString ( std::ostream & fpOut,
bool errorPropagation )
virtual

Takes in an open std::ofstream and writes out information which goes into the bundleout.txt file.

Parameters
fpOutThe open std::ofstream object which is passed in from BundleSolutionInfo::outputText()
errorPropagationBoolean indicating whether or not to attach more information (corrections, sigmas, adjusted sigmas...) to the output.

Implements Isis::BundleObservation.

Definition at line 205 of file CsmBundleObservation.cpp.

References Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, m_paramIndices, numberParameters(), and Isis::toString().

◆ computeImagePartials()

bool Isis::CsmBundleObservation::computeImagePartials ( LinearAlgebra::Matrix & coeffImage,
BundleMeasure & measure )
virtual

Calculates the sensor partials with respect to the solve parameters and populates the coeffImage matrix.

Parameters
coeffImageA matrix that will be populated with the sensor partials with respect to the solve parameters.
measureThe measure that the partials are being computed for.
Returns
bool

Implements Isis::BundleObservation.

Definition at line 350 of file CsmBundleObservation.cpp.

References m_paramIndices.

◆ computeObservationValue()

double Isis::CsmBundleObservation::computeObservationValue ( BundleMeasure & measure,
double deltaVal )
virtual

Returns the observed value in (sample, line) coordinates.

This requires no modification for Csm.

Parameters
measuremeasure The measure that the partials are being computed for.
deltaValThe difference between the measured and calculate sample, line coordinates
Returns
double The The difference between the measured and calculated (line, sample) coordinate

Implements Isis::BundleObservation.

Definition at line 481 of file CsmBundleObservation.cpp.

◆ computePoint3DPartials()

bool Isis::CsmBundleObservation::computePoint3DPartials ( LinearAlgebra::Matrix & coeffPoint3D,
BundleMeasure & measure,
SurfacePoint::CoordinateType coordType )
virtual

Calculates the ground partials for the line, sample currently set in the sensor model.

Parameters
coeffPoint3DA matrix that will be populated with the (line, sample) partials with respect to the ground point.
measureThe measure that the partials are being computed for.
coordTypeNot used in this class. Coordinates are x,y,z
Returns
bool

Implements Isis::BundleObservation.

Definition at line 381 of file CsmBundleObservation.cpp.

References Isis::SurfacePoint::Latitudinal, Isis::SurfacePoint::LatitudinalDerivative(), Isis::IException::Programmer, Isis::SurfacePoint::Rectangular, and Isis::toString().

◆ computeRHSPartials()

bool Isis::CsmBundleObservation::computeRHSPartials ( LinearAlgebra::Vector & coeffRHS,
BundleMeasure & measure )
virtual

Calculates the sample, line residuals between the values measured in the image and the ground-to-image sample, line calculated by the sensor model.

Parameters
coeffRHSA vector that will contain the sample, line residuals.
measureThe measure that the partials are being computed for.
Returns
bool

Implements Isis::BundleObservation.

Definition at line 441 of file CsmBundleObservation.cpp.

References Isis::BundleControlPoint::adjustedSurfacePoint(), Isis::BundleControlPoint::id(), and Isis::IException::User.

◆ computeTargetPartials()

bool Isis::CsmBundleObservation::computeTargetPartials ( LinearAlgebra::Matrix & coeffTarget,
BundleMeasure & measure,
BundleSettingsQsp & bundleSettings,
BundleTargetBodyQsp & bundleTargetBody )
virtual

Cannot compute target body parameters for a CSM observation, so always throws an exception.

Parameters
coeffTargetMatrix for target body partial derivatives
measureThe measure that the partials are being computed for.
bundleSettingsThe settings for the bundle adjustment
bundleTargetBodyQSharedPointer to the target body of the observation
Returns
bool Always false

Implements Isis::BundleObservation.

Definition at line 329 of file CsmBundleObservation.cpp.

References Isis::IException::User.

◆ imageByCubeSerialNumber()

BundleImageQsp Isis::BundleObservation::imageByCubeSerialNumber ( QString cubeSerialNumber)
inherited

Returns the BundleImage shared pointer associated with the given serial number.

If no BundleImage with that serial number is contained a NULL pointer is returned.

Parameters
cubeSerialNumberThe serial number of the cube to be returned.
Returns
BundleImageQsp A shared pointer to the BundleImage (NULL if not found).

Definition at line 151 of file BundleObservation.cpp.

◆ imageNames()

QStringList Isis::BundleObservation::imageNames ( )
virtualinherited

Access to image names for CorrelationMatrix to use.

Returns
QStringList Returns a QStringList of the image names

Definition at line 237 of file BundleObservation.cpp.

References Isis::BundleObservation::m_imageNames.

◆ index()

int Isis::BundleObservation::index ( )
inherited

Accesses the observation's index.

Returns
int Returns the observation's index

Definition at line 227 of file BundleObservation.cpp.

References Isis::BundleObservation::m_index.

Referenced by Isis::IsisBundleObservation::applyParameterCorrections(), Isis::IsisBundleObservation::computeImagePartials(), and Isis::IsisBundleObservation::computeTargetPartials().

◆ instrumentId()

QString Isis::BundleObservation::instrumentId ( )
inherited

Accesses the instrument id.

Returns
QString Returns the instrument id of the observation

Definition at line 167 of file BundleObservation.cpp.

References Isis::BundleObservation::m_instrumentId.

Referenced by Isis::BundleObservation::BundleObservation().

◆ numberParameters()

int Isis::CsmBundleObservation::numberParameters ( )
virtual

Returns the number of total parameters there are for solving.

The total number of parameters is equal to the number of position parameters and number of pointing parameters

Returns
int Returns the number of parameters there are

Implements Isis::BundleObservation.

Definition at line 191 of file CsmBundleObservation.cpp.

References m_paramIndices.

Referenced by bundleOutputString().

◆ operator=()

CsmBundleObservation & Isis::CsmBundleObservation::operator= ( const CsmBundleObservation & src)

Assignment operator.

Assigns the state of the source CsmBundleObservation to this CsmBundleObservation

Parameters
CsmBundleObservationReference to the source CsmBundleObservation to assign from
Returns
CsmBundleObservation& Reference to this CsmBundleObservation

Definition at line 84 of file CsmBundleObservation.cpp.

References m_paramIndices, and m_solveSettings.

◆ parameterCorrections()

LinearAlgebra::Vector & Isis::BundleObservation::parameterCorrections ( )
virtualinherited

Accesses the parameter corrections.

Returns
LinearAlgebra::Vector Returns the parameter corrections

Definition at line 187 of file BundleObservation.cpp.

◆ parameterList()

QStringList Isis::CsmBundleObservation::parameterList ( )
virtual

Returns the list of observation parameter names.

This will always return at least one set of positions and pointings because we always output at least the center values even when not solving for them.

Returns
QStringList List of observation parameter names

Implements Isis::BundleObservation.

Definition at line 305 of file CsmBundleObservation.cpp.

References m_paramIndices.

◆ parameterWeights()

LinearAlgebra::Vector & Isis::BundleObservation::parameterWeights ( )
virtualinherited

Accesses the solve parameter weights.

Returns
LinearAlgebra::Vector Returns the parameter weights for solving

Definition at line 177 of file BundleObservation.cpp.

References Isis::BundleObservation::m_weights.

◆ setIndex()

void Isis::BundleObservation::setIndex ( int n)
inherited

Sets the index for the observation.

Parameters
nValue to set the index of the observation to

Definition at line 217 of file BundleObservation.cpp.

References Isis::BundleObservation::m_index.

◆ setSolveSettings()

bool Isis::CsmBundleObservation::setSolveSettings ( BundleObservationSolveSettings solveSettings)
virtual

◆ solveSettings()

const BundleObservationSolveSettingsQsp Isis::CsmBundleObservation::solveSettings ( )
virtual

Accesses the solve settings.

Returns
const BundleObservationSolveSettingsQsp Returns a pointer to the solve settings for this CsmBundleObservation

Implements Isis::BundleObservation.

Definition at line 145 of file CsmBundleObservation.cpp.

Referenced by setSolveSettings().

◆ vtpv()

double Isis::BundleObservation::vtpv ( )
inherited

Compute vtpv, the weighted sum of squares of constrained image parameter residuals.

Returns
double Weighted sum of squares of constrained image parameter residuals.

Definition at line 247 of file BundleObservation.cpp.

References Isis::BundleObservation::m_weights, and Isis::BundleObservation::vtpv().

Referenced by Isis::BundleObservation::vtpv().

Member Data Documentation

◆ m_adjustedSigmas

◆ m_aprioriSigmas

◆ m_corrections

LinearAlgebra::Vector Isis::BundleObservation::m_corrections
protectedinherited

Definition at line 106 of file BundleObservation.h.

◆ m_cubeSerialNumberToBundleImageMap

QMap<QString, BundleImageQsp> Isis::BundleObservation::m_cubeSerialNumberToBundleImageMap
protectedinherited

Definition at line 99 of file BundleObservation.h.

◆ m_imageNames

QStringList Isis::BundleObservation::m_imageNames
protectedinherited

◆ m_index

int Isis::BundleObservation::m_index
protectedinherited

Index of this observation in the set of observations. Map between cube serial number and BundleImage pointers.

Definition at line 97 of file BundleObservation.h.

Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::index(), and Isis::BundleObservation::setIndex().

◆ m_instrumentId

◆ m_observationNumber

QString Isis::BundleObservation::m_observationNumber
protectedinherited

The shared portion of the serial numbers of all images in the observation.

Definition at line 95 of file BundleObservation.h.

Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), and Isis::BundleObservation::operator=().

◆ m_paramIndices

std::vector<int> Isis::CsmBundleObservation::m_paramIndices
private

◆ m_serialNumbers

QStringList Isis::BundleObservation::m_serialNumbers
protectedinherited

◆ m_solveSettings

BundleObservationSolveSettingsQsp Isis::CsmBundleObservation::m_solveSettings
private

Solve settings for this observation.

Definition at line 73 of file CsmBundleObservation.h.

Referenced by CsmBundleObservation(), operator=(), and setSolveSettings().

◆ m_weights


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