Isis 3 Programmer Reference
|
Class for observations that use ISIS camera models in bundle adjustment. More...
#include <IsisBundleObservation.h>
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. | |
IsisBundleObservation & | operator= (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. | |
SpiceRotation * | spiceRotation () |
Accesses the instrument's spice rotation. | |
SpicePosition * | spicePosition () |
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::Vector & | parameterWeights () |
Accesses the solve parameter weights. | |
virtual LinearAlgebra::Vector & | parameterCorrections () |
Accesses the parameter corrections. | |
virtual LinearAlgebra::Vector & | aprioriSigmas () |
Accesses the a priori sigmas. | |
virtual LinearAlgebra::Vector & | adjustedSigmas () |
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, BundleImageQsp > | m_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 () |
Initializes the paramater weights for solving. | |
Private Attributes | |
BundleObservationSolveSettingsQsp | m_solveSettings |
Solve settings for this observation. | |
SpiceRotation * | m_instrumentRotation |
Instrument spice rotation (in primary image). | |
SpicePosition * | m_instrumentPosition |
Instrument spice position (in primary image). | |
BundleTargetBodyQsp | m_bundleTargetBody |
QShared pointer to BundleTargetBody. | |
Class for observations that use ISIS camera models in bundle adjustment.
Definition at line 34 of file IsisBundleObservation.h.
Isis::IsisBundleObservation::IsisBundleObservation | ( | ) |
Constructs a IsisBundleObservation initialized to a default state.
Definition at line 34 of file IsisBundleObservation.cpp.
References m_instrumentPosition, and m_instrumentRotation.
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.
image | QSharedPointer to the primary image in the observation |
observationNumber | Observation number of the observation |
instrumentId | Id of the instrument for the observation |
bundleTargetBody | QSharedPointer to the target body of the observation |
Definition at line 49 of file IsisBundleObservation.cpp.
References m_bundleTargetBody, m_instrumentPosition, and m_instrumentRotation.
Isis::IsisBundleObservation::IsisBundleObservation | ( | const IsisBundleObservation & | src | ) |
Creates a copy of another IsisBundleObservation.
src | Reference to the IsisBundleObservation to copy |
Definition at line 77 of file IsisBundleObservation.cpp.
References m_bundleTargetBody, m_instrumentPosition, m_instrumentRotation, and m_solveSettings.
Isis::IsisBundleObservation::~IsisBundleObservation | ( | ) |
Destructor.
Contained BundleImages will remain until all shared pointers are deleted.
Definition at line 90 of file IsisBundleObservation.cpp.
|
virtualinherited |
Accesses the adjusted sigmas.
Definition at line 207 of file BundleObservation.cpp.
References Isis::BundleObservation::m_adjustedSigmas.
|
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.
value | The BundleImage to be appended. |
Definition at line 135 of file BundleObservation.cpp.
Referenced by Isis::BundleObservation::BundleObservation().
|
virtual |
Applies the parameter corrections.
corrections | Vector of corrections to apply |
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." |
Implements Isis::BundleObservation.
Definition at line 405 of file IsisBundleObservation.cpp.
References Isis::SpiceRotation::GetPolynomial(), Isis::SpicePosition::GetPolynomial(), Isis::BundleObservation::index(), Isis::BundleObservationSolveSettings::instrumentPointingSolveOptionToString(), Isis::BundleObservationSolveSettings::instrumentPositionSolveOptionToString(), m_instrumentPosition, m_instrumentRotation, m_solveSettings, Isis::BundleObservationSolveSettings::NoPointingFactors, Isis::BundleObservationSolveSettings::NoPositionFactors, Isis::SpiceRotation::SetPolynomial(), spiceRotation(), and Isis::IException::Unknown.
|
virtualinherited |
Accesses the a priori sigmas.
Definition at line 197 of file BundleObservation.cpp.
References Isis::BundleObservation::m_aprioriSigmas.
|
virtual |
Creates and returns a formatted QString representing the bundle coefficients and parameters in csv format.
errorPropagation | Boolean indicating whether or not to attach more information (corrections, sigmas, adjusted sigmas...) to the output QString |
Implements Isis::BundleObservation.
Definition at line 965 of file IsisBundleObservation.cpp.
References bundleOutputFetchData(), Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::RAD2DEG, and Isis::toString().
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.
finalParameterValues | Reference to QVector<double> of calculated position and pointing |
nPositionCoefficients | Reference to int of the number of position coefficients |
nPointingCoefficients | Reference to int of the number of pointing coefficients |
useDefaultPosition | Reference to boolean of whether to use default position |
useDefaultPointing | Reference to boolean of whether to use default pointing |
useDefaultTwist | Reference to bollean of whether to use defualt twist |
Definition at line 646 of file IsisBundleObservation.cpp.
References Isis::SpiceRotation::GetCenterAngles(), Isis::SpicePosition::GetCenterCoordinate(), Isis::SpiceRotation::GetPolynomial(), Isis::SpicePosition::GetPolynomial(), m_instrumentPosition, m_instrumentRotation, and m_solveSettings.
Referenced by bundleOutputCSV(), and bundleOutputString().
|
virtual |
Takes in an open std::ofstream and writes out information which goes into the bundleout.txt file.
fpOut | The open std::ofstream object which is passed in from BundleSolutionInfo::outputText() |
errorPropagation | Boolean indicating whether or not to attach more information (corrections, sigmas, adjusted sigmas...) to the output. |
Implements Isis::BundleObservation.
Definition at line 744 of file IsisBundleObservation.cpp.
References bundleOutputFetchData(), Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::RAD2DEG, and Isis::toString().
|
virtual |
Calculates the sensor partials with respect to the selected solve parameters and populates the coeffImage matrix.
coeffImage | A matrix that will be populated with the sensor partials with respect to the specified solve parameters. |
measure | The measure that the partials are being computed for. |
Implements Isis::BundleObservation.
Definition at line 1184 of file IsisBundleObservation.cpp.
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, and Isis::SpiceRotation::WRT_Twist.
|
virtual |
Converts the observed value from a focal plane coordinate to an image sample or line.
measure | The measure that the partials are being computed for. |
deltaVal | The difference between the measured and calculated focal plane coordinate |
Implements Isis::BundleObservation.
Definition at line 1370 of file IsisBundleObservation.cpp.
|
virtual |
Calculates the ground partials for the ground point currently set in the sensor model.
coeffPoint3D | A matrix that will be populated with the (line, sample) partials with respect to the ground point. |
measure | The measure that the partials are being computed for. |
coordType | Specifies whether latitudinal or (x, y, z) coordinates are used. |
Implements Isis::BundleObservation.
Definition at line 1281 of file IsisBundleObservation.cpp.
References Isis::BundleControlPoint::adjustedSurfacePoint(), and Isis::SurfacePoint::Partial().
|
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.
coeffRHS | A vector that will contain the focal plane x, y residuals. |
measure | The measure that the partials are being computed for. |
Implements Isis::BundleObservation.
Definition at line 1324 of file IsisBundleObservation.cpp.
References Isis::BundleControlPoint::adjustedSurfacePoint(), Isis::BundleControlPoint::id(), and Isis::IException::User.
|
virtual |
Computes any needed partials for the target body parameters.
coeffTarget | Matrix for target body partial derivatives |
measure | The measure that the partials are being computed for. |
bundleSettings | The settings for the bundle adjustment |
bundleTargetBody | QSharedPointer to the target body of the observation |
Implements Isis::BundleObservation.
Definition at line 1073 of file IsisBundleObservation.cpp.
References Isis::BundleControlPoint::adjustedSurfacePoint(), Isis::BundleObservation::index(), Isis::SpiceRotation::WRT_Declination, Isis::SpiceRotation::WRT_RightAscension, and Isis::SpiceRotation::WRT_Twist.
|
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.
cubeSerialNumber | The serial number of the cube to be returned. |
Definition at line 151 of file BundleObservation.cpp.
|
virtualinherited |
Access to image names for CorrelationMatrix to use.
Definition at line 237 of file BundleObservation.cpp.
References Isis::BundleObservation::m_imageNames.
|
inherited |
Accesses the observation's index.
Definition at line 227 of file BundleObservation.cpp.
References Isis::BundleObservation::m_index.
Referenced by applyParameterCorrections(), computeImagePartials(), and computeTargetPartials().
void Isis::IsisBundleObservation::initializeBodyRotation | ( | ) |
Intializes the body rotation.
Definition at line 273 of file IsisBundleObservation.cpp.
References m_bundleTargetBody.
bool Isis::IsisBundleObservation::initializeExteriorOrientation | ( | ) |
Initializes the exterior orientation.
Definition at line 190 of file IsisBundleObservation.cpp.
References Isis::SpicePosition::GetBaseTime(), Isis::SpicePosition::GetPolynomial(), Isis::SpicePosition::GetTimeScale(), m_instrumentPosition, m_solveSettings, Isis::BundleObservationSolveSettings::NoPointingFactors, Isis::BundleObservationSolveSettings::NoPositionFactors, Isis::SpicePosition::SetOverrideBaseTime(), Isis::SpicePosition::SetPolynomial(), Isis::SpicePosition::SetPolynomialDegree(), and spicePosition().
|
private |
Initializes the paramater weights for solving.
Definition at line 305 of file IsisBundleObservation.cpp.
References Isis::DEG2RAD, Isis::BundleObservation::m_aprioriSigmas, m_solveSettings, and Isis::BundleObservation::m_weights.
Referenced by setSolveSettings().
|
inherited |
Accesses the instrument id.
Definition at line 167 of file BundleObservation.cpp.
References Isis::BundleObservation::m_instrumentId.
Referenced by Isis::BundleObservation::BundleObservation().
|
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
Implements Isis::BundleObservation.
Definition at line 548 of file IsisBundleObservation.cpp.
References numberPointingParameters(), and numberPositionParameters().
int Isis::IsisBundleObservation::numberPointingParameters | ( | ) |
Returns the number of pointing parameters being solved for.
Definition at line 530 of file IsisBundleObservation.cpp.
References m_solveSettings.
Referenced by numberParameters().
int Isis::IsisBundleObservation::numberPositionParameters | ( | ) |
Returns the number of position parameters there are.
Definition at line 520 of file IsisBundleObservation.cpp.
References m_solveSettings.
Referenced by numberParameters().
IsisBundleObservation & Isis::IsisBundleObservation::operator= | ( | const IsisBundleObservation & | src | ) |
Assignment operator.
Assigns the state of the source IsisBundleObservation to this IsisBundleObservation
IsisBundleObservation | Reference to the source IsisBundleObservation to assign from |
Definition at line 103 of file IsisBundleObservation.cpp.
References m_bundleTargetBody, m_instrumentPosition, m_instrumentRotation, m_solveSettings, and Isis::BundleObservation::operator=().
|
virtualinherited |
Accesses the parameter corrections.
Definition at line 187 of file BundleObservation.cpp.
|
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.
Implements Isis::BundleObservation.
Definition at line 562 of file IsisBundleObservation.cpp.
References solveSettings(), and Isis::toString().
|
virtualinherited |
Accesses the solve parameter weights.
Definition at line 177 of file BundleObservation.cpp.
References Isis::BundleObservation::m_weights.
|
inherited |
Sets the index for the observation.
n | Value to set the index of the observation to |
Definition at line 217 of file BundleObservation.cpp.
References Isis::BundleObservation::m_index.
|
virtual |
Set solve parameters.
solveSettings | The solve settings to use |
Implements Isis::BundleObservation.
Definition at line 122 of file IsisBundleObservation.cpp.
References initParameterWeights(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, m_solveSettings, Isis::BundleObservation::m_weights, Isis::Null, and solveSettings().
|
virtual |
Accesses the solve settings.
Implements Isis::BundleObservation.
Definition at line 180 of file IsisBundleObservation.cpp.
References m_solveSettings.
Referenced by computeImagePartials(), parameterList(), and setSolveSettings().
SpicePosition * Isis::IsisBundleObservation::spicePosition | ( | ) |
Accesses the instrument's spice position.
Definition at line 169 of file IsisBundleObservation.cpp.
References m_instrumentPosition.
Referenced by initializeExteriorOrientation().
SpiceRotation * Isis::IsisBundleObservation::spiceRotation | ( | ) |
Accesses the instrument's spice rotation.
Definition at line 159 of file IsisBundleObservation.cpp.
References m_instrumentRotation.
Referenced by applyParameterCorrections().
void Isis::IsisBundleObservation::updateBodyRotation | ( | ) |
Updates the body rotation.
Definition at line 288 of file IsisBundleObservation.cpp.
References m_bundleTargetBody.
|
inherited |
Compute vtpv, the 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().
|
protectedinherited |
A posteriori (adjusted) parameter sigmas.
Definition at line 110 of file BundleObservation.h.
Referenced by Isis::BundleObservation::adjustedSigmas(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), bundleOutputCSV(), Isis::CsmBundleObservation::bundleOutputCSV(), bundleOutputString(), Isis::CsmBundleObservation::bundleOutputString(), setSolveSettings(), and Isis::CsmBundleObservation::setSolveSettings().
|
protectedinherited |
A posteriori (adjusted) parameter sigmas.
Definition at line 108 of file BundleObservation.h.
Referenced by Isis::BundleObservation::aprioriSigmas(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), bundleOutputCSV(), Isis::CsmBundleObservation::bundleOutputCSV(), bundleOutputString(), Isis::CsmBundleObservation::bundleOutputString(), initParameterWeights(), setSolveSettings(), and Isis::CsmBundleObservation::setSolveSettings().
|
private |
QShared pointer to BundleTargetBody.
Definition at line 94 of file IsisBundleObservation.h.
Referenced by initializeBodyRotation(), IsisBundleObservation(), IsisBundleObservation(), operator=(), and updateBodyRotation().
|
protectedinherited |
Definition at line 106 of file BundleObservation.h.
|
protectedinherited |
Definition at line 99 of file BundleObservation.h.
|
protectedinherited |
List of all cube names.
Definition at line 101 of file BundleObservation.h.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), and Isis::BundleObservation::imageNames().
|
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().
|
protectedinherited |
Spacecraft instrument id.
Definition at line 102 of file BundleObservation.h.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::instrumentId(), and Isis::BundleObservation::operator=().
|
private |
Instrument spice position (in primary image).
Definition at line 92 of file IsisBundleObservation.h.
Referenced by applyParameterCorrections(), bundleOutputFetchData(), initializeExteriorOrientation(), IsisBundleObservation(), IsisBundleObservation(), IsisBundleObservation(), operator=(), and spicePosition().
|
private |
Instrument spice rotation (in primary image).
Definition at line 91 of file IsisBundleObservation.h.
Referenced by applyParameterCorrections(), bundleOutputFetchData(), IsisBundleObservation(), IsisBundleObservation(), IsisBundleObservation(), operator=(), and spiceRotation().
|
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=().
|
protectedinherited |
List of all cube serial numbers in observation.
Definition at line 100 of file BundleObservation.h.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), and Isis::BundleObservation::operator=().
|
private |
Solve settings for this observation.
Definition at line 89 of file IsisBundleObservation.h.
Referenced by applyParameterCorrections(), bundleOutputFetchData(), initializeExteriorOrientation(), initParameterWeights(), IsisBundleObservation(), numberPointingParameters(), numberPositionParameters(), operator=(), setSolveSettings(), and solveSettings().
|
protectedinherited |
Parameter weights. Cumulative parameter correction vector.
Definition at line 104 of file BundleObservation.h.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), initParameterWeights(), Isis::BundleObservation::parameterWeights(), setSolveSettings(), Isis::CsmBundleObservation::setSolveSettings(), and Isis::BundleObservation::vtpv().