Unverified Commit 70ba38d3 authored by ihumphrey's avatar ihumphrey Committed by GitHub
Browse files

Merge pull request #300 from chrisryancombs/ipceBundleWindow_run

Changed IPCE JigsawRunWidget design according to new mockup
parents cb534d2e edf6161d
Loading
Loading
Loading
Loading
+24 −9
Original line number Diff line number Diff line
@@ -360,7 +360,7 @@ namespace Isis {
   *   @todo answer comments with questions, TODO, ???, and !!!
   */
  void BundleAdjust::init(Progress *progress) {

    emit(statusUpdate("Initialization"));
    m_previousNumberImagePartials = 0;

    // initialize
@@ -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
@@ -766,7 +767,7 @@ namespace Isis {

      for (;;) {

        emit iterationUpdate(m_iteration, m_bundleResults.sigma0());
        emit iterationUpdate(m_iteration);

        // testing
        if (m_abort) {
@@ -870,7 +871,7 @@ namespace Isis {
                                  .arg(m_bundleResults.numberUnknownParameters()));
        emit statusUpdate(QString("Degrees of Freedom: %1")
                                  .arg(m_bundleResults.degreesOfFreedom()));
        emit iterationUpdate(m_iteration, m_bundleResults.sigma0());
        emit iterationUpdate(m_iteration);

        // check for convergence
        if (m_bundleSettings->convergenceCriteria() == BundleSettings::Sigma0) {
@@ -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;
            }
          }
@@ -915,6 +917,7 @@ namespace Isis {
          if ( numConvergedParams == numImgParams ) {
            m_bundleResults.setConverged(true);
            emit statusUpdate("Bundle has converged");
            emit statusBarUpdate("Converged");
            break;
          }
        }
@@ -931,6 +934,7 @@ namespace Isis {

        // check for maximum iterations
        if (m_iteration >= m_bundleSettings->convergenceCriteriaMaximumIterations()) {
          emit(statusBarUpdate("Max Iterations Reached"));
          break;
        }

@@ -986,6 +990,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_);
@@ -1020,6 +1025,7 @@ namespace Isis {
   * @see BundleAdjust::formWeightedNormals
   */
  bool BundleAdjust::formNormalEquations() {
    emit(statusBarUpdate("Forming Normal Equations"));
    bool status = false;

    m_bundleResults.setNumberObservations(0);// ???
@@ -1065,7 +1071,7 @@ namespace Isis {
    printf("\n");

    for (int i = 0; i < num3DPoints; i++) {

      emit(pointUpdate(i+1));
      BundleControlPointQsp point = m_bundleControlPoints.at(i);

      if (point->isRejected()) {
@@ -2122,7 +2128,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
@@ -2257,6 +2263,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;
@@ -2640,7 +2647,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);
@@ -2786,7 +2793,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;
@@ -2796,8 +2803,6 @@ namespace Isis {
        if (j%100 == 0) {
            printf("\rError Propagation: Inverse Block %8d of %8d; Point %8d of %8d", i+1,
                   numBlockColumns,  j+1, numObjectPoints);

            emit iterationUpdate(i+1, j+1);
        }

        // get corresponding Q matrix
@@ -3086,6 +3091,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.
   *
+6 −1
Original line number Diff line number Diff line
@@ -285,6 +285,8 @@ namespace Isis {
   *   @history 2017-08-09 Summer Stapleton - Added a try/catch around the m_controlNet assignment
   *                           in each of the constructors to verify valid control net input.
   *                           Fixes #5068.
   *   @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.
   */
  class BundleAdjust : public QObject {
      Q_OBJECT
@@ -317,6 +319,7 @@ namespace Isis {
      BundleSolutionInfo    solveCholeskyBR();

      QList<ImageList *> imageLists();
      bool isAborted();

    public slots:
      bool solveCholesky();
@@ -338,7 +341,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();

+3 −3
Original line number Diff line number Diff line
@@ -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;
@@ -271,7 +271,7 @@ namespace Isis {
      m_outlierRejectionMultiplier = multiplier;
    }
    else {
      m_outlierRejectionMultiplier = 1.0;
      m_outlierRejectionMultiplier = 3.0;
    }
  }

@@ -1165,7 +1165,7 @@ namespace Isis {
                = toDouble(outlierRejectionMultiplierStr);
          }
          else {
            m_xmlHandlerBundleSettings->m_outlierRejectionMultiplier = 1.0;
            m_xmlHandlerBundleSettings->m_outlierRejectionMultiplier = 3.0;
          }
        }
      }
+55 −56
Original line number Diff line number Diff line
@@ -360,10 +360,9 @@ namespace Isis {
    if (modelName.compare("HUBER", Qt::CaseInsensitive) == 0) {
      return Huber;
    }
    else if (modelName.compare("HUBER_MODIFIED", Qt::CaseInsensitive) == 0) {
      return HuberModified;
    }
    else if (modelName.compare("HUBERMODIFIED", Qt::CaseInsensitive) == 0) {
    else if (modelName.compare("HUBER_MODIFIED", Qt::CaseInsensitive) == 0 ||
             modelName.compare("HUBERMODIFIED", Qt::CaseInsensitive) == 0 ||
             modelName.compare("HUBER MODIFIED", Qt::CaseInsensitive) == 0) {
      return HuberModified;
    }
    else if (modelName.compare("WELSCH", Qt::CaseInsensitive) == 0) {
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ namespace Isis {
   *                           methods.
   *   @history 2014-09-19 Jeannie Backer - Removed bugs. Added documentation. Cleaned
   *                           duplicate code.
   *   @history 2018-06-29 Christopher Combs - Added extra HuberModified case to stringToModel(). 
   *                           Fixes #5446.
   */
  class MaximumLikelihoodWFunctions {
  public:
Loading