Isis Developer Reference
Isis::IsisBundleObservation Class Reference

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

#include <IsisBundleObservation.h>

Inheritance diagram for Isis::IsisBundleObservation:
Inheritance graph
Collaboration diagram for Isis::IsisBundleObservation:
Collaboration graph

Public Member Functions

 IsisBundleObservation ()
 Constructs a IsisBundleObservation initialized to a default state.
 
 IsisBundleObservation (BundleImageQsp image, QString observationNumber, QString instrumentId, BundleTargetBodyQsp bundleTargetBody)
 Constructs a IsisBundleObservation from an BundleImage, an instrument id, an observation number to assign to this IsisBundleObservation, and a target body.
 
 IsisBundleObservation (const IsisBundleObservation &src)
 Creates a copy of another IsisBundleObservation.
 
 ~IsisBundleObservation ()
 Destructor.
 
IsisBundleObservationoperator= (const IsisBundleObservation &src)
 Assignment operator.
 
void copy (const IsisBundleObservation &src)
 
virtual bool setSolveSettings (BundleObservationSolveSettings solveSettings)
 Set solve parameters.
 
int numberPositionParameters ()
 Returns the number of position parameters there are.
 
int numberPointingParameters ()
 Returns the number of pointing parameters being solved for.
 
int numberParameters ()
 Returns the number of total parameters there are for solving.
 
SpiceRotationspiceRotation ()
 Accesses the instrument's spice rotation.
 
SpicePositionspicePosition ()
 Accesses the instrument's spice position.
 
const BundleObservationSolveSettingsQsp solveSettings ()
 Accesses the solve settings.
 
bool applyParameterCorrections (LinearAlgebra::Vector corrections)
 Applies the parameter corrections.
 
bool initializeExteriorOrientation ()
 Initializes the exterior orientation.
 
void initializeBodyRotation ()
 Intializes the body rotation.
 
void updateBodyRotation ()
 Updates the body rotation.
 
void bundleOutputFetchData (QVector< double > &finalParameterValues, int &nPositionCoefficients, int &nPointingCoefficients, bool &useDefaultPosition, bool &useDefaultPointing, bool &useDefaultTwist)
 Fetches data for the log file output methods.
 
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)
 Computes any needed partials for the target body parameters.
 
bool computeImagePartials (LinearAlgebra::Matrix &coeffImage, BundleMeasure &measure)
 Calculates the sensor partials with respect to the selected solve parameters and populates the coeffImage matrix.
 
bool computePoint3DPartials (LinearAlgebra::Matrix &coeffPoint3D, BundleMeasure &measure, SurfacePoint::CoordinateType coordType)
 Calculates the ground partials for the ground point currently set in the sensor model.
 
bool computeRHSPartials (LinearAlgebra::Vector &coeffRHS, BundleMeasure &measure)
 Calculates the sample, line residuals between the measured focal plane values and the focal plane coordinates calculated for the ground point by the sensor model.
 
double computeObservationValue (BundleMeasure &measure, double deltaVal)
 Converts the observed value from a focal plane coordinate to an image sample or line.
 
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.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ IsisBundleObservation() [1/3]

Isis::IsisBundleObservation::IsisBundleObservation ( )

Constructs a IsisBundleObservation initialized to a default state.

◆ IsisBundleObservation() [2/3]

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

Constructs a IsisBundleObservation from an BundleImage, an instrument id, an observation number to assign to this IsisBundleObservation, 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

◆ IsisBundleObservation() [3/3]

Isis::IsisBundleObservation::IsisBundleObservation ( const IsisBundleObservation & src)

Creates a copy of another IsisBundleObservation.

Parameters
srcReference to the IsisBundleObservation to copy

◆ ~IsisBundleObservation()

Isis::IsisBundleObservation::~IsisBundleObservation ( )

Destructor.

Contained BundleImages will remain until all shared pointers are deleted.

Member Function Documentation

◆ adjustedSigmas()

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

Accesses the adjusted sigmas.

Returns
LinearAlgebra::Vector Returns the adjusted sigmas

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()

References Isis::BundleObservation::m_cubeSerialNumberToBundleImageMap.

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

◆ applyParameterCorrections()

bool Isis::IsisBundleObservation::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 IsisBundleObservation."
Returns
bool Returns true upon successful application of corrections

Implements Isis::BundleObservation.

References _FILEINFO_, Isis::SpiceRotation::GetPolynomial(), Isis::SpicePosition::GetPolynomial(), Isis::BundleObservation::index(), Isis::BundleObservationSolveSettings::instrumentPointingSolveOptionToString(), Isis::BundleObservationSolveSettings::instrumentPositionSolveOptionToString(), Isis::BundleObservation::m_corrections, Isis::BundleObservationSolveSettings::NoPointingFactors, Isis::BundleObservationSolveSettings::NoPositionFactors, Isis::SpiceRotation::SetPolynomial(), spiceRotation(), and Isis::IException::Unknown.

◆ aprioriSigmas()

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

Accesses the a priori sigmas.

Returns
LinearAlgebra::Vector Returns the a priori sigmas

References Isis::BundleObservation::m_aprioriSigmas.

◆ bundleOutputCSV()

QString Isis::IsisBundleObservation::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 IsisBundleObservation in csv format

Implements Isis::BundleObservation.

References bundleOutputFetchData(), Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::BundleObservation::m_corrections, Isis::RAD2DEG, and Isis::toString().

◆ bundleOutputFetchData()

void Isis::IsisBundleObservation::bundleOutputFetchData ( QVector< double > & finalParameterValues,
int & nPositionCoefficients,
int & nPointingCoefficients,
bool & useDefaultPosition,
bool & useDefaultPointing,
bool & useDefaultTwist )

Fetches data for the log file output methods.

Parameters
finalParameterValuesReference to QVector<double> of calculated position and pointing
nPositionCoefficientsReference to int of the number of position coefficients
nPointingCoefficientsReference to int of the number of pointing coefficients
useDefaultPositionReference to boolean of whether to use default position
useDefaultPointingReference to boolean of whether to use default pointing
useDefaultTwistReference to bollean of whether to use defualt twist

References Isis::SpiceRotation::GetCenterAngles(), Isis::SpicePosition::GetCenterCoordinate(), Isis::SpiceRotation::GetPolynomial(), and Isis::SpicePosition::GetPolynomial().

Referenced by bundleOutputCSV(), and bundleOutputString().

◆ bundleOutputString()

void Isis::IsisBundleObservation::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.

References bundleOutputFetchData(), Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::BundleObservation::m_corrections, Isis::RAD2DEG, and Isis::toString().

◆ computeImagePartials()

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

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

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

Implements Isis::BundleObservation.

References Isis::CameraGroundMap::GetdXYdOrientation(), Isis::CameraGroundMap::GetdXYdPosition(), Isis::Camera::GroundMap(), Isis::BundleObservation::index(), Isis::BundleObservationSolveSettings::NoPointingFactors, Isis::BundleObservationSolveSettings::NoPositionFactors, Isis::Camera::PixelPitch(), solveSettings(), Isis::SpiceRotation::WRT_Declination, Isis::SpiceRotation::WRT_RightAscension, Isis::SpiceRotation::WRT_Twist, Isis::SpicePosition::WRT_X, Isis::SpicePosition::WRT_Y, and Isis::SpicePosition::WRT_Z.

◆ computeObservationValue()

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

Converts the observed value from a focal plane coordinate to an image sample or line.

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

Implements Isis::BundleObservation.

◆ computePoint3DPartials()

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

Calculates the ground partials for the ground point 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.
coordTypeSpecifies whether latitudinal or (x, y, z) coordinates are used.
Returns
bool

Implements Isis::BundleObservation.

References Isis::BundleControlPoint::adjustedSurfacePoint(), Isis::SurfacePoint::One, Isis::SurfacePoint::Partial(), Isis::SurfacePoint::Three, and Isis::SurfacePoint::Two.

◆ computeRHSPartials()

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

Calculates the sample, line residuals between the measured focal plane values and the focal plane coordinates calculated for the ground point by the sensor model.

Parameters
coeffRHSA vector that will contain the focal plane x, y residuals.
measureThe measure that the partials are being computed for.
Returns
bool

Implements Isis::BundleObservation.

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

◆ computeTargetPartials()

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

Computes any needed partials for the target body parameters.

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

Implements Isis::BundleObservation.

References Isis::BundleControlPoint::adjustedSurfacePoint(), Isis::BundleObservation::index(), Isis::SpiceRotation::WRT_Declination, Isis::CameraGroundMap::WRT_MajorAxis, Isis::CameraGroundMap::WRT_MinorAxis, Isis::CameraGroundMap::WRT_PolarAxis, Isis::SpiceRotation::WRT_RightAscension, and Isis::SpiceRotation::WRT_Twist.

◆ copy() [1/2]

void Isis::BundleObservation::copy ( const BundleObservation & src)
inherited

◆ copy() [2/2]

void Isis::IsisBundleObservation::copy ( const IsisBundleObservation & src)

◆ 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).

References Isis::BundleObservation::m_cubeSerialNumberToBundleImageMap.

◆ imageNames()

QStringList Isis::BundleObservation::imageNames ( )
virtualinherited

Access to image names for CorrelationMatrix to use.

Returns
QStringList Returns a QStringList of the image names

References Isis::BundleObservation::m_imageNames.

◆ index()

int Isis::BundleObservation::index ( )
inherited

Accesses the observation's index.

Returns
int Returns the observation's index

References Isis::BundleObservation::m_index.

Referenced by applyParameterCorrections(), computeImagePartials(), and computeTargetPartials().

◆ initializeBodyRotation()

void Isis::IsisBundleObservation::initializeBodyRotation ( )

Intializes the body rotation.

◆ initializeExteriorOrientation()

◆ instrumentId()

QString Isis::BundleObservation::instrumentId ( )
inherited

Accesses the instrument id.

Returns
QString Returns the instrument id of the observation

References Isis::BundleObservation::m_instrumentId.

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

◆ numberParameters()

int Isis::IsisBundleObservation::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.

References numberPointingParameters(), and numberPositionParameters().

◆ numberPointingParameters()

int Isis::IsisBundleObservation::numberPointingParameters ( )

Returns the number of pointing parameters being solved for.

Returns
int Returns the number of pointing parameters

Referenced by numberParameters().

◆ numberPositionParameters()

int Isis::IsisBundleObservation::numberPositionParameters ( )

Returns the number of position parameters there are.

Returns
int Returns the number of position parameters

Referenced by numberParameters().

◆ operator=()

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

Assignment operator.

Assigns the state of the source IsisBundleObservation to this IsisBundleObservation

Parameters
IsisBundleObservationReference to the source IsisBundleObservation to assign from
Returns
IsisBundleObservation& Reference to this IsisBundleObservation

References Isis::BundleObservation::operator=().

◆ parameterCorrections()

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

Accesses the parameter corrections.

Returns
LinearAlgebra::Vector Returns the parameter corrections

References Isis::BundleObservation::m_corrections.

◆ parameterList()

QStringList Isis::IsisBundleObservation::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.

References solveSettings(), and Isis::toString().

◆ parameterWeights()

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

Accesses the solve parameter weights.

Returns
LinearAlgebra::Vector Returns the parameter weights for solving

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

References Isis::BundleObservation::m_index.

◆ setSolveSettings()

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

Set solve parameters.

Parameters
solveSettingsThe solve settings to use
Returns
bool Returns true if settings were successfully set

Implements Isis::BundleObservation.

References Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::BundleObservation::m_corrections, Isis::BundleObservation::m_weights, Isis::Null, and solveSettings().

◆ solveSettings()

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

Accesses the solve settings.

Returns
const IsisBundleObservationSolveSettingsQsp Returns a pointer to the solve settings for this IsisBundleObservation

Implements Isis::BundleObservation.

Referenced by computeImagePartials(), parameterList(), and setSolveSettings().

◆ spicePosition()

SpicePosition * Isis::IsisBundleObservation::spicePosition ( )

Accesses the instrument's spice position.

Returns
SpicePosition* Returns the SpicePosition for this observation

Referenced by initializeExteriorOrientation().

◆ spiceRotation()

SpiceRotation * Isis::IsisBundleObservation::spiceRotation ( )

Accesses the instrument's spice rotation.

Returns
SpiceRotation* Returns the SpiceRotation for this observation

Referenced by applyParameterCorrections().

◆ updateBodyRotation()

void Isis::IsisBundleObservation::updateBodyRotation ( )

Updates the body rotation.

◆ 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.

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

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

Member Data Documentation

◆ m_adjustedSigmas

◆ m_aprioriSigmas

◆ m_corrections

◆ m_cubeSerialNumberToBundleImageMap

◆ m_imageNames

QStringList Isis::BundleObservation::m_imageNames
protectedinherited

◆ m_index

int Isis::BundleObservation::m_index
protectedinherited

◆ m_instrumentId

◆ m_observationNumber

QString Isis::BundleObservation::m_observationNumber
protectedinherited

◆ m_serialNumbers

QStringList Isis::BundleObservation::m_serialNumbers
protectedinherited

◆ m_weights


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