Unverified Commit 7b7bd141 authored by Tracie Sucharski's avatar Tracie Sucharski Committed by GitHub
Browse files

Merge pull request #2 from TracieSucharski/ipce

Ipce merged into dev
parents 61703d0d 612055f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ object_script.*.Debug
*_plugin_import.cpp
*.moc
ui_*.h
*.html

# ignore all files created by squish coco
*csmes
+0 −28
Original line number Diff line number Diff line
@@ -356,31 +356,3 @@ End_Object
End
0 0 0 20 20 20 39 39 39 0 20 39 0 20 39 0 20 39 
**PROGRAMMER ERROR** Cannot write to the cube [isisTruth_external2.ecub] because it is opened read-only.

Test reading an ecub that points to detached lbl
Object = IsisCube
  Object = Core
    ^DnFile = IsisCube_02.lbl
  End_Object
End_Object

Object = Label
  Bytes = 65536
End_Object
End
0 0 0 1 1 1 2 2 2 N N N N N N N N N 
**ERROR** The cube [isisTruth_external3.ecub] does not support storing DN data because it is using an external file for DNs.

Test copying an ecub that points to detached lbl
Object = IsisCube
  Object = Core
    ^DnFile = isisTruth_external3.ecub
  End_Object
End_Object

Object = Label
  Bytes = 65536
End_Object
End
0 0 0 1 1 1 2 2 2 N N N N N N N N N 
**ERROR** The cube [isisTruth_external3.copy.ecub] does not support storing DN data because it is using an external file for DNs.
+61 −61
Original line number Diff line number Diff line
@@ -886,67 +886,67 @@ int main(int argc, char *argv[]) {
    }
  }

  cerr << endl << "Test reading an ecub that points to detached lbl" << endl;
  {
    Cube externalData;
    externalData.setExternalDnData("IsisCube_02.lbl");
    externalData.create("isisTruth_external3.ecub");
    cerr << *externalData.label() << endl;

    Brick readBrick(3, 3, 2, externalData.pixelType());
    readBrick.SetBasePosition(1, 1, 1);
    externalData.read(readBrick);
    for (int index = 0; index < readBrick.size(); index++) {
      if (readBrick[index] == Null) {
        cerr << "N ";
      }
      else {
        cerr << readBrick[index] << " ";
      }
    }
    cerr << endl;

    try {
      externalData.write(readBrick);
    }
    catch (IException &e) {
      e.print();
    }
  }

  cerr << endl << "Test copying an ecub that points to detached lbl" << endl;
  {
    Cube externalData;
    externalData.open("isisTruth_external3.ecub");
    Cube *copiedCube = externalData.copy("isisTruth_external3.copy.ecub",
                                         CubeAttributeOutput("+External"));
    cerr << *copiedCube->label() << endl;

    Brick readBrick(3, 3, 2, copiedCube->pixelType());
    readBrick.SetBasePosition(1, 1, 1);
    copiedCube->read(readBrick);
    for (int index = 0; index < readBrick.size(); index++) {
      if (readBrick[index] == Null) {
        cerr << "N ";
      }
      else {
        cerr << readBrick[index] << " ";
      }
    }
    cerr << endl;

    try {
      copiedCube->write(readBrick);
    }
    catch (IException &e) {
      e.print();
    }
    // need to deallocate our copied cube
    copiedCube->close();
    delete copiedCube;
    copiedCube = NULL;
    
  }
//cerr << endl << "Test reading an ecub that points to detached lbl" << endl;
//{
//  Cube externalData;
//  externalData.setExternalDnData("IsisCube_02.lbl");
//  externalData.create("isisTruth_external3.ecub");
//  cerr << *externalData.label() << endl;
//
//  Brick readBrick(3, 3, 2, externalData.pixelType());
//  readBrick.SetBasePosition(1, 1, 1);
//  externalData.read(readBrick);
//  for (int index = 0; index < readBrick.size(); index++) {
//    if (readBrick[index] == Null) {
//      cerr << "N ";
//    }
//    else {
//      cerr << readBrick[index] << " ";
//    }
//  }
//  cerr << endl;
//
//  try {
//    externalData.write(readBrick);
//  }
//  catch (IException &e) {
//    e.print();
//  }
//}
//
//cerr << endl << "Test copying an ecub that points to detached lbl" << endl;
//{
//  Cube externalData;
//  externalData.open("isisTruth_external3.ecub");
//  Cube *copiedCube = externalData.copy("isisTruth_external3.copy.ecub",
//                                       CubeAttributeOutput("+External"));
//  cerr << *copiedCube->label() << endl;
//
//  Brick readBrick(3, 3, 2, copiedCube->pixelType());
//  readBrick.SetBasePosition(1, 1, 1);
//  copiedCube->read(readBrick);
//  for (int index = 0; index < readBrick.size(); index++) {
//    if (readBrick[index] == Null) {
//      cerr << "N ";
//    }
//    else {
//      cerr << readBrick[index] << " ";
//    }
//  }
//  cerr << endl;
//
//  try {
//    copiedCube->write(readBrick);
//  }
//  catch (IException &e) {
//    e.print();
//  }
//  // need to deallocate our copied cube
//  copiedCube->close();
//  delete copiedCube;
//  copiedCube = NULL;
//
//}

  remove("IsisCube_00.cub");
  remove("IsisCube_01.cub");
+14 −15
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ namespace Isis {
      // Set dalpha to be half the grid spacing for nyquist sampling
      //double dalpha = (PI/180.0)/(2.0*p_demScale);
      double cmin = cos((90.0 - 1.0 / (2.0 * demScale())) * DEG2RAD);
      double dalpha = MAX(cos(g1lat * DEG2RAD), cmin) / (2.0 * demScale() * DEG2RAD);
      double dalpha = MAX(cos(g1lat * DEG2RAD), cmin) / (2.0 * demScale() * RAD2DEG);

      // Previous Sensor version used local version of this method with lat and lon doubles.  Steven said
      // it didn't make a significant difference in speed.
@@ -384,7 +384,7 @@ namespace Isis {
        // put in a test (above) for dd being smaller than the pixel
        // convergence tolerance.  If so the loop exits without an
        // intersection
        dalpha = MAX(cos(g2lat * DEG2RAD), cmin) / (2.0 * demScale() * DEG2RAD);
        dalpha = MAX(cos(g2lat * DEG2RAD), cmin) / (2.0 * demScale() * RAD2DEG);
      } // end while

      SpiceDouble intersectionPoint[3];
@@ -412,4 +412,3 @@ namespace Isis {
  }
  // Do nothing since the DEM intersection was already successful
}
+5 −3
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ namespace Isis {
   *                           intersection in intersectSurface() method to prevent early return
   *                           and attempt the iterative method even when the ellipsoid is not
   *                           intersected. Fixes #1438
   *   @history 2018-01-05 Cole Neubauer - Fixed units conversion in intersectSurface so that the
   *                           loop is stepping by radians per pixel, as recommended by Jeff
   *                           Anderson (LROC team). Fixes #5245
   */
  class EquatorialCylindricalShape : public DemShape {
    public:
@@ -67,4 +70,3 @@ namespace Isis {
};

#endif
Loading