Isis Developer 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. | |
Class for observations that use ISIS camera models in bundle adjustment.
Isis::IsisBundleObservation::IsisBundleObservation | ( | ) |
Constructs a IsisBundleObservation initialized to a default state.
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 |
Isis::IsisBundleObservation::IsisBundleObservation | ( | const IsisBundleObservation & | src | ) |
Creates a copy of another IsisBundleObservation.
src | Reference to the IsisBundleObservation to copy |
Isis::IsisBundleObservation::~IsisBundleObservation | ( | ) |
Destructor.
Contained BundleImages will remain until all shared pointers are deleted.
|
virtualinherited |
Accesses the adjusted sigmas.
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. |
References Isis::BundleObservation::m_cubeSerialNumberToBundleImageMap.
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.
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.
|
virtualinherited |
Accesses the a priori sigmas.
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.
References bundleOutputFetchData(), Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::BundleObservation::m_corrections, 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 |
References Isis::SpiceRotation::GetCenterAngles(), Isis::SpicePosition::GetCenterCoordinate(), Isis::SpiceRotation::GetPolynomial(), and Isis::SpicePosition::GetPolynomial().
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.
References bundleOutputFetchData(), Isis::IsSpecial(), Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::BundleObservation::m_corrections, 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.
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.
|
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.
|
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.
References Isis::BundleControlPoint::adjustedSurfacePoint(), Isis::SurfacePoint::One, Isis::SurfacePoint::Partial(), Isis::SurfacePoint::Three, and Isis::SurfacePoint::Two.
|
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.
References _FILEINFO_, 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.
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.
|
inherited |
void Isis::IsisBundleObservation::copy | ( | const IsisBundleObservation & | src | ) |
|
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. |
References Isis::BundleObservation::m_cubeSerialNumberToBundleImageMap.
|
virtualinherited |
Access to image names for CorrelationMatrix to use.
References Isis::BundleObservation::m_imageNames.
|
inherited |
Accesses the observation's index.
References Isis::BundleObservation::m_index.
Referenced by applyParameterCorrections(), computeImagePartials(), and computeTargetPartials().
void Isis::IsisBundleObservation::initializeBodyRotation | ( | ) |
Intializes the body rotation.
bool Isis::IsisBundleObservation::initializeExteriorOrientation | ( | ) |
Initializes the exterior orientation.
References Isis::SpicePosition::GetBaseTime(), Isis::SpicePosition::GetPolynomial(), Isis::SpicePosition::GetTimeScale(), Isis::BundleObservationSolveSettings::NoPointingFactors, Isis::BundleObservationSolveSettings::NoPositionFactors, Isis::SpicePosition::SetOverrideBaseTime(), Isis::SpicePosition::SetPolynomial(), Isis::SpicePosition::SetPolynomialDegree(), and spicePosition().
|
inherited |
Accesses the instrument id.
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.
References numberPointingParameters(), and numberPositionParameters().
int Isis::IsisBundleObservation::numberPointingParameters | ( | ) |
Returns the number of pointing parameters being solved for.
Referenced by numberParameters().
int Isis::IsisBundleObservation::numberPositionParameters | ( | ) |
Returns the number of position parameters there are.
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 |
References Isis::BundleObservation::operator=().
|
virtualinherited |
Accesses the parameter corrections.
References Isis::BundleObservation::m_corrections.
|
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.
References solveSettings(), and Isis::toString().
|
virtualinherited |
Accesses the solve parameter weights.
References Isis::BundleObservation::m_weights.
|
inherited |
Sets the index for the observation.
n | Value to set the index of the observation to |
References Isis::BundleObservation::m_index.
|
virtual |
Set solve parameters.
solveSettings | The solve settings to use |
Implements Isis::BundleObservation.
References Isis::BundleObservation::m_adjustedSigmas, Isis::BundleObservation::m_aprioriSigmas, Isis::BundleObservation::m_corrections, Isis::BundleObservation::m_weights, Isis::Null, and solveSettings().
|
virtual |
Accesses the solve settings.
Implements Isis::BundleObservation.
Referenced by computeImagePartials(), parameterList(), and setSolveSettings().
SpicePosition * Isis::IsisBundleObservation::spicePosition | ( | ) |
Accesses the instrument's spice position.
Referenced by initializeExteriorOrientation().
SpiceRotation * Isis::IsisBundleObservation::spiceRotation | ( | ) |
Accesses the instrument's spice rotation.
Referenced by applyParameterCorrections().
void Isis::IsisBundleObservation::updateBodyRotation | ( | ) |
Updates the body rotation.
|
inherited |
Compute vtpv, the 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().
|
protectedinherited |
A posteriori (adjusted) parameter sigmas.
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.
Referenced by Isis::BundleObservation::aprioriSigmas(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), bundleOutputCSV(), Isis::CsmBundleObservation::bundleOutputCSV(), bundleOutputString(), Isis::CsmBundleObservation::bundleOutputString(), setSolveSettings(), and Isis::CsmBundleObservation::setSolveSettings().
|
protectedinherited |
Referenced by applyParameterCorrections(), Isis::CsmBundleObservation::applyParameterCorrections(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), bundleOutputCSV(), Isis::CsmBundleObservation::bundleOutputCSV(), bundleOutputString(), Isis::CsmBundleObservation::bundleOutputString(), Isis::BundleObservation::parameterCorrections(), setSolveSettings(), Isis::CsmBundleObservation::setSolveSettings(), and Isis::BundleObservation::vtpv().
|
protectedinherited |
|
protectedinherited |
List of all cube names.
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.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::index(), and Isis::BundleObservation::setIndex().
|
protectedinherited |
Spacecraft instrument id.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::instrumentId(), and Isis::BundleObservation::operator=().
|
protectedinherited |
The shared portion of the serial numbers of all images in the observation.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), and Isis::BundleObservation::operator=().
|
protectedinherited |
List of all cube serial numbers in observation.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), and Isis::BundleObservation::operator=().
|
protectedinherited |
Parameter weights. Cumulative parameter correction vector.
Referenced by Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::BundleObservation(), Isis::BundleObservation::parameterWeights(), setSolveSettings(), Isis::CsmBundleObservation::setSolveSettings(), and Isis::BundleObservation::vtpv().