Unverified Commit 53142755 authored by Tyler Wilson's avatar Tyler Wilson Committed by GitHub
Browse files

Merge pull request #100 from AgoinsUSGS/Goins_Adam_M05353

Replaced cache calculations with Camera::LoadCache() call. Fixes #5353.
parents 3acb43b3 731bd9da
Loading
Loading
Loading
Loading
+28 −24
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ namespace Isis {
   *                           without padding.
   * @internal
   *   @history 2011-05-03 Jeannie Walldren - Added NAIF error check.
   *   @history 2018-03-14 Adam Goins - Changed cache calculations with LoadCache() call.
   *                           This fixes an error where VimsCamera caused spiceinit to
   *                           fail when TargetName == SKY. Fixes #5353.
   *
   */
  VimsCamera::VimsCamera(Cube &cube) : Camera(cube) {
@@ -161,15 +164,17 @@ namespace Isis {
    ((VimsGroundMap *)GroundMap())->Init(lab);
    ((VimsSkyMap *)SkyMap())->Init(lab);

    double tol = PixelResolution();

    if (tol < 0.) {
      // Alternative calculation of .01*ground resolution of a pixel
      tol = PixelPitch() * SpacecraftAltitude() / FocalLength() / 1000. / 100.;
    }

    if (channel == "VIS") createCache(etStart, etStop, 64 * 64, tol);
    if (channel == "IR") createCache(etStart, etStop, 64 * 64, tol);
    LoadCache();
    // The below code was commented out in place of the above LoadCache() call.
    // double tol = PixelResolution();
    //
    // if (tol < 0.) {
    //   // Alternative calculation of .01*ground resolution of a pixel
    //   // tol = PixelPitch() * SpacecraftAltitude() / FocalLength() / 1000. / 100.;
    // }
    //
    // if (channel == "VIS") createCache(etStart, etStop, 64 * 64, tol);
    // if (channel == "IR") createCache(etStart, etStop, 64 * 64, tol);

    //  Call SetImage so that the et is reset to beginning of image w/o
    //   padding.
@@ -231,4 +236,3 @@ namespace Isis {
extern "C" Isis::Camera *VimsCameraPlugin(Isis::Cube &cube) {
  return new Isis::VimsCamera(cube);
}
+16 −13
Original line number Diff line number Diff line
@@ -81,6 +81,9 @@ namespace Isis {
   *   @history 2015-10-16 Ian Humphrey - Removed declarations of spacecraft and instrument
   *                           members and methods and removed implementation of these methods
   *                           since Camera now handles this. References #2335.
   *   @history 2018-03-14 Adam Goins - Changed cache calculations with LoadCache() call.
   *                           This fixes an error where VimsCamera caused spiceinit to
   *                           fail when TargetName == SKY. Fixes #5353.
   */
  class VimsCamera : public Camera {
    public: