Commit 31d57de3 authored by Ian Humphrey's avatar Ian Humphrey
Browse files

Fixed issues with spiceinit potentially failing with Dawn FC, Kaguya MI, and...

Fixed issues with spiceinit potentially failing with Dawn FC, Kaguya MI, and Messenger MDIS cubes. Fixes #2343.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6386 41f8697f-d340-4b68-9986-7bafba869bb8
parent ce0e0a9c
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -52,17 +52,22 @@ namespace Isis {
    m_spacecraftNameLong = "Dawn";
    m_spacecraftNameShort = "Dawn";

    if (naifIkCode() == -203110) {
    int ikCode = naifIkCode();

    // http://naif.jpl.nasa.gov/pub/naif/DAWN/kernels/ik/dawn_fc_v10.ti
    // FC1 has instrument codes -203110 to -203119 (to reference filters and radiator as well
    if (ikCode <= -203110 && ikCode > -203120) {
      m_instrumentNameLong = "Framing Camera 1";
      m_instrumentNameShort = "FC1";
    }
    else if (naifIkCode() == -203120) {
    // Likewise, FC2 has instrument codes -203120 to -203129
    else if (ikCode <= -203120 && ikCode > -203130) {
      m_instrumentNameLong = "Framing Camera 2";
      m_instrumentNameShort = "FC2";
    }
    else {
      QString msg = "File does not appear to be a Dawn Framing Camera image. ";
      msg += "(" + QString::number(naifIkCode()) + " is not a Dawn FC instrument code)";
      msg += "(" + QString::number(ikCode) + " is not a Dawn FC instrument code)";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
    
+3 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@ namespace Isis {
   *   @history 2015-08-25 Ian Humphrey and Makayla Shepherd - Added new data members and methods
   *                           to get spacecraft and instrument names. Extended unit test to test
   *                           these methods.
   *   @history 2015-10-01 Ian Humphrey and Makayla Shepherd - Modified check for determing 
   *                           the instrument name to also accept filter instrument kernal codes. 
   *                           References #2335.
   */
  class DawnFcCamera : public FramingCamera {
    public:
+9 −5
Original line number Diff line number Diff line
@@ -46,18 +46,22 @@ namespace Isis {
  KaguyaMiCamera::KaguyaMiCamera(Cube &cube) : LineScanCamera(cube) {
    m_spacecraftNameLong = "Kaguya";
    m_spacecraftNameShort = "Kaguya";
    // MI-VIS instrument kernel code = -131335
    if (naifIkCode() == -131335) {

    int ikCode = naifIkCode();

    // https://darts.isas.jaxa.jp/pub/spice/SELENE/kernels/ik/SEL_MI_V01.TI
    // MI-VIS instrument kernel codes -131331 through -131335
    if (ikCode <= -131331 && ikCode >= -131335) {
      m_instrumentNameLong = "Multi Band Imager Visible";
      m_instrumentNameShort = "MI-VIS";
    }
    // MI-NIR instrument kernel code = -131341
    else if (naifIkCode() == -131341) {
    // MI-NIR instrument kernel codes -131341 through -131344
    else if (ikCode <= -131341 && ikCode >= -131344) {
      m_instrumentNameLong = "Multi Band Imager Infrared";
      m_instrumentNameShort = "MI-NIR";
    }
    else {
      QString msg = QString::number(naifIkCode());
      QString msg = QString::number(ikCode);
      msg += " is not a supported instrument kernel code for Kaguya.";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
+3 −0
Original line number Diff line number Diff line
@@ -42,6 +42,9 @@ namespace Isis {
   *   @history 2015-08-12 Ian Humphrey and Makayla Shepherd - Added new data members and methods
   *                           to get spacecraft and instrument names. Extended unit test to test
   *                           these methods.
   *   @history 2015-10-01 Ian Humphrey and Makayla Shepherd - Updated check for determining
   *                           instrument names to check all valid MI camera naif codes. 
   *                           References #2335.
   */
  class KaguyaMiCamera : public LineScanCamera {
    public:
+3 −1
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ namespace Isis {
    NaifStatus::CheckErrors();
    
    // Set up detector constants
    // Note that Wac has filters, -236800 through -236812
    // http://naif.jpl.nasa.gov/pub/naif/pds/data/mess-e_v_h-spice-6-v1.0/messsp_1000/data/ik/msgr_mdis_v160.ti
    const int MdisWac(-236800);
    const int MdisNac(-236820);
    
@@ -75,7 +77,7 @@ namespace Isis {
      m_instrumentNameLong = "Mercury Dual Imaging System Narrow Angle Camera";
      m_instrumentNameShort = "MDIS-NAC";
    }
    else if (naifIkCode() == MdisWac) {
    else if (naifIkCode() <= MdisWac && naifIkCode() >= -236812) {
      m_instrumentNameLong = "Mercury Dual Imaging System Wide Angle Camera";
      m_instrumentNameShort = "MDIS-WAC";
    }
Loading