Commit 723ae9ee authored by Ken Edmundson's avatar Ken Edmundson
Browse files

mvic tdi camera distortion map updates

parent bcf5677c
Loading
Loading
Loading
Loading
+85 −171
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <boost/math/special_functions/legendre.hpp>

#include "Camera.h"
#include "CameraFocalPlaneMap.h"
#include "Constants.h"
#include "FunctionTools.h"
#include "IString.h"
@@ -32,7 +33,6 @@
#include <QDebug>



using namespace boost::math;
using namespace std;
using namespace Isis;
@@ -83,52 +83,60 @@ namespace Isis {
   *
   * Compute undistorted focal plane x given a distorted focal plane x
   *
   * Distortion in line direction currently not considered (MVIC TDI is treated as line scan sensor)
   * TODO: Modify this - Distortion in line direction currently not considered (MVIC TDI is treated as line scan sensor)
   *
   * In the event of any failure, undistorted focal plane values are set equal to the raw
   * (distorted) values
   *
   * @param dx distorted focal plane x in millimeters
   * @param dy distorted focal plane y in millimeters
   *
   * @return if the conversion was successful
   * @return success/failure
   *
   * @see SetDistortion
   */
  // TODO: Don't really like this - we always return true, even in event of failures
  bool MvicTdiCameraDistortionMap::SetFocalPlane(const double dx, const double dy) {

    p_focalPlaneX = dx;
    p_focalPlaneY = dy;

    // if x lies outside of the detector, do NOT apply distortion
    // set undistorted focal plane values to be identical to raw values
    if ((fabs(dx) > m_focalPlaneHalf_x)) {
    // initialize undistorted focal plane coordinates to the distorted
    // coordinate values
    p_undistortedFocalPlaneX = dx;
    p_undistortedFocalPlaneY = dy;

    // if x lies outside of the detector, do NOT apply distortion
    // set undistorted focal plane values to be identical to raw values
    if ((fabs(dx) > m_focalPlaneHalf_x)) {
      return true;
    }

    // scale x and y to lie in the range -1.0 to +1.0
    // this is requirement for Legendre Polynomials, man
    // scale x to lie in the range -1.0 to +1.0
    // this is required for Legendre Polynomials, man
    double xscaled = -dx/m_focalPlaneHalf_x;

    if (fabs(xscaled) > 1.0) {
      string msg = "MvicTdiCameraDistortionMap::SetFocalPlane - value not in range -1.0 to +1.0 required for Legendre Polynomials";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }

    // compute distortion corrections in x and y using Legendre Polynomials
    // compute distortion corrections in x using Legendre Polynomials
    // these corrections are also in the -1.0 to +1.0 range
    double deltax, deltay;
    computeDistortionCorrections(xscaled, 0.0, deltax, deltay);

    // apply the corrections
    xscaled += deltax;
    double deltax1 = 0.0;
    if (!computeDistortionCorrections(xscaled, 0.0, deltax1)) {
      return true;
    }

    // now compute residual distortion corrections (per Jason Cook)
    // TODO: implementation not complete
//    computeResidualDistortionCorrections(dx, dy, deltax, deltay);
    double deltax2 = 0.0;
    double deltay2 = 0.0;
    computeResidualDistortionCorrections(dx, deltax2, deltay2);

    // apply the corrections
    xscaled += deltax1;

    // scale back from range of '-1.0 to +1.0' to the detector, '-32.5 to 32.5 mm'
    p_undistortedFocalPlaneX = -xscaled * m_focalPlaneHalf_x;
    p_undistortedFocalPlaneY = p_focalPlaneY;
//    p_undistortedFocalPlaneX = -xscaled * m_focalPlaneHalf_x;
//    p_undistortedFocalPlaneY = p_focalPlaneY;
    p_undistortedFocalPlaneX = -xscaled * m_focalPlaneHalf_x + deltax2;
    p_undistortedFocalPlaneY = p_focalPlaneY + deltay2;

    return true;
  }
@@ -153,11 +161,24 @@ namespace Isis {
    p_undistortedFocalPlaneX = ux;
    p_undistortedFocalPlaneY = uy;

    double xt = ux;
    double yt = uy;

//    p_focalPlaneX = p_undistortedFocalPlaneX;
//    p_focalPlaneY = p_undistortedFocalPlaneY;
//    return true;

    // scale undistorted coordinates to range of -1.0 to +1.0
    double xtScaled = -ux/m_focalPlaneHalf_x;
    double uxScaled = xtScaled;
    double xScaledDistortion, yScaledDistortion;
    double xScaledPrevious = 1000000.0;
    double uxScaled = -ux/m_focalPlaneHalf_x;
    double xtScaled;
    double xprevious, yprevious;
    double scaledDeltax;
    double deltax2 = 0.0;
    double deltay2 = 0.0;

    xprevious = 1000000.0;
    yprevious = 1000000.0;

    double tolerance = 0.000001;

    bool bConverged = false;
@@ -167,26 +188,31 @@ namespace Isis {
    // in successive iterations is at or below the given tolerance
    for( int i = 0; i < 50; i++ ) {

      xtScaled = -xt/m_focalPlaneHalf_x;

      if (fabs(xtScaled) > 1.0) {
//        continue;
        string msg = "value not in range -1.0 to +1.0 required for Legendre Polynomials";
        throw IException(IException::Programmer, msg, _FILEINFO_);
      }

      // compute distortion in x and y (scaled to -1.0 - +1.0) using Legendre Polynomials
    if (!computeDistortionCorrections(xtScaled, 0.0, xScaledDistortion, yScaledDistortion) )
      return false;
      // compute scaled distortion in x (scaled to -1.0 - +1.0) using Legendre Polynomials
      computeDistortionCorrections(xtScaled, 0.0, scaledDeltax);

      // compute residual distortion in unscaled focal plane coordinates
      computeResidualDistortionCorrections(xt, deltax2, deltay2);

      // update scaled image coordinates
      xtScaled = uxScaled - xScaledDistortion;
      // update unscaled coordinates
      xt = -(uxScaled-scaledDeltax)*m_focalPlaneHalf_x - deltax2;
      yt = uy - deltay2;

      // check for convergence
      if((fabs(xtScaled - xScaledPrevious) <= tolerance)) {
      // check for convergenceyScaledDistortion
      if((fabs(xt - xprevious) <= tolerance) && (fabs(yt - yprevious) <= tolerance)) {
        bConverged = true;
        break;
      }

      xScaledPrevious = xtScaled;
      xprevious = xt;
      yprevious = yt;
    }

    if (bConverged) {
@@ -194,100 +220,14 @@ namespace Isis {
      // xtScaled *= -m_focalPlaneHalf_x;

      // set distorted coordinates
      p_focalPlaneX = -xtScaled * m_focalPlaneHalf_x;
      p_focalPlaneY = p_undistortedFocalPlaneY;


      p_focalPlaneX = xt;
      p_focalPlaneY = yt;
    }

    return bConverged;
  }


  /** Compute distorted focal plane x/y
   *
   * Compute distorted focal plane x/y given an undistorted focal plane x/y.
   *
   * This is an iterative procedure as computing the inverse of the distortion equations used by New
   * Horizons MVIC is difficult.
   *
   * @param ux undistorted focal plane x in millimeters
   * @param uy undistorted focal plane y in millimeters
   *
   * @return if the conversion was successful
   * @see SetDistortion
   */
/*
  bool MvicTdiCameraDistortionMap::SetUndistortedFocalPlane(const double ux, const double uy) {

    // image coordinates prior to introducing distortion
    p_undistortedFocalPlaneX = ux;
    p_undistortedFocalPlaneY = uy;

    double xScaledDistortion, yScaledDistortion;

    // scale undistorted coordinates to range of -1.0 to +1.0
    double xtScaled = ux/m_focalPlaneHalf_x;
//  double ytScaled = uy/m_focalPlaneHalf_y;
    double ytScaled = 0.0;

    double uxScaled = xtScaled;
    double uyScaled = ytScaled;

    double xScaledPrevious = 1000000.0;
    double yScaledPrevious = 1000000.0;

    double tolerance = 0.000001;

    bool bConverged = false;

    // iterating to introduce distortion...
    // we stop when the difference between distorted coordinates
    // in successive iterations is at or below the given tolerance
    for( int i = 0; i < 50; i++ ) {

//      if (fabs(xtScaled) > 1.0 || fabs(ytScaled) > 1.0) {
//        continue;
//        string msg = "value not in range -1.0 to +1.0 required for Legendre Polynomials";
//        throw IException(IException::Programmer, msg, _FILEINFO_);
//      }

      // compute distortion in x and y (scaled to -1.0 - +1.0) using Legendre Polynomials
//    if (!computeDistortionCorrections(xtScaled, ytScaled, xScaledDistortion, yScaledDistortion) )
    if (!computeDistortionCorrections(xtScaled, 0.0, xScaledDistortion, yScaledDistortion) )
        return false;

      // update scaled image coordinates
      xtScaled = uxScaled - xScaledDistortion;
//      ytScaled = uyScaled - yScaledDistortion;
      ytScaled = 0.0;

      // check for convergence
      if((fabs(xtScaled - xScaledPrevious) <= tolerance) && (fabs(ytScaled - yScaledPrevious) <= tolerance)) {
        bConverged = true;
        break;
      }

      xScaledPrevious = xtScaled;
      yScaledPrevious = ytScaled;
    }

    if (bConverged) {
      // scale coordinates back to detector (-32.656 to +32.656)
      xtScaled *= m_focalPlaneHalf_x;
//    ytScaled *= m_focalPlaneHalf_y;

      // set distorted coordinates
      p_focalPlaneX = xtScaled;
      p_focalPlaneY = ytScaled;

//      p_focalPlaneY = uy;
    }

    return bConverged;
  }
*/

  /** Compute distortion corrections in x and y direction
   *
   * For Legendre Polynomials, see ...
@@ -300,11 +240,11 @@ namespace Isis {
   * @param deltax focal plane distortion correction to x in millimeters
   * @param deltay focal plane distortion correction to y in millimeters
   *
   * @return if successful
   * @return success/failure
   */
  bool MvicTdiCameraDistortionMap::computeDistortionCorrections(const double xscaled,
                                                             const double yscaled, double &deltax,
                                                             double &deltay) {
                                                                const double yscaled,
                                                                double &deltax) {

    double lpx0, lpx1, lpx2, lpx3, lpx4, lpx5;
    double lpy0, lpy1, lpy2, lpy3, lpy4, lpy5;
@@ -350,67 +290,41 @@ namespace Isis {
      m_xDistortionCoeffs[18] * lpx4 * lpy1 +
      m_xDistortionCoeffs[19] * lpx5 * lpy0;

    deltay = 0.0;

//    deltay =
//      m_distCoefY[0] * lpx0 * lpy1 +
//      m_distCoefY[1] * lpx1 * lpy0 +
//      m_distCoefY[2] * lpx0 * lpy2 +
//      m_distCoefY[3] * lpx1 * lpy1 +
//      m_distCoefY[4] * lpx2 * lpy0 +
//      m_distCoefY[5] * lpx0 * lpy3 +
//      m_distCoefY[6] * lpx1 * lpy2 +
//      m_distCoefY[7] * lpx2 * lpy1 +
//      m_distCoefY[8] * lpx3 * lpy0 +
//      m_distCoefY[9] * lpx0 * lpy4 +
//     m_distCoefY[10] * lpx1 * lpy3 +
//     m_distCoefY[11] * lpx2 * lpy2 +
//     m_distCoefY[12] * lpx3 * lpy1 +
//     m_distCoefY[13] * lpx4 * lpy0 +
//     m_distCoefY[14] * lpx0 * lpy5 +
//     m_distCoefY[15] * lpx1 * lpy4 +
//     m_distCoefY[16] * lpx2 * lpy3 +
//     m_distCoefY[17] * lpx3 * lpy2 +
//     m_distCoefY[18] * lpx4 * lpy1 +
//     m_distCoefY[19] * lpx5 * lpy0;

    return true;
  }


  /** Compute residual distortion corrections in row and column direction
   *  TODO: Implementation not complete
   *  TODO: Implementati plete
   *
   * @param dx
   * @param dy
   * @param residualDeltax
   * @param residualDeltay
   *
   * @return if successful
   * @return success/failure
   */
  bool MvicTdiCameraDistortionMap::computeResidualDistortionCorrections(const double dx,
                                                             const double dy,
  void MvicTdiCameraDistortionMap::computeResidualDistortionCorrections(const double dx,
                                                             double &residualDeltax,
                                                             double &residualDeltay) {

//    double sample = p_camera->Sample();
//    double line = p_camera->Line();
//
//    double residualColDelta, residualRowDelta;
//
//    residualColDelta = sample * m_residualColDistCoeffs[1] +
//                       pow(sample,2) * m_residualColDistCoeffs[2] +
//                       pow(sample,3) * m_residualColDistCoeffs[3] +
//                       pow(sample,4) * m_residualColDistCoeffs[4] +
//                       pow(sample,5) * m_residualColDistCoeffs[5];
//
//    residualRowDelta = line * m_residualRowDistCoeffs[1] +
//                       pow(line,2) * m_residualRowDistCoeffs[2] +
//                       pow(line,3) * m_residualRowDistCoeffs[3] +
//                       pow(line,4) * m_residualRowDistCoeffs[4] +
//                       pow(line,5) * m_residualRowDistCoeffs[5];
    double s = 2500.5 - dx/0.013;

    return true;
    residualDeltax = s * m_residualColDistCoeffs[1] +
                       pow(s,2) * m_residualColDistCoeffs[2] +
                       pow(s,3) * m_residualColDistCoeffs[3] +
                       pow(s,4) * m_residualColDistCoeffs[4] +
                       pow(s,5) * m_residualColDistCoeffs[5];

    residualDeltay = s * m_residualRowDistCoeffs[1] +
                       pow(s,2) * m_residualRowDistCoeffs[2] +
                       pow(s,3) * m_residualRowDistCoeffs[3] +
                       pow(s,4) * m_residualRowDistCoeffs[4] +
                       pow(s,5) * m_residualRowDistCoeffs[5];

    // convert to mm (correction for negative x to the left)
    residualDeltax *= -p_camera->PixelPitch();
    residualDeltay *= p_camera->PixelPitch();
  }


+3 −5
Original line number Diff line number Diff line
@@ -59,11 +59,9 @@ namespace Isis {
      bool outputResidualDeltas(); // for debugging

  private:
      bool computeDistortionCorrections(const double xscaled, const double yscaled, double &deltax,
                                        double &deltay);
      bool computeResidualDistortionCorrections(const double dx, const double dy,
                                                double &residualDeltax, double &residualDeltay);

      bool computeDistortionCorrections(const double xscaled, const double yscaled, double &deltax);
      void computeResidualDistortionCorrections(const double dx, double &residualDeltax,
                                                double &residualDeltay);

    private:
      std::vector<double> m_xDistortionCoeffs; //!< distortion coefficients in x and y as determined
+0 −283
Original line number Diff line number Diff line
\begintext

New Horizons Spacecraft, MVIC instrument, ISIS addendum kernel
===============================================================================

   This kernel contains New Horizons spacecraft, MVIC instrument specific
   data to the ISIS camera model software.
   instruments.

Version and Date
-------------------------------------------------------------------------------

   Version 001 -- June 17, 2014 -- Tracie Sucharski USGS

            --   Original version

   Version 002 -- June 17, 2014 -- Stuart Sides USGS

            --   Added +Y offsets for the MVIC TDI CCDs to the INS-9890x_TRANSY keys and the
                 inverse to the INS-9890x_TRANSL keys. NOTE: The values came from comments
                 in the New Horizons FK (i.e. nh_v200.tf) 


\begintext
  All Mvic frames have the boresight in the -X directions, ISIS assumes the boresight is 
  either in the +/- Z direction.  A new frame was created for each Mvic ccd's to do a final 
  rotation into the ISIS assumed boresight. This is a 90 degree rotation around the Y-axis.  
  New Naif Id's were created by simply adding 700 to the Mission Naif ID.

  This was done as an extra frame rather than in the FocalPlaneMap code because of ckwriter and
  spkwriter ISIS applications.

  FRAME  (Naif Frame ID = -98203    Isis Frame ID = -98903)
 
INS-98903_PP_OFFSET         = (-0.03538, -0.00120)

\begindata
 
 INS-98900_PP_OFFSET         = (0.03538, 0.00120)
 


 INS-98900_DISTORTION_COEF_X = (
                               -2.184e-05,
                               32.911e-05,
                               -0.243e-05,
                                7.444e-05,
                              -19.201e-05,
                               -0.218e-05,
                                0.686e-05,
                               -0.502e-05,
                             -144.410e-05,
                                0.662e-05,
                               -0.194e-05,
                                0.537e-05,
                               -0.843e-05,
                                0.201e-05,
                               -0.289e-05,
                               -0.153e-05,
                               -0.209e-05,
                               -0.067e-05,
                               -0.490e-05,
                              -12.455e-05
                               )
 
 INS-98900_DISTORTION_COEF_Y = (
                              194.590e-05,
                              169.360e-05,
                                1.100e-05,
                               -3.500e-05,
                              609.640e-05,
                               -4.300e-05,
                                0.400e-05,
                             -287.100e-05,
                             -114.900e-05,
                               -5.100e-05,
                               33.600e-05,
                              -41.400e-05,
                              -38.800e-05,
                             -122.500e-05,
                               37.300e-05,
                               41.500e-05,
                                4.500e-05,
                               11.300e-05,
                              -60.000e-05,
                               40.900e-05
                               )
 
 FRAME_ISIS_NH_RALPH_MVIC_FT    = -98903
 FRAME_-98903_NAME          = 'ISIS_NH_RALPH_MVIC_FT'
 FRAME_-98903_CLASS         = 4
 FRAME_-98903_CLASS_ID      = -98903
 FRAME_-98903_CENTER        = -98
 TKFRAME_-98903_RELATIVE    = 'NH_RALPH_MVIC_FT'
 TKFRAME_-98903_SPEC        = 'ANGLES'
 TKFRAME_-98903_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98903_AXES        = (  1,  2,  3 )
 TKFRAME_-98903_UNITS       = 'DEGREES'

 INS-98903_PIXEL_PITCH       = 0.013
 INS-98903_FOCAL_LENGTH      = 657.5

 INS-98903_TRANSX  = ( 0.0,  -0.013,  0.0 )
 INS-98903_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98903_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98903_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )
           
\begintext

  PAN2  (Naif Frame ID = -98204    Isis Frame ID = -98904)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_PAN2    = -98904
 FRAME_-98904_NAME          = 'ISIS_NH_RALPH_MVIC_PAN2'
 FRAME_-98904_CLASS         = 4
 FRAME_-98904_CLASS_ID      = -98904
 FRAME_-98904_CENTER        = -98
 TKFRAME_-98904_RELATIVE    = 'NH_RALPH_MVIC_PAN2'
 TKFRAME_-98904_SPEC        = 'ANGLES'
 TKFRAME_-98904_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98904_AXES        = (  1,  2,  3 )
 TKFRAME_-98904_UNITS       = 'DEGREES'

 INS-98904_PIXEL_PITCH       = 0.013
 INS-98904_FOCAL_LENGTH      = 657.5

 INS-98904_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98904_TRANSY  = ( 2.041, 0.0, 0.013 )

 INS-98904_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98904_ITRANSL = ( -157.0, 0.0, 76.9230769230769 )

\begintext
  PAN1  (Naif Frame ID = -98205    Isis Frame ID = -98905)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_PAN1    = -98905
 FRAME_-98905_NAME          = 'ISIS_NH_RALPH_MVIC_PAN1'
 FRAME_-98905_CLASS         = 4
 FRAME_-98905_CLASS_ID      = -98905
 FRAME_-98905_CENTER        = -98
 TKFRAME_-98905_RELATIVE    = 'NH_RALPH_MVIC_PAN1'
 TKFRAME_-98905_SPEC        = 'ANGLES'
 TKFRAME_-98905_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98905_AXES        = (  1,  2,  3 )
 TKFRAME_-98905_UNITS       = 'DEGREES'

 INS-98905_PIXEL_PITCH       = 0.013
 INS-98905_FOCAL_LENGTH      = 657.5

 INS-98905_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98905_TRANSY  = ( 3.354, 0.0, 0.013 )

 INS-98905_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98905_ITRANSL = ( -664.0, 0.0, 76.9230769230769 )

\begintext
  RED  (Naif Frame ID = -98206    Isis Frame ID = -98906)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_RED    = -98906
 FRAME_-98906_NAME          = 'ISIS_NH_RALPH_MVIC_RED'
 FRAME_-98906_CLASS         = 4
 FRAME_-98906_CLASS_ID      = -98906
 FRAME_-98906_CENTER        = -98
 TKFRAME_-98906_RELATIVE    = 'NH_RALPH_MVIC_RED'
 TKFRAME_-98906_SPEC        = 'ANGLES'
 TKFRAME_-98906_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98906_AXES        = (  1,  2,  3 )
 TKFRAME_-98906_UNITS       = 'DEGREES'

 INS-98906_PIXEL_PITCH       = 0.013
 INS-98906_FOCAL_LENGTH      = 657.5

 INS-98906_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98906_TRANSY  = ( 4.693, 0.0, 0.013 )

 INS-98906_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98906_ITRANSL = ( -361.0, 0.0, 76.9230769230769 )


\begintext
  BLUE  (Naif Frame ID = -98207    Isis Frame ID = -98907)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_BLUE    = -98907
 FRAME_-98907_NAME          = 'ISIS_NH_RALPH_MVIC_BLUE'
 FRAME_-98907_CLASS         = 4
 FRAME_-98907_CLASS_ID      = -98907
 FRAME_-98907_CENTER        = -98
 TKFRAME_-98907_RELATIVE    = 'NH_RALPH_MVIC_BLUE'
 TKFRAME_-98907_SPEC        = 'ANGLES'
 TKFRAME_-98907_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98907_AXES        = (  1,  2,  3 )
 TKFRAME_-98907_UNITS       = 'DEGREES'

 INS-98907_PIXEL_PITCH       = 0.013
 INS-98907_FOCAL_LENGTH      = 657.5

 INS-98907_TRANSX  = ( 0.0,  0.013,  0.0)
 INS-98907_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98907_ITRANSS = ( 0.0, 76.9230769230769, 0.0 )
 INS-98907_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

\begintext
  METHANE  (Naif Frame ID = -98208    Isis Frame ID = -98908)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_METHANE    = -98908
 FRAME_-98908_NAME          = 'ISIS_NH_RALPH_MVIC_METHANE'
 FRAME_-98908_CLASS         = 4
 FRAME_-98908_CLASS_ID      = -98908
 FRAME_-98908_CENTER        = -98
 TKFRAME_-98908_RELATIVE    = 'NH_RALPH_MVIC_METHANE'
 TKFRAME_-98908_SPEC        = 'ANGLES'
 TKFRAME_-98908_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98908_AXES        = (  1,  2,  3 )
 TKFRAME_-98908_UNITS       = 'DEGREES'

 INS-98908_PIXEL_PITCH       = 0.013
 INS-98908_FOCAL_LENGTH      = 657.5

 INS-98908_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98908_TRANSY  = ( 7.280, 0.0, 0.013 )

 INS-98908_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98908_ITRANSL = ( -560.0, 0.0, 76.9230769230769 )


\begintext
  NIR  (Naif Frame ID = -98209    Isis Frame ID = -98909)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_NIR    = -98909
 FRAME_-98909_NAME          = 'ISIS_NH_RALPH_MVIC_NIR'
 FRAME_-98909_CLASS         = 4
 FRAME_-98909_CLASS_ID      = -98909
 FRAME_-98909_CENTER        = -98
 TKFRAME_-98909_RELATIVE    = 'NH_RALPH_MVIC_NIR'
 TKFRAME_-98909_SPEC        = 'ANGLES'
 TKFRAME_-98909_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98909_AXES        = (  1,  2,  3 )
 TKFRAME_-98909_UNITS       = 'DEGREES'

 INS-98909_PIXEL_PITCH       = 0.013
 INS-98909_FOCAL_LENGTH      = 657.5

 INS-98909_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98909_TRANSY  = ( 8.632, 0.0, 0.013 )

 INS-98909_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98909_ITRANSL = ( -664.0, 0.0, 76.9230769230769 )

\begintext


\begintext
 INS-98208_BORESIGHT_SAMPLE  = 2511.5
 INS-98208_BORESIGHT_LINE    = 1.0

 INS-98208_PP = ( 0.0, 0.0 )
 INS-98208_OD_K = ( 0.000379921103637315, 0.000213226448051461, -4.01862878758592E-08 )
 INS-98208_DECENTER = ( -0.000005, 0.004047 )

\begintext
 These are the parameters required for writing c-kernels.  For 
 the New Horizons spacecraft the ck frame is NH_SPACECRAFT (-98000),
 and the ck reference frame is J2000 (1).

\begindata
 INS-98908_CK_FRAME_ID=-98000
 INS-98908_CK_REFERENCE_ID=1

\begintext