Commit 98df22d4 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Merge remote-tracking branch 'upstream/dev' into cassis

parents 3d5313f0 dbffb2d9
Loading
Loading
Loading
Loading
+0 −44
Original line number Diff line number Diff line
@@ -593,50 +593,6 @@ namespace Isis {
  }


  /**
   * Computes and returns emission angle, in degrees, given the observer
   * position. The surface normal vector is calculated using an ellipsoid, not
   * the local normal of the actual target shape.
   *
   * Emission Angle: The angle between the surface normal vector at the
   * intersection point and the vector from the intersection point to the
   * observer (usually the spacecraft). The emission angle varies from 0 degrees
   * when the observer is viewing the sub-spacecraft point (nadir viewing) to 90
   * degrees when the intercept is tangent to the surface of the target body.
   * Thus, higher values of emission angle indicate more oblique viewing of the
   * target.
   *
   * @param observerBodyFixedPosition  Three dimensional position of the observer,
   *                                   in the coordinate system of the target body.
   *
   * @return The emission angle, in decimal degrees.
   *
   */
  double EmbreeShapeModel::emissionAngle(const std::vector<double> &observerBodyFixedPosition) {

    // If there is already a normal save it, because it's probably the local normal
    std::vector<double> localNormal;
    bool hadNormal = hasNormal();
    if ( hadNormal ) {
      localNormal = normal();
    }

    // Calculate the ellipsoid surface normal
    calculateDefaultNormal();
    
    // Use ShapeModel to calculate the ellipsoid emission angle
    double ellipsoidEmission = ShapeModel::emissionAngle(observerBodyFixedPosition);

    // If there's a saved normal, reset it
    if ( hadNormal ) {
      setNormal(localNormal);
    }

    // Return the ellipsoid emission angle
    return ellipsoidEmission;
  }


  /**
   * Computes and returns incidence angle, in degrees, given the illuminator position.
   * The surface normal vector is calculated using an ellipsoid, not the local
+2 −2
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ namespace Isis {
   *
   * @internal
   *   @history 2017-04-22 Jesse Mapel and Jeannie Backer - Original Version
   *   @history 2018-05-01 Christopher Combs - Removed emissionAngle function to
   *                fix issues with using ellipsoids to find normals. Fixes #5387.
   */
  class EmbreeShapeModel : public ShapeModel {
    public:
@@ -84,10 +86,8 @@ namespace Isis {
      virtual void calculateSurfaceNormal();
      QVector<double> ellipsoidNormal();

      virtual double emissionAngle(const std::vector<double> &sB);
      virtual double incidenceAngle(const std::vector<double> &uB);


      virtual Distance localRadius(const Latitude &lat, const Longitude &lon);

      // Determine if the internal intercept is occluded from the observer/lookdir
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ Get the METHANE filter layout
METHANE filter ID: -61504
METHANE filter name: "METHANE"
METHANE filter start sample: 1
METHANE filter start line: 291
METHANE filter start line: 285
METHANE filter samples: 1648
METHANE filter lines: 128

@@ -39,7 +39,7 @@ Get the METHANE filter layout but give it a different name
METHANE filter ID: -61504
METHANE filter name: "methane"
METHANE filter start sample: 1
METHANE filter start line: 291
METHANE filter start line: 285
METHANE filter samples: 1648
METHANE filter lines: 128

+21 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include "FileName.h"
#include "ImportPdsTable.h"
#include "LineManager.h"
#include "ProcessImportPds.h"
#include "Table.h"
#include "UserInterface.h"
@@ -382,6 +383,26 @@ void IsisMain ()
  }
  outcube->putGroup(kerns);

  // NULL the dark current scans in level 2 images
  if (procLevel == 2) {
    const PvlKeyword &frameKey = outcube->group("Instrument").findKeyword("FrameParameter");
    // The third frame key is always the number of scans in between dark current scans.
    // So, we need to add one to that in order to get the number of lines to next dark current.
    int darkRate = toInt(frameKey[3]) + 1;
    LineManager darkLineManager(*outcube);

    for (int band = 1; band <= outcube->bandCount(); band++) {
      // The first line is always a dark current, so start there.
      for (int line = 1; line <= outcube->lineCount(); line+=darkRate) {
        darkLineManager.SetLine(line,band);
        for (int sample = 0; sample < darkLineManager.size(); sample++) {
          darkLineManager[sample] = Isis::Null;
        }
        outcube->write(darkLineManager);
      }
    }
  }

  p.EndProcess ();
}

+3 −0
Original line number Diff line number Diff line
@@ -58,6 +58,9 @@
    <change name="Jesse Mapel" date="2018-05-14">
       Fixed compiler warnings from new lvl3 ingestion code.
    </change>
    <change name="Jesse Mapel" date="2018-05-14">
       Nulled dark current scans in level 2 data. Fixes #5421.
    </change>
  </history>

  <category>