Loading isis/src/control/objs/BundleAdjust/BundleAdjust.cpp +24 −8 Original line number Diff line number Diff line Loading @@ -359,7 +359,7 @@ namespace Isis { * @todo answer comments with questions, TODO, ???, and !!! */ void BundleAdjust::init(Progress *progress) { emit(statusUpdate("Initialization")); m_previousNumberImagePartials = 0; // initialize Loading Loading @@ -710,6 +710,7 @@ namespace Isis { * mode. Fixes #4483. */ bool BundleAdjust::solveCholesky() { emit(statusBarUpdate("Solving")); try { // throw error if a frame camera is included AND Loading Loading @@ -766,7 +767,7 @@ namespace Isis { for (;;) { emit iterationUpdate(m_iteration, m_bundleResults.sigma0()); emit iterationUpdate(m_iteration); // testing if (m_abort) { Loading Loading @@ -870,7 +871,7 @@ namespace Isis { .arg(m_bundleResults.numberUnknownParameters())); emit statusUpdate(QString("Degrees of Freedom: %1 \n") .arg(m_bundleResults.degreesOfFreedom())); emit iterationUpdate(m_iteration, m_bundleResults.sigma0()); emit iterationUpdate(m_iteration); // check for convergence if (m_bundleSettings->convergenceCriteria() == BundleSettings::Sigma0) { Loading @@ -896,6 +897,7 @@ namespace Isis { else { // otherwise iterations are complete m_bundleResults.setConverged(true); emit statusUpdate("Bundle has converged\n"); emit statusBarUpdate("Converged"); break; } } Loading @@ -915,6 +917,7 @@ namespace Isis { if ( numConvergedParams == numImgParams ) { m_bundleResults.setConverged(true); emit statusUpdate("Bundle has converged\n"); emit statusBarUpdate("Converged"); break; } } Loading @@ -931,6 +934,7 @@ namespace Isis { // check for maximum iterations if (m_iteration >= m_bundleSettings->convergenceCriteriaMaximumIterations()) { emit(statusBarUpdate("Max Iterations Reached")); break; } Loading Loading @@ -987,6 +991,7 @@ namespace Isis { catch (IException &e) { m_bundleResults.setConverged(false); emit statusUpdate("\n aborting..."); emit statusBarUpdate("Failed to Converge"); emit finished(); QString msg = "Could not solve bundle adjust."; throw IException(e, e.errorType(), msg, _FILEINFO_); Loading Loading @@ -1027,6 +1032,7 @@ namespace Isis { * @see BundleAdjust::formWeightedNormals */ bool BundleAdjust::formNormalEquations() { emit(statusBarUpdate("Forming Normal Equations")); bool status = false; m_bundleResults.setNumberObservations(0);// ??? Loading Loading @@ -1072,7 +1078,7 @@ namespace Isis { outputBundleStatus("\n\n"); for (int i = 0; i < num3DPoints; i++) { emit(pointUpdate(i+1)); BundleControlPointQsp point = m_bundleControlPoints.at(i); if (point->isRejected()) { Loading Loading @@ -2137,7 +2143,7 @@ namespace Isis { * apply parameter corrections for solution. */ void BundleAdjust::applyParameterCorrections() { emit(statusBarUpdate("Updating Parameters")); int t = 0; // TODO - update target body parameters if in solution Loading Loading @@ -2272,6 +2278,7 @@ namespace Isis { * image sample and line residuals. */ double BundleAdjust::computeResiduals() { emit(statusBarUpdate("Computing Residuals")); double vtpv = 0.0; double vtpvControl = 0.0; double vtpvImage = 0.0; Loading Loading @@ -2680,7 +2687,7 @@ namespace Isis { * Blocking and Filling point covariance messages. References #4463. */ bool BundleAdjust::errorPropagation() { emit(statusBarUpdate("Error Propagation")); // free unneeded memory cholmod_free_triplet(&m_cholmodTriplet, &m_cholmodCommon); cholmod_free_sparse(&m_cholmodNormal, &m_cholmodCommon); Loading Loading @@ -2830,7 +2837,7 @@ namespace Isis { // now loop over all object points to sum contributions into 3x3 point covariance matrix int pointIndex = 0; for (j = 0; j < numObjectPoints; j++) { emit(pointUpdate(j+1)); BundleControlPointQsp point = m_bundleControlPoints.at(pointIndex); if ( point->isRejected() ) { continue; Loading @@ -2847,7 +2854,6 @@ namespace Isis { status.append(" of "); status.append(QString::number(numObjectPoints)); outputBundleStatus(status); emit iterationUpdate(i+1, j+1); } // get corresponding Q matrix Loading Loading @@ -3144,6 +3150,16 @@ namespace Isis { } /** * Returns if the BundleAdjust has been aborted. * * @return @b bool If the BundleAdjust was aborted. */ bool BundleAdjust::isAborted() { return m_abort; } /** * Returns the iteration summary string. * Loading isis/src/control/objs/BundleAdjust/BundleAdjust.h +6 −1 Original line number Diff line number Diff line Loading @@ -292,6 +292,8 @@ namespace Isis { * constructor in the BundleSolutionInfo class because it is derived * from QObject. Note that we ultimately want to return a QSharedPointer * instead of a raw pointer. * @history 2018-06-14 Christopher Combs - Added getter method to tell if a bundle adjust was * aborted. Added emits for status updates to the run widget. * @history 2018-06-18 Makayla Shepherd - Stopped command line output for ipce BundleAdjust. * Fixes #4171. */ Loading Loading @@ -326,6 +328,7 @@ namespace Isis { BundleSolutionInfo* solveCholeskyBR(); QList<ImageList *> imageLists(); bool isAborted(); public slots: bool solveCholesky(); Loading @@ -347,7 +350,9 @@ namespace Isis { signals: void statusUpdate(QString); void error(QString); void iterationUpdate(int, double); void iterationUpdate(int); void pointUpdate(int); void statusBarUpdate(QString); void resultsReady(BundleSolutionInfo *bundleSolveInformation); void finished(); Loading isis/src/control/objs/BundleSettings/BundleSettings.cpp +20 −6 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ namespace Isis { m_createInverseMatrix = false; m_outlierRejection = false; m_outlierRejectionMultiplier = 1.0; m_outlierRejectionMultiplier = 3.0; // Parameter Uncertainties (Weighting) m_globalLatitudeAprioriSigma = Isis::Null; Loading Loading @@ -271,7 +271,7 @@ namespace Isis { m_outlierRejectionMultiplier = multiplier; } else { m_outlierRejectionMultiplier = 1.0; m_outlierRejectionMultiplier = 3.0; } } Loading Loading @@ -450,14 +450,17 @@ namespace Isis { BundleObservationSolveSettings BundleSettings::observationSolveSettings(QString observationNumber) const { BundleObservationSolveSettings defaultSolveSettings; for (int i = 0; i < numberSolveSettings(); i++) { if (m_observationSolveSettings[i].observationNumbers().contains(observationNumber)) { return m_observationSolveSettings[i]; } } QString msg = "Unable to find BundleObservationSolveSettings for observation number [" + observationNumber + "]."; throw IException(IException::Unknown, msg, _FILEINFO_); return defaultSolveSettings; //QString msg = "Unable to find BundleObservationSolveSettings for observation number [" // + observationNumber + "]."; // throw IException(IException::Unknown, msg, _FILEINFO_); } Loading @@ -484,6 +487,17 @@ namespace Isis { } /** * Retrieves solve settings for the observation corresponding to the given index. * * @return QList<BundleObservationSolveSettings> The QList of BundleObservationSolveSettings * objects */ QList<BundleObservationSolveSettings> BundleSettings::observationSolveSettings() const { return m_observationSolveSettings; } // =============================================================================================// // ======================== Convergence Criteria ===============================================// // =============================================================================================// Loading Loading @@ -1154,7 +1168,7 @@ namespace Isis { = toDouble(outlierRejectionMultiplierStr); } else { m_xmlHandlerBundleSettings->m_outlierRejectionMultiplier = 1.0; m_xmlHandlerBundleSettings->m_outlierRejectionMultiplier = 3.0; } } } Loading isis/src/control/objs/BundleSettings/BundleSettings.h +3 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ namespace Isis { * is for creating and displaying the correlation matrix, which is * currently not working. * 2) commented out hdf5 header includes in cpp * @history 2018-06-28 Christopher Combs - Added observationSolveSettings() method to retrieve * m_observationSolveSettings. Fixes #497. * * @todo Determine which XmlStackedHandlerReader constructor is preferred * @todo Determine which XmlStackedHandler needs a Project pointer (see constructors) Loading Loading @@ -175,6 +177,7 @@ namespace Isis { int numberSolveSettings() const; BundleObservationSolveSettings observationSolveSettings(QString instrumentId) const; BundleObservationSolveSettings observationSolveSettings(int n) const; QList<BundleObservationSolveSettings> observationSolveSettings() const; //=====================================================================// Loading isis/src/control/objs/BundleUtilities/BundleObservationSolveSettings.cpp +33 −4 Original line number Diff line number Diff line Loading @@ -259,6 +259,19 @@ namespace Isis { } /** * Removes an observation number from this solve settings. The observation is no longer * associated with this solve settings. * * @param QString observationNumber The observation number to remove from this solve settings. * @return bool Returns true if the observation number passed was actually removed; otherwise * returns false. */ bool BundleObservationSolveSettings::removeObservationNumber(QString observationNumber) { return m_observationNumbers.remove(observationNumber); } /** * Returns a list of observation numbers associated with these solve settings. * Loading Loading @@ -368,7 +381,7 @@ namespace Isis { bool solvePolynomialOverExisting, double anglesAprioriSigma, double angularVelocityAprioriSigma, double angularAccelerationAprioriSigma) { double angularAccelerationAprioriSigma,QList<double> * additionalPointingSigmas) { // automatically set the solve option and ck degree to the user entered values m_instrumentPointingSolveOption = option; Loading Loading @@ -421,6 +434,16 @@ namespace Isis { } } if (additionalPointingSigmas) { for (int i=0;i < additionalPointingSigmas->count();i++) { m_anglesAprioriSigma.append(additionalPointingSigmas->value(i)); } } m_solveTwist = solveTwist; // dependent on solve option??? // Set the SpiceRotation interpolation type enum appropriately Loading Loading @@ -609,14 +632,14 @@ namespace Isis { * @param velocityAprioriSigma A priori velocity sigma * @param accelerationAprioriSigma A priori acceleration sigma */ void BundleObservationSolveSettings::setInstrumentPositionSettings( InstrumentPositionSolveOption option, void BundleObservationSolveSettings::setInstrumentPositionSettings(InstrumentPositionSolveOption option, int spkDegree, int spkSolveDegree, bool positionOverHermite, double positionAprioriSigma, double velocityAprioriSigma, double accelerationAprioriSigma) { double accelerationAprioriSigma, QList<double> *additionalPositionSigmas) { // automatically set the solve option and spk degree to the user entered values m_instrumentPositionSolveOption = option; Loading Loading @@ -667,6 +690,12 @@ namespace Isis { } } if (additionalPositionSigmas) { for (int i=0;i < additionalPositionSigmas->count();i++) { m_positionAprioriSigma.append(additionalPositionSigmas->value(i)); } } // Set the SpicePosition interpolation type enum appropriately m_solvePositionOverHermiteSpline = positionOverHermite; if (m_solvePositionOverHermiteSpline) { Loading Loading
isis/src/control/objs/BundleAdjust/BundleAdjust.cpp +24 −8 Original line number Diff line number Diff line Loading @@ -359,7 +359,7 @@ namespace Isis { * @todo answer comments with questions, TODO, ???, and !!! */ void BundleAdjust::init(Progress *progress) { emit(statusUpdate("Initialization")); m_previousNumberImagePartials = 0; // initialize Loading Loading @@ -710,6 +710,7 @@ namespace Isis { * mode. Fixes #4483. */ bool BundleAdjust::solveCholesky() { emit(statusBarUpdate("Solving")); try { // throw error if a frame camera is included AND Loading Loading @@ -766,7 +767,7 @@ namespace Isis { for (;;) { emit iterationUpdate(m_iteration, m_bundleResults.sigma0()); emit iterationUpdate(m_iteration); // testing if (m_abort) { Loading Loading @@ -870,7 +871,7 @@ namespace Isis { .arg(m_bundleResults.numberUnknownParameters())); emit statusUpdate(QString("Degrees of Freedom: %1 \n") .arg(m_bundleResults.degreesOfFreedom())); emit iterationUpdate(m_iteration, m_bundleResults.sigma0()); emit iterationUpdate(m_iteration); // check for convergence if (m_bundleSettings->convergenceCriteria() == BundleSettings::Sigma0) { Loading @@ -896,6 +897,7 @@ namespace Isis { else { // otherwise iterations are complete m_bundleResults.setConverged(true); emit statusUpdate("Bundle has converged\n"); emit statusBarUpdate("Converged"); break; } } Loading @@ -915,6 +917,7 @@ namespace Isis { if ( numConvergedParams == numImgParams ) { m_bundleResults.setConverged(true); emit statusUpdate("Bundle has converged\n"); emit statusBarUpdate("Converged"); break; } } Loading @@ -931,6 +934,7 @@ namespace Isis { // check for maximum iterations if (m_iteration >= m_bundleSettings->convergenceCriteriaMaximumIterations()) { emit(statusBarUpdate("Max Iterations Reached")); break; } Loading Loading @@ -987,6 +991,7 @@ namespace Isis { catch (IException &e) { m_bundleResults.setConverged(false); emit statusUpdate("\n aborting..."); emit statusBarUpdate("Failed to Converge"); emit finished(); QString msg = "Could not solve bundle adjust."; throw IException(e, e.errorType(), msg, _FILEINFO_); Loading Loading @@ -1027,6 +1032,7 @@ namespace Isis { * @see BundleAdjust::formWeightedNormals */ bool BundleAdjust::formNormalEquations() { emit(statusBarUpdate("Forming Normal Equations")); bool status = false; m_bundleResults.setNumberObservations(0);// ??? Loading Loading @@ -1072,7 +1078,7 @@ namespace Isis { outputBundleStatus("\n\n"); for (int i = 0; i < num3DPoints; i++) { emit(pointUpdate(i+1)); BundleControlPointQsp point = m_bundleControlPoints.at(i); if (point->isRejected()) { Loading Loading @@ -2137,7 +2143,7 @@ namespace Isis { * apply parameter corrections for solution. */ void BundleAdjust::applyParameterCorrections() { emit(statusBarUpdate("Updating Parameters")); int t = 0; // TODO - update target body parameters if in solution Loading Loading @@ -2272,6 +2278,7 @@ namespace Isis { * image sample and line residuals. */ double BundleAdjust::computeResiduals() { emit(statusBarUpdate("Computing Residuals")); double vtpv = 0.0; double vtpvControl = 0.0; double vtpvImage = 0.0; Loading Loading @@ -2680,7 +2687,7 @@ namespace Isis { * Blocking and Filling point covariance messages. References #4463. */ bool BundleAdjust::errorPropagation() { emit(statusBarUpdate("Error Propagation")); // free unneeded memory cholmod_free_triplet(&m_cholmodTriplet, &m_cholmodCommon); cholmod_free_sparse(&m_cholmodNormal, &m_cholmodCommon); Loading Loading @@ -2830,7 +2837,7 @@ namespace Isis { // now loop over all object points to sum contributions into 3x3 point covariance matrix int pointIndex = 0; for (j = 0; j < numObjectPoints; j++) { emit(pointUpdate(j+1)); BundleControlPointQsp point = m_bundleControlPoints.at(pointIndex); if ( point->isRejected() ) { continue; Loading @@ -2847,7 +2854,6 @@ namespace Isis { status.append(" of "); status.append(QString::number(numObjectPoints)); outputBundleStatus(status); emit iterationUpdate(i+1, j+1); } // get corresponding Q matrix Loading Loading @@ -3144,6 +3150,16 @@ namespace Isis { } /** * Returns if the BundleAdjust has been aborted. * * @return @b bool If the BundleAdjust was aborted. */ bool BundleAdjust::isAborted() { return m_abort; } /** * Returns the iteration summary string. * Loading
isis/src/control/objs/BundleAdjust/BundleAdjust.h +6 −1 Original line number Diff line number Diff line Loading @@ -292,6 +292,8 @@ namespace Isis { * constructor in the BundleSolutionInfo class because it is derived * from QObject. Note that we ultimately want to return a QSharedPointer * instead of a raw pointer. * @history 2018-06-14 Christopher Combs - Added getter method to tell if a bundle adjust was * aborted. Added emits for status updates to the run widget. * @history 2018-06-18 Makayla Shepherd - Stopped command line output for ipce BundleAdjust. * Fixes #4171. */ Loading Loading @@ -326,6 +328,7 @@ namespace Isis { BundleSolutionInfo* solveCholeskyBR(); QList<ImageList *> imageLists(); bool isAborted(); public slots: bool solveCholesky(); Loading @@ -347,7 +350,9 @@ namespace Isis { signals: void statusUpdate(QString); void error(QString); void iterationUpdate(int, double); void iterationUpdate(int); void pointUpdate(int); void statusBarUpdate(QString); void resultsReady(BundleSolutionInfo *bundleSolveInformation); void finished(); Loading
isis/src/control/objs/BundleSettings/BundleSettings.cpp +20 −6 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ namespace Isis { m_createInverseMatrix = false; m_outlierRejection = false; m_outlierRejectionMultiplier = 1.0; m_outlierRejectionMultiplier = 3.0; // Parameter Uncertainties (Weighting) m_globalLatitudeAprioriSigma = Isis::Null; Loading Loading @@ -271,7 +271,7 @@ namespace Isis { m_outlierRejectionMultiplier = multiplier; } else { m_outlierRejectionMultiplier = 1.0; m_outlierRejectionMultiplier = 3.0; } } Loading Loading @@ -450,14 +450,17 @@ namespace Isis { BundleObservationSolveSettings BundleSettings::observationSolveSettings(QString observationNumber) const { BundleObservationSolveSettings defaultSolveSettings; for (int i = 0; i < numberSolveSettings(); i++) { if (m_observationSolveSettings[i].observationNumbers().contains(observationNumber)) { return m_observationSolveSettings[i]; } } QString msg = "Unable to find BundleObservationSolveSettings for observation number [" + observationNumber + "]."; throw IException(IException::Unknown, msg, _FILEINFO_); return defaultSolveSettings; //QString msg = "Unable to find BundleObservationSolveSettings for observation number [" // + observationNumber + "]."; // throw IException(IException::Unknown, msg, _FILEINFO_); } Loading @@ -484,6 +487,17 @@ namespace Isis { } /** * Retrieves solve settings for the observation corresponding to the given index. * * @return QList<BundleObservationSolveSettings> The QList of BundleObservationSolveSettings * objects */ QList<BundleObservationSolveSettings> BundleSettings::observationSolveSettings() const { return m_observationSolveSettings; } // =============================================================================================// // ======================== Convergence Criteria ===============================================// // =============================================================================================// Loading Loading @@ -1154,7 +1168,7 @@ namespace Isis { = toDouble(outlierRejectionMultiplierStr); } else { m_xmlHandlerBundleSettings->m_outlierRejectionMultiplier = 1.0; m_xmlHandlerBundleSettings->m_outlierRejectionMultiplier = 3.0; } } } Loading
isis/src/control/objs/BundleSettings/BundleSettings.h +3 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ namespace Isis { * is for creating and displaying the correlation matrix, which is * currently not working. * 2) commented out hdf5 header includes in cpp * @history 2018-06-28 Christopher Combs - Added observationSolveSettings() method to retrieve * m_observationSolveSettings. Fixes #497. * * @todo Determine which XmlStackedHandlerReader constructor is preferred * @todo Determine which XmlStackedHandler needs a Project pointer (see constructors) Loading Loading @@ -175,6 +177,7 @@ namespace Isis { int numberSolveSettings() const; BundleObservationSolveSettings observationSolveSettings(QString instrumentId) const; BundleObservationSolveSettings observationSolveSettings(int n) const; QList<BundleObservationSolveSettings> observationSolveSettings() const; //=====================================================================// Loading
isis/src/control/objs/BundleUtilities/BundleObservationSolveSettings.cpp +33 −4 Original line number Diff line number Diff line Loading @@ -259,6 +259,19 @@ namespace Isis { } /** * Removes an observation number from this solve settings. The observation is no longer * associated with this solve settings. * * @param QString observationNumber The observation number to remove from this solve settings. * @return bool Returns true if the observation number passed was actually removed; otherwise * returns false. */ bool BundleObservationSolveSettings::removeObservationNumber(QString observationNumber) { return m_observationNumbers.remove(observationNumber); } /** * Returns a list of observation numbers associated with these solve settings. * Loading Loading @@ -368,7 +381,7 @@ namespace Isis { bool solvePolynomialOverExisting, double anglesAprioriSigma, double angularVelocityAprioriSigma, double angularAccelerationAprioriSigma) { double angularAccelerationAprioriSigma,QList<double> * additionalPointingSigmas) { // automatically set the solve option and ck degree to the user entered values m_instrumentPointingSolveOption = option; Loading Loading @@ -421,6 +434,16 @@ namespace Isis { } } if (additionalPointingSigmas) { for (int i=0;i < additionalPointingSigmas->count();i++) { m_anglesAprioriSigma.append(additionalPointingSigmas->value(i)); } } m_solveTwist = solveTwist; // dependent on solve option??? // Set the SpiceRotation interpolation type enum appropriately Loading Loading @@ -609,14 +632,14 @@ namespace Isis { * @param velocityAprioriSigma A priori velocity sigma * @param accelerationAprioriSigma A priori acceleration sigma */ void BundleObservationSolveSettings::setInstrumentPositionSettings( InstrumentPositionSolveOption option, void BundleObservationSolveSettings::setInstrumentPositionSettings(InstrumentPositionSolveOption option, int spkDegree, int spkSolveDegree, bool positionOverHermite, double positionAprioriSigma, double velocityAprioriSigma, double accelerationAprioriSigma) { double accelerationAprioriSigma, QList<double> *additionalPositionSigmas) { // automatically set the solve option and spk degree to the user entered values m_instrumentPositionSolveOption = option; Loading Loading @@ -667,6 +690,12 @@ namespace Isis { } } if (additionalPositionSigmas) { for (int i=0;i < additionalPositionSigmas->count();i++) { m_positionAprioriSigma.append(additionalPositionSigmas->value(i)); } } // Set the SpicePosition interpolation type enum appropriately m_solvePositionOverHermiteSpline = positionOverHermite; if (m_solvePositionOverHermiteSpline) { Loading