Isis 3 Programmer Reference
|
Class for bundle observations. More...
#include <BundleObservation.h>
Public Member Functions | |
BundleObservation () | |
Constructs a BundleObservation initialized to a default state. More... | |
BundleObservation (BundleImageQsp image, QString observationNumber, QString instrumentId, BundleTargetBodyQsp bundleTargetBody) | |
Constructs a BundleObservation from an BundleImage, an instrument id, an observation number to assign to this BundleObservation, and a target body. More... | |
BundleObservation (const BundleObservation &src) | |
Creates a copy of another BundleObservation. More... | |
~BundleObservation () | |
Destructor. More... | |
BundleObservation & | operator= (const BundleObservation &src) |
Assignment operator. More... | |
void | copy (const BundleObservation &src) |
void | append (const BundleImageQsp &value) |
Appends a BundleImage shared pointer to the BundleObservation. More... | |
BundleImageQsp | imageByCubeSerialNumber (QString cubeSerialNumber) |
Returns the BundleImage shared pointer associated with the given serial number. More... | |
bool | setSolveSettings (BundleObservationSolveSettings solveSettings) |
Set solve parameters. More... | |
void | setIndex (int n) |
Sets the index for the observation. More... | |
int | index () |
Accesses the observation's index. More... | |
int | numberPositionParameters () |
Returns the number of position parameters there are. More... | |
int | numberPointingParameters () |
Returns the number of pointing parameters being solved for. More... | |
int | numberParameters () |
Returns the number of total parameters there are for solving. More... | |
QString | instrumentId () |
Accesses the instrument id. More... | |
SpiceRotation * | spiceRotation () |
Accesses the instrument's spice rotation. More... | |
SpicePosition * | spicePosition () |
Accesses the instrument's spice position. More... | |
LinearAlgebra::Vector & | parameterWeights () |
Accesses the solve parameter weights. More... | |
LinearAlgebra::Vector & | parameterCorrections () |
Accesses the parameter corrections. More... | |
LinearAlgebra::Vector & | aprioriSigmas () |
Accesses the a priori sigmas. More... | |
LinearAlgebra::Vector & | adjustedSigmas () |
Accesses the adjusted sigmas. More... | |
const BundleObservationSolveSettingsQsp | solveSettings () |
Accesses the solve settings. More... | |
bool | applyParameterCorrections (LinearAlgebra::Vector corrections) |
Applies the parameter corrections. More... | |
bool | initializeExteriorOrientation () |
Initializes the exterior orientation. More... | |
void | initializeBodyRotation () |
Intializes the body rotation. More... | |
void | updateBodyRotation () |
Updates the body rotation. More... | |
void | bundleOutputFetchData (QVector< double > &finalParameterValues, int &nPositionCoefficients, int &nPointingCoefficients, bool &useDefaultPosition, bool &useDefaultPointing, bool &useDefaultTwist) |
Fetches data for the log file output methods. More... | |
void | bundleOutputString (std::ostream &fpOut, bool errorPropagation) |
Takes in an open std::ofstream and writes out information which goes into the bundleout.txt file. More... | |
QString | bundleOutputCSV (bool errorPropagation) |
Creates and returns a formatted QString representing the bundle coefficients and parameters in csv format. More... | |
QString | formatBundleOutputString (bool errorPropagation, bool imageCSV=false) |
Creates and returns a formatted QString representing the bundle coefficients and parameters More... | |
QStringList | parameterList () |
Access to parameters for CorrelationMatrix to use. More... | |
QStringList | imageNames () |
Access to image names for CorrelationMatrix to use. More... | |
Private Member Functions | |
bool | initParameterWeights () |
Initializes the paramater weights for solving. More... | |
Private Attributes | |
QString | m_observationNumber |
This is typically equivalent to serial number except in the case of "observation mode" (e.g. More... | |
int | m_index |
Index of this observation. More... | |
QMap< QString, BundleImageQsp > | m_cubeSerialNumberToBundleImageMap |
Map between cube serial number and BundleImage pointers. More... | |
QStringList | m_serialNumbers |
List of all cube serial numbers in observation. More... | |
QStringList | m_parameterNamesList |
List of all cube parameters. More... | |
QStringList | m_imageNames |
List of all cube names. More... | |
QString | m_instrumentId |
Spacecraft instrument id. More... | |
BundleObservationSolveSettingsQsp | m_solveSettings |
Solve settings for this observation. More... | |
SpiceRotation * | m_instrumentRotation |
Instrument spice rotation (in primary image). More... | |
SpicePosition * | m_instrumentPosition |
Instrument spice position (in primary image). More... | |
BundleTargetBodyQsp | m_bundleTargetBody |
QShared pointer to BundleTargetBody. More... | |
LinearAlgebra::Vector | m_weights |
Parameter weights. Cumulative parameter correction vector. More... | |
LinearAlgebra::Vector | m_corrections |
LinearAlgebra::Vector | m_aprioriSigmas |
A posteriori (adjusted) parameter sigmas. More... | |
LinearAlgebra::Vector | m_adjustedSigmas |
A posteriori (adjusted) parameter sigmas. More... | |
Class for bundle observations.
This class is used for creating a bundle observation. Contained BundleImages are stored as shared pointers, so they will be automatically deleted when all shared pointers are deleted.
2014-07-09 Ken Edmundson - Original version.
2014-07-16 Jeannie Backer - Replaced QVectors with QLists.
2014-07-17 Kimberly Oyama - Added member variables and accessors for the images and parameters in this observation. They will be used for the correlation matrix.
2014-07-23 Jeannie Backer - Replaced QVectors with QLists.
2015-02-20 Jeannie Backer - Brought closer to Isis coding standards.
2016-08-03 Jesse Mapel - Changed contained member type to a QSharedPointer. Also changed m_solveSettings to a QSharedPointer. Fixes #4150.
2016-08-03 Ian Humphrey - Updated documentation and coding standards. Fixes #4078.
2016-08-10 Jeannie Backer - Replaced boost vector with Isis::LinearAlgebra::Vector. References #4163.
2016-08-15 Jesse Mapel - Added a map between cube serial number and contained bundle image. References #4159.
2016-08-23 Ian Humphrey - The applyParameterCorrections() method now throws the last exception. Fixes #4153.
2016-10-06 Tyler Wilson - Modified the function formatBundleOutputString so that it can be used by BundleSolutionInfo::outputCSVImages() function. Fixes #4314.
2016-10-26 Ian Humphrey - Modified formatBundleOutputString() to provided default values for all solve parameters, whether they are being solved for or not. Fixes #4464.
2016-10-27 Tyler Wilson - Modified formatBundleOutputString to change N/A to FREE in the output under POINTS DETAIL when no lat/lon sigmas were entered. Fixes #4317.
2016-11-14 Ken Edmundson - Modified the following... -changed adjustedSigma from 0.0 to N/A if error propagation is off when writing bundleout.txt OR images.csv. -changed sigma default from -1.0 to N/A for position and pointing parameters when writing images.csv.
2019-05-14 Tyler Wilson - Added the bundleOutputString(std::ofstream &fpOut, bool errorPropagation) function which is called by BundleSolutionInfo::outputText(). This function is a refactor of the formatBundleOutputString and uses the traditional C function sprintf instead of QString arg chaining because it's easier to make the output columns align nicely. Also, it maintains consistency with text output in BundleSolutionInfo.
2019-06-03 Tyler Wilson - Deleted the formatBundleOutputString and added the functions bundleOutputCSV/bundleOutputFetchData. Combined with bundleOutputString these three functions will fulfill the same functional role formerly occuped by formatBundleOutputString but with reduced code duplication.
2019-08-15 Adam Paquette - Readded the formatBundleOutputString function and added deprication warnings to formatBundleOutputString.
2019-09-10 Adam Paquette - Changed how bundleOutputString formats the text that is written to the bundleout.txt file.
Definition at line 98 of file BundleObservation.h.
Isis::BundleObservation::BundleObservation | ( | ) |
Constructs a BundleObservation initialized to a default state.
Definition at line 23 of file BundleObservation.cpp.
Isis::BundleObservation::BundleObservation | ( | BundleImageQsp | image, |
QString | observationNumber, | ||
QString | instrumentId, | ||
BundleTargetBodyQsp | bundleTargetBody | ||
) |
Constructs a BundleObservation from an BundleImage, an instrument id, an observation number to assign to this BundleObservation, 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 BundleObservation.cpp.
Isis::BundleObservation::BundleObservation | ( | const BundleObservation & | src | ) |
Creates a copy of another BundleObservation.
src | Reference to the BundleObservation to copy |
Definition at line 104 of file BundleObservation.cpp.
References m_cubeSerialNumberToBundleImageMap, m_index, m_instrumentId, m_instrumentPosition, m_instrumentRotation, m_observationNumber, m_serialNumbers, and m_solveSettings.
Isis::BundleObservation::~BundleObservation | ( | ) |
Destructor.
Contained BundleImages will remain until all shared pointers are deleted.
Definition at line 125 of file BundleObservation.cpp.
LinearAlgebra::Vector & Isis::BundleObservation::adjustedSigmas | ( | ) |
Accesses the adjusted sigmas.
Definition at line 312 of file BundleObservation.cpp.
void Isis::BundleObservation::append | ( | const BundleImageQsp & | value | ) |
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 165 of file BundleObservation.cpp.
bool Isis::BundleObservation::applyParameterCorrections | ( | LinearAlgebra::Vector | corrections | ) |
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 BundleObservation." |
Definition at line 619 of file BundleObservation.cpp.
References _FILEINFO_, Isis::SpicePosition::SetPolynomial(), and Isis::SpiceRotation::SetPolynomial().
LinearAlgebra::Vector & Isis::BundleObservation::aprioriSigmas | ( | ) |
Accesses the a priori sigmas.
Definition at line 302 of file BundleObservation.cpp.
QString Isis::BundleObservation::bundleOutputCSV | ( | bool | errorPropagation | ) |
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 |
Definition at line 1475 of file BundleObservation.cpp.
References Isis::IsSpecial(), Isis::RAD2DEG, and Isis::toString().
void Isis::BundleObservation::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 1153 of file BundleObservation.cpp.
void Isis::BundleObservation::bundleOutputString | ( | std::ostream & | fpOut, |
bool | errorPropagation | ||
) |
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. |
Definition at line 1251 of file BundleObservation.cpp.
References Isis::IsSpecial(), Isis::RAD2DEG, and Isis::toString().
QString Isis::BundleObservation::formatBundleOutputString | ( | bool | errorPropagation, |
bool | imageCSV = false |
||
) |
Creates and returns a formatted QString representing the bundle coefficients and parameters
The function formatBundleOutputString is depricated as of ISIS 3.9 and will be removed in ISIS 4.0
errorPropagation | Boolean indicating whether or not to attach more information (corrections, sigmas, adjusted sigmas...) to the output QString |
imageCSV | Boolean which is set to true if the function is being called from BundleSolutionInfo::outputImagesCSV(). It is set to false by default for backwards compatibility. |
Definition at line 805 of file BundleObservation.cpp.
References Isis::IsSpecial(), Isis::RAD2DEG, and Isis::toString().
BundleImageQsp Isis::BundleObservation::imageByCubeSerialNumber | ( | QString | cubeSerialNumber | ) |
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 181 of file BundleObservation.cpp.
QStringList Isis::BundleObservation::imageNames | ( | ) |
Access to image names for CorrelationMatrix to use.
Definition at line 1586 of file BundleObservation.cpp.
int Isis::BundleObservation::index | ( | ) |
Accesses the observation's index.
Definition at line 782 of file BundleObservation.cpp.
void Isis::BundleObservation::initializeBodyRotation | ( | ) |
Intializes the body rotation.
Definition at line 421 of file BundleObservation.cpp.
bool Isis::BundleObservation::initializeExteriorOrientation | ( | ) |
Initializes the exterior orientation.
Definition at line 336 of file BundleObservation.cpp.
References Isis::SpiceRotation::GetBaseTime(), Isis::SpiceRotation::GetPolynomial(), Isis::SpiceRotation::GetTimeScale(), Isis::SpicePosition::SetOverrideBaseTime(), Isis::SpiceRotation::SetOverrideBaseTime(), Isis::SpicePosition::SetPolynomial(), Isis::SpiceRotation::SetPolynomial(), Isis::SpicePosition::SetPolynomialDegree(), and Isis::SpiceRotation::SetPolynomialDegree().
|
private |
Initializes the paramater weights for solving.
Definition at line 513 of file BundleObservation.cpp.
References Isis::DEG2RAD.
QString Isis::BundleObservation::instrumentId | ( | ) |
Accesses the instrument id.
Definition at line 243 of file BundleObservation.cpp.
int Isis::BundleObservation::numberParameters | ( | ) |
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
Definition at line 762 of file BundleObservation.cpp.
int Isis::BundleObservation::numberPointingParameters | ( | ) |
Returns the number of pointing parameters being solved for.
Definition at line 744 of file BundleObservation.cpp.
int Isis::BundleObservation::numberPositionParameters | ( | ) |
Returns the number of position parameters there are.
Definition at line 734 of file BundleObservation.cpp.
BundleObservation & Isis::BundleObservation::operator= | ( | const BundleObservation & | src | ) |
Assignment operator.
Assigns the state of the source BundleObservation to this BundleObservation
BundleObservation | Reference to the source BundleObservation to assign from |
Definition at line 139 of file BundleObservation.cpp.
References m_cubeSerialNumberToBundleImageMap, m_instrumentId, m_instrumentPosition, m_instrumentRotation, m_observationNumber, m_serialNumbers, and m_solveSettings.
LinearAlgebra::Vector & Isis::BundleObservation::parameterCorrections | ( | ) |
Accesses the parameter corrections.
Definition at line 283 of file BundleObservation.cpp.
QStringList Isis::BundleObservation::parameterList | ( | ) |
Access to parameters for CorrelationMatrix to use.
Definition at line 1576 of file BundleObservation.cpp.
LinearAlgebra::Vector & Isis::BundleObservation::parameterWeights | ( | ) |
Accesses the solve parameter weights.
Definition at line 273 of file BundleObservation.cpp.
void Isis::BundleObservation::setIndex | ( | int | n | ) |
Sets the index for the observation.
n | Value to set the index of the observation to |
Definition at line 772 of file BundleObservation.cpp.
bool Isis::BundleObservation::setSolveSettings | ( | BundleObservationSolveSettings | solveSettings | ) |
Set solve parameters.
solveSettings | The solve settings to use |
Definition at line 203 of file BundleObservation.cpp.
References Isis::Null.
const BundleObservationSolveSettingsQsp Isis::BundleObservation::solveSettings | ( | ) |
Accesses the solve settings.
Definition at line 323 of file BundleObservation.cpp.
SpicePosition * Isis::BundleObservation::spicePosition | ( | ) |
Accesses the instrument's spice position.
Definition at line 263 of file BundleObservation.cpp.
SpiceRotation * Isis::BundleObservation::spiceRotation | ( | ) |
Accesses the instrument's spice rotation.
Definition at line 253 of file BundleObservation.cpp.
void Isis::BundleObservation::updateBodyRotation | ( | ) |
Updates the body rotation.
Definition at line 439 of file BundleObservation.cpp.
|
private |
A posteriori (adjusted) parameter sigmas.
Definition at line 198 of file BundleObservation.h.
|
private |
A posteriori (adjusted) parameter sigmas.
Definition at line 196 of file BundleObservation.h.
|
private |
QShared pointer to BundleTargetBody.
Definition at line 188 of file BundleObservation.h.
|
private |
Map between cube serial number and BundleImage pointers.
Definition at line 174 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
List of all cube names.
Definition at line 178 of file BundleObservation.h.
|
private |
Index of this observation.
Definition at line 171 of file BundleObservation.h.
Referenced by BundleObservation().
|
private |
Spacecraft instrument id.
Definition at line 180 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
Instrument spice position (in primary image).
Definition at line 185 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
Instrument spice rotation (in primary image).
Definition at line 184 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
This is typically equivalent to serial number except in the case of "observation mode" (e.g.
Lunar Orbiter) where for each image in the observation, the observation number is the serial number augmented with an additional integer.
Definition at line 165 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
List of all cube parameters.
Definition at line 177 of file BundleObservation.h.
|
private |
List of all cube serial numbers in observation.
Definition at line 176 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
Solve settings for this observation.
Definition at line 182 of file BundleObservation.h.
Referenced by BundleObservation(), and operator=().
|
private |
Parameter weights. Cumulative parameter correction vector.
Definition at line 191 of file BundleObservation.h.