This page was created by the IDL library routine `mk_html_help2`.

Last modified: Mon Sep 29 18:17:33 2025.

# Directory Listing of Routines

# general/spice

- ORRERY
  Plots the orbits of the planets to scale as viewed from the north
- ORRERY_OPTIONS
  Stores a structure of ORRERY keyword options and provides a
- Q_ANGULAR_VELOCITY
- QDERIV
- SPICE_BODY_ATT
- SPICE_BODY_POS
- SPICE_BODY_VEL
- SPICE_CRIB
- SPICE_FILE_SOURCE
  Provides a structure that contains information pertinent to the locaton (and downloading) of SPICE data files
- SPICE_INSTALL
- SPICE_KERNEL_INFO[1]
- SPICE_KERNEL_INFO[2]
- SPICE_M2Q
- SPICE_MK_READ
- SPICE_POSITION_TO_TPLOT
- SPICE_QROT_TO_TPLOT
- SPICE_STANDARD_KERNELS
  Provides fully resolved standard spice kernel filenames. Files are downloaded as needed.
- SPICE_TEST
- SPICE_VALID_TIMES
- SPICE_VECTOR_ROTATE
- SPICE_VECTOR_ROTATE_TPLOT
- TIME_EPHEMERIS

# Routine Descriptions

## ORRERY

[Next Routine] [List of Routines]

    PROCEDURE:   orrery
    PURPOSE:
      Plots the orbits of the planets to scale as viewed from the north
      ecliptic pole, based on the latest JPL planetary ephemeris.  Planet
      locations are shown by colored disks at the time(s) provided.  If
      time is an array, then colored arcs are drawn to show the orbital
      positions spanned by the input time array.  In this case, colored
      disks mark the beginning, middle and end of each arc.  Time can
      also be input by clicking in a tplot window (see keyword MOVIE).

      By default, this routine shows the inner planets (Mercury to Mars).
      Use keyword OUTER to show all the planets plus Pluto.  In this case,
      the inner planets will be crowded together in the center.

      This routine was originally designed (long ago in the Great Valley)
      to show only Earth and Mars.  Some useful Earth-Mars geometry is
      calculated and can be shown using LABEL=2.  Information includes:

        Earth-Sun-Mars angle (amount of solar rotation E -> M)
        Sun-Mars-Earth angle (elongation of Earth from Mars)
        Sun-Earth-Mars angle (elongation of Mars from Earth)
        One-way light time (Mars to Earth, min)
        Subsolar latitude on Mars (deg)

      Use keyword PLANET to calculate the same geometry for any other
      planet.

      Optionally returns (keyword EPH) the orbital positions of the
      planets plus Pluto for the entire ephemeris time period.

      Note: This routine uses long-range predict kernels for Solar Probe
      and Solar Orbiter.  These kernels use a format that cannot be read
      by earlier versions of ICY/SPICE.  You may need to update ICY/SPICE
      to see the positions of these two spacecraft.  Version 1.8.0 is
      known to work.

      Note: This routine will not reset timespan or timerange.

    USAGE:
      orrery [, time] [,KEYWORD=value, ...]

    INPUTS:
           time:      Show planet positions at this time(s).  Valid times
                      are from 1550-01-01 to 2650-01-01 in any format
                      accepted by time_double().

                      If not specified, use the current system time.

    KEYWORDS:
           You can set default values for any of the following keywords with
           orrery_options.pro.  Keywords set explicitly override defaults.

           TIMERANGE: Time range for ephemeric calculations.  The latest planetary
                      ephemeris (de442) spans from 1550 to 2650, but the routine runs
                      much faster when this is limited to a shorter span.
                      Default = ['1850','2150'].

           NOPLOT:    Skip the plot (useful with keyword EPH).

           NOBOX:     Hide the axis box.

           LABEL:     Controls the amount of text labels.
                        0 = no labels
                        1 = a few labels (default)
                        2 = all labels (incl. E-M geometry)

           PLABEL:    Print the name of each planet next to its symbol.

           SLABEL:    Print the name of each spacecraft next to its symbol.

           PLANET:    Planet number or name for calculating geometry
                      with respect to Earth.  Numbering starts at 1.
                      For string input, case-folded minimum matching
                      is performed.

                        1 = Mercury, 2 = Venus, ..., 9 = Pluto.
                        Default = 4 or 'Mars'.
                        A value of 3 or 'Earth' is invalid.

                      The plot limits will be set to include this and
                      all interior planets.

           FIXPLANET: Rotate the all planet and satellite positions
                      about the Z axis so that the specified planet is
                      fixed at the same longitude.  Set this keyword
                      to a scalar or two-element array:

                        fix[0] : fixed longitude (0-360 deg)
                        fix[1] : planet number (1-9); default = 3

                      Applies only to plotting - does not affect the
                      returned EPH structure.

           SCALE:     Scale factor for adjusting the size of the
                      plot window.  Default = 1.

           EPH:       Named variable to hold structure of planet and
                      satellite ephemeris data (1900-2100, or as
                      available).

           CSS:       Plot the location of Comet Siding Spring.
                        Coverage: 2000-01-01 to 2016-01-01

           I3A:       Plot the location of Comet I3/ATLAS.
                        Coverage: 2020-01-01 to 2030-01-01

           STEREO:    Plot the locations of the STEREO spacecraft,
                      when available.  (The Stereo-B ephemeris has
                      an error near the beginning of the mission,
                      associated with a maneuver to place it in the
                      "behind" orbit.  This routine deletes the bad
                      ephemeris values and interpolates across the
                      gap.)
                        Coverage:
                          Stereo A: 2006-10-26 to 2025-06-05
                          Stereo B: 2006-10-26 to 2014-09-28

           SORB:      Plot the location of Solar Orbiter.  Includes a
                      predict ephemeris.
                        Coverage: 2020-02-10 to 2030-11-20

           PSP:       Plot the location of Parker Solar Probe. Includes
                      a predict ephemeris.
                        Coverage: 2018-08-12 to 2030-01-01

           MAVEN:     Plot the location of MAVEN from launch to Mars orbit
                      insertion.
                        Coverage: 2013-11-18 to 2014-09-23

           SALL:      Plot all of the above spacecraft locations.

           RELOAD:    Reload the ephemerides.  (Does not reinitialize
                      SPICE -- use cspice_kclear for that.)

           SPIRAL:    Plot the Parker (Archimedean) spiral of the
                      solar wind magnetic field.  Spiral is shown out
                      to the orbit of Saturn, where the magnetic field
                      is nearly tangential to the orbit.

           PCURVE:    Show the Parker spiral curve that intersects the
                      planet indicated by keyword PLANET.  This is shown
                      in a different color.  This is automatically set
                      whenever SPIRAL is set.

           VSW:       Solar wind velocity for calculating the spiral.
                      Default = 400 km/s.  (Usually within the range
                      of 250 to 750 km/s.)

           SROT:      Solar siderial rotation period in days for
                      calculating the spiral.  Default = 25.38 days
                      (i.e., Carrington), which gives the typically
                      observed Parker spiral angle at Earth (47 deg)
                      for a solar wind velocity of 400 km/s.

           MOVIE:     Click on an existing tplot window and/or drag the
                      cursor for a movie effect.

           KEEPWIN:   Just keep the plot window (don't ask).

           WINDOW:    Window number for the snapshot window.  This is a number
                      from 0 to 31 (same range as WINDOW command).  Any value
                      outside this range will invoke the FREE keyword.

           MONITOR:   Put snapshot windows in this monitor.  Monitors are numbered
                      from 0 to N-1, where N is the number of monitors recognized
                      by the operating system.  See win.pro for details.

           PNG:       Set this to the full filename (including path) of a png.
                      No snapshot window is created.  All graphics output is
                      written to the png file instead.  MOVIE = 0 is enforced.

           OUTER:     Plot the outer planets.  The inner planets will
                      be crowded together in the center.  Pluto's orbit
                      is incomplete over the 1900-2100 ephemeris range.

           XYRANGE:   Plot range in X and Y (AU).  Overrides default.
                      If one value is supplied, plot range is -XYRANGE
                      to +XYRANGE.  If two or more values are supplied,
                      then plot range is min(XYRANGE) to max(XYRANGE).
                      If set, then all planets within the plot window
                      are shown, and the Archimedean spiral (if set)
                      extends out to the orbit of Saturn.

           TPLOT:     Create Earth-PLANET geometry and spacecraft position
                      tplot variables.  Default = 1 (yes).

           VARNAMES:  Standard set of tplot variables to plot.

           VERBOSE:   Controls verbosity of file_retrieve.
                      Default = 0 (no output).  Try a value > 2 to see
                      more messages; > 4 for lots of messages.

           FULL:      Show everything: planets, all spacecraft, Parker
                      spiral, and all labels.

           BLACK:     Use a black background for the orbit snapshot.
                      (After all, space is black.)  Default = 1.

     $LastChangedBy: dmitchell $
     $LastChangedDate: 2025-08-02 16:59:39 -0700 (Sat, 02 Aug 2025) $
     $LastChangedRevision: 33527 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/orrery.pro $

    CREATED BY:	David L. Mitchell

(See general/spice/orrery.pro)

## ORRERY_OPTIONS

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:   orrery_options
    PURPOSE:
      Stores a structure of ORRERY keyword options and provides a
      mechanism for changing those options.  Keywords set by this
      routine are persistent defaults.  They can be overridden by
      explicitly setting keywords in ORRERY.

      Call this routine from your idl_startup.pro to customize default
      options for yourself.

    USAGE:
      orrery_options, key

    INPUTS:
           key:           Structure containing keyword(s) for ORRERY.
                          Unrecognized keywords are simply ignored.

                          {KEYWORD: value, KEYWORD: value, ...}

    KEYWORDS:
           GET:           Set this to a named variable to return the current
                          default keyword structure (after changes, if any).

           REPLACE:       If this keyword is set, then the input structure
                          replaces any existing structure.  Otherwise, the
                          input structure is merged with any existing one.

           DELETE:        An array of tag names to delete from the default
                          keyword structure.

           RESET:         Reset the default structure to something universally
                          benign: {SCALE: 1.}

           LIST:          List the current keyword default structure.  This is
                          the default when this routine is called without any
                          inputs or keywords.

           SILENT:        Suppresses output.

     $LastChangedBy: dmitchell $
     $LastChangedDate: 2025-07-29 17:09:18 -0700 (Tue, 29 Jul 2025) $
     $LastChangedRevision: 33509 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/orrery_options.pro $

(See general/spice/orrery_options.pro)

## QDERIV

[Previous Routine] [Next Routine] [List of Routines]

    Function: qderiv
      gets derivative of quaternion - assumes sign ambiguity has been fixed

    Purpose: ;
     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-16 13:14:07 -0700 (Thu, 16 May 2019) $
     $LastChangedRevision: 27244 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/qderiv.pro $

(See general/spice/qderiv.pro)

## Q_ANGULAR_VELOCITY

[Previous Routine] [Next Routine] [List of Routines]

    Function: q_angular_velocity
      av = q_angular_velocity(t,q)
    Purpose: Computer angular velocity of a rotation quaternion

    Reference:  http://www.euclideanspace.com/physics/kinematics/angularvelocity/QuaternionDifferentiation2.pdf

     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-16 13:14:07 -0700 (Thu, 16 May 2019) $
     $LastChangedRevision: 27244 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/q_angular_velocity.pro $

(See general/spice/q_angular_velocity.pro)

## SPICE_BODY_ATT

[Previous Routine] [Next Routine] [List of Routines]

    Function: spice_body_att
    Purpose:  retrieve the rotation (array or quaternion) to transfer from one frame to another frame
      This routine is is basically a wroapper for the routine cspice_pxform. cspice_pxform can fail if there are time intervals missing from the kernels.
      This routine can check for those missing intervals (using the check_objects keyword) and complete the task successfully.
      Note: time is in the last dimension  (not like tplot storage)
     ;
     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-16 13:19:05 -0700 (Thu, 16 May 2019) $
     $LastChangedRevision: 27248 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_body_att.pro $

(See general/spice/spice_body_att.pro)

## SPICE_BODY_POS

[Previous Routine] [Next Routine] [List of Routines]

    Function: SPICE_BODY_POS

    Purpose:  Returns the position of an object relative to an observer.
     This is a wrapper to the cspice routine:  CSPICE_SPKPOS
    Keywords:
      check_objects: frame or body name that the routine will check for valid times to prevent crashing.

     Author: Davin Larson
     $LastChangedBy: ali $
     $LastChangedDate: 2020-08-18 18:37:05 -0700 (Tue, 18 Aug 2020) $
     $LastChangedRevision: 29046 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_body_pos.pro $

(See general/spice/spice_body_pos.pro)

## SPICE_BODY_VEL

[Previous Routine] [Next Routine] [List of Routines]

    Function: SPICE_BODY_POS

    Purpose:  Returns the velocity of an object relative to an observer.
     This is a wrapper to the cspice routine:  CSPICE_SPKEZR
    Keywords:
      check_objects: frame or body name that the routine will check for valid times to prevent crashing.

     Author: Davin Larson
     $LastChangedBy: ali $
     $LastChangedDate: 2020-08-18 18:37:05 -0700 (Tue, 18 Aug 2020) $
     $LastChangedRevision: 29046 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_body_vel.pro $

(See general/spice/spice_body_vel.pro)

## SPICE_CRIB

[Previous Routine] [Next Routine] [List of Routines]

    Program:  SPICE_CRIB
    Purpose: This crib sheet is currently for testing/demonstration purposes only ;
    Usage:
        .run spice_crib
     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
     $LastChangedRevision: 27221 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_crib.pro $

(See general/spice/spice_crib.pro)

## SPICE_FILE_SOURCE

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
     spice_file_source
    PURPOSE:
     Provides a structure that contains information pertinent to the locaton (and downloading) of SPICE data files
    CALLING SEQUENCE:
      source=spice_file_source()
    TYPICAL USAGE:
      pathname = 'MAVEN/kernels/sclk/MVN_SCLKSCET.?????.tsc''
      sclk_kernel = file_retrieve(pathname,_extra = spice_file_source() ,/last_version)
    INPUT:
      None required.
      If default_source is provided then the relevant structure elements are copied and used in the output
    KEYWORDS:
      SET  : If set, then the values in DEFAULT_SOURCE are made permanent.
    OUTPUT:
     Structure:
      see FILE_RETRIEVE for a description of the elements

     $LastChangedBy: jimm $
     $LastChangedDate: 2017-01-28 13:02:17 -0800 (Sat, 28 Jan 2017) $
     $LastChangedRevision: 22686 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_file_source.pro $

(See general/spice/spice_file_source.pro)

## SPICE_INSTALL

[Previous Routine] [Next Routine] [List of Routines]

    program: SPICE_INSTALL

    Purpose:  Installs SPICE dlm and binary object modules.

    Note:  This routine has not been tested on all platforms. (But should be safe)

     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
     $LastChangedRevision: 27221 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_install.pro $

(See general/spice/spice_install.pro)

## SPICE_KERNEL_INFO[1]

[Previous Routine] [Next Routine] [List of Routines]

     Function: SPICE_BOD2S
     Purpose:  returns true name (string) of a body given either the CODE or an alias string
     usage:
       name = spice_bod2s(-202)
       name = spice_bod2s('MAVEN_SC_BUS')   ; name set to 'MAVEN_SPACECRAFT'

(See general/spice/spice_kernel_info.pro)

## SPICE_KERNEL_INFO[2]

[Previous Routine] [Next Routine] [List of Routines]

    Function: spice_kernel_info

    Purpose:  returns info on all load spice kernels

    Keywords:
             None

     Author: Davin Larson
     $LastChangedBy: ali $
     $LastChangedDate: 2023-05-08 19:44:08 -0700 (Mon, 08 May 2023) $
     $LastChangedRevision: 31843 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_kernel_info.pro $

(See general/spice/spice_kernel_info.pro)

## SPICE_M2Q

[Previous Routine] [Next Routine] [List of Routines]

    Function: spice_m2q
    Purpose: Convert rotation matrix (matrices) to quaternion(s)

      Note: time is in the last dimension  (not like tplot storage)
     ;
     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
     $LastChangedRevision: 27221 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_m2q.pro $

(See general/spice/spice_m2q.pro)

## SPICE_MK_READ

[Previous Routine] [Next Routine] [List of Routines]

    FUNCTION:        SPICE_MK_READ

    PURPOSE:         Reads the meta-kernel file.

    INPUTS:          The file name of the SPICE meta-kernel (mk).

    OUTPUTS:         Returns the string array of file names of SPICE/kernels to be loaded.

    KEYWORDS:

        REMOTE:      Specifies the remote server path.

        TRANGE:      Returns the time range in which they likely cover,
                     inferred from the file name.

       TFORMAT:      Default is 'YYYYMMDD'.

          LAST:      Default is 1. Loads the latest version.

        SOURCE:      Provides a structure that contains information
                     pertinent to the location (and downloading) of SPICE data files.

     NO_SERVER:      If set, not to download from the remote server.
                     Synonym for "no_download".

    CREATED BY:      Takuya Hara on 2022-06-16.

    LAST MODIFICATION:
     $LastChangedBy: hara $
     $LastChangedDate: 2023-06-09 15:27:54 -0700 (Fri, 09 Jun 2023) $
     $LastChangedRevision: 31892 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_mk_read.pro $

(See general/spice/spice_mk_read.pro)

## SPICE_POSITION_TO_TPLOT

[Previous Routine] [Next Routine] [List of Routines]

    procedure:  spice_position_to_tplot
    Usage:
      object= 'Earth'
      Observer='Sun'
      spice_postion_to_tplot,object,observer,frame=frame,

    Purpose: ;
     Author: Davin Larson
     $LastChangedBy: ali $
     $LastChangedDate: 2022-03-23 14:00:06 -0700 (Wed, 23 Mar 2022) $
     $LastChangedRevision: 30713 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_position_to_tplot.pro $

(See general/spice/spice_position_to_tplot.pro)

## SPICE_QROT_TO_TPLOT

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:  spice_qrot_to_tplot,from_frame,to_frame
    Purpose:  Obtains a unit (rotation) quaternion that can be used to rotate from one frame to another

    Purpose: ;
     Author: Davin Larson
     $LastChangedBy: ali $
     $LastChangedDate: 2022-03-23 14:00:06 -0700 (Wed, 23 Mar 2022) $
     $LastChangedRevision: 30713 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_qrot_to_tplot.pro $

(See general/spice/spice_qrot_to_tplot.pro)

## SPICE_STANDARD_KERNELS

[Previous Routine] [Next Routine] [List of Routines]

    NAME: SPICE_STANDARD_KERNELS
    USAGE:  files = spice_standard_kernels(/load)
    PURPOSE:
     Provides fully resolved standard spice kernel filenames.  Files are downloaded as needed.

     WARNING: NAIF does not follow a strict file naming convention, so this routine cannot predict changes that
     might occur in the future.  Some kernel names are hard wired because there is no reliable alternative.

     NAIF specifies a few "standard" files that must typically be loaded before for any calculations can be performed.
     These are:
        Leap second kernel   : naif????.tls  (times of leap seconds)
        PCK kernel           : pck?????.tpc  (spin axes, sizes and shapes of many solar system bodies)
        Planetary SPK kernel : de???.bsp     (ephemeris data for the planets)

     The planetary SPK kernel (de???.bsp) includes both the positions of the planetary centers of mass and the
     positions of the planetary system barycenters (planet + satellites).  This can be an important difference for
     systems where the moon mass is a significant fraction of the primary mass, like the Pluto-Charon, Earth-Moon
     and Sun-Jupiter systems.  For Mars, the difference is negligible (~1 cm).  When using integer codes, the smallest
     positive integers are reserved for barycenters: 0 (SOLAR_SYSTEM_BARYCENTER), 1 (MERCURY_BARYCENTER), ...,
     while the planetary centers of mass are: 199 (MERCURY), 299 (VENUS), 399 (EARTH), 499 (MARS), ....  It's
     up to the user to determine which center is appropriate.

     As of July 2025, the latest planetary ephemeris is de442 (released 2025-02-06).  It spans from 1550 to 2650 and
     includes improvements for Mars, Jupiter and Uranus.  Sometimes (but not always!), short versions are provided,
     for example the de442s spans from 1850 to 2150.  Sometimes there are even long versions that span tens of
     thousands of years.  New versions are typically released every few years, but there's no regular cadence.  On
     the NAIF website (https://naif.jpl.nasa.gov/pub/naif/), look at the comment file ('tech-comments', '.cmt' or
     '.mrg' file) to see the time span covered.  The hard-wired default here is de442.

     In addition, there are several optional planetary satellite ephemeris kernels:
        Mars satellite SPK kernel    : mar???.bsp
        Jupiter satellite SPK kernel : jup???.bsp
        Saturn satellite SPK kernel  : sat???.bsp
        Uranus satellite SPK kernel  : ura???.bsp
        Neptune satellite SPK kernel : nep???.bsp
        Pluto satellite SPK kernel   : plu???.bsp

     The Mars satellite kernel has long and short versions: mar099 (1600-2600) and mar099s (1995-2050).  The other
     satellite kernels have only one version.  The hard-wired default here is mar099.

     Jupiter, Saturn, Uranus and Neptune have many moons.  There are multiple satellite kernel files for each
     of these planets.  The hard-wired defaults here (jup365, sat441, ura182 and nep095) contain the largest moons.
     All of these files and their contents are subject to change without notice.  Caution!  Higher numbered versions
     of these satellite files are not necessarily updates but instead include a bunch of minor moons.

    CALLING SEQUENCE:
      files = spice_standard_kernels(/load)

    KEYWORDS:
      LOAD:       Set keyword to retrieve and load file
      MARS:       Include satellites of Mars (Phobos and Deimos)
      JUPITER:    Include largest satellites of Jupiter
      SATURN:     Include largest satellites of Saturn
      URANUS:     Include largest satellites of Uranus
      NEPTUNE:    Include largest satellites of Neptune
      PLUTO:      Include satellites of Pluto
      SOURCE:     Passed to spice_file_source: overrides default file source
      RESET:      Forces a reload of all standard kernels
      VERBOSE:    Passed to spice_file_source and spice_kernel_load
      NO_UPDATE:  Passed to spice_file_source: files are assumed to be correct if they exist

    MORE WORDS OF CAUTION:
      It can matter what order you load kernels in.  The reason is that natural and artificial satellite
      kernels as well as minor body kernels often attempt to be self contained by including kernels for one
      or more planets.  This introduces overlap with the planetary spk (de442).  Which planet kernel
      prevails?  The one that is loaded last.  For example, if you load the kernel for Comet Siding Spring,
      it will contain a snippet of the Mars kernel, superceding the much longer Mars kernel contained in the
      de442.  To solve this, load the comet kernel first, then load the de442.  A similar situation occurs
      with the Mars satellite kernel.  Currently, the mar099 and de442 kernels cover about the same time
      range, so the order doesn't matter much.  But someday it could.  This routine loads the de442 after
      the satellite kernel(s).

    OUTPUT:
     fully qualified kernel filename(s)

     $LastChangedBy: dmitchell $
     $LastChangedDate: 2025-07-14 11:23:09 -0700 (Mon, 14 Jul 2025) $
     $LastChangedRevision: 33460 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_standard_kernels.pro $

(See general/spice/spice_standard_kernels.pro)

## SPICE_TEST

[Previous Routine] [Next Routine] [List of Routines]

    Function: spice_test

    Purpose:  Tests whether the SPICE (idl/icy) module is installed
              Provides installation message if not installed

    Keywords:
             VERBOSE  (see "DPRINT")

    Returns: 1 on success; 0 on failure

    Example:
       if(spice_test() eq 0) then return
    Notes:
      Should be called in all idl spice wrapper routines

    see also:
      "SPICE_INSTALL"
      "SPICE_STANDARD_KERNELS"
      "SPICE_CRIB"

     Author: Davin Larson   (based on icy_test.pro by Peter S.)
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
     $LastChangedRevision: 27221 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_test.pro $

(See general/spice/spice_test.pro)

## SPICE_VALID_TIMES

[Previous Routine] [Next Routine] [List of Routines]

    Function:

    Purpose: ;
     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
     $LastChangedRevision: 27221 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_valid_times.pro $

(See general/spice/spice_valid_times.pro)

## SPICE_VECTOR_ROTATE

[Previous Routine] [Next Routine] [List of Routines]

    Function: SPICE_VECTOR_ROTATE
    Purpose:  Rotate a vector from one frame to another frame
    Usage:   vector_prime = spice_vector_rotate(vector,ut,from_frame,to_frame, check_objects='Frame')
    Inputs:    VECTOR:  3xN array
               UT:        N array of unix times
               FROM_FRAME:  String or id - valid SPICE FRAME
               TO_FRAME:    string or id - valid SPICE FRAME
    Output:    VECTOR_PRIME:  3xN array - vector as measured in the TO_FRAME
      Note: time is in the last dimension  (not like tplot storage)

     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2020-12-16 13:35:32 -0800 (Wed, 16 Dec 2020) $
     $LastChangedRevision: 29517 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_vector_rotate.pro $

(See general/spice/spice_vector_rotate.pro)

## SPICE_VECTOR_ROTATE_TPLOT

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: SPICE_VECTOR_ROTATE_TPLOT
    Purpose:  TPLOT wrapper routine for the function SPICE_VECTOR_ROTATE
    Usage:   SPICE_VECTOR_ROTATE_TPLOT,TPLOTNAME,TO_FRAME
    Inputs:    TPLOTNAME:   string(s) - valid tplot name(s)
               TO_FRAME:    string or id - valid SPICE FRAME
    Output:    VECTOR_PRIME:  3xN array - vector as measured in the TO_FRAME
      Note: time is in the last dimension  (not like tplot storage)

     Author: Davin Larson
     $LastChangedBy: davin-mac $
     $LastChangedDate: 2020-12-01 12:07:25 -0800 (Tue, 01 Dec 2020) $
     $LastChangedRevision: 29408 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/spice_vector_rotate_tplot.pro $

(See general/spice/spice_vector_rotate_tplot.pro)

## TIME_EPHEMERIS

[Previous Routine] [List of Routines]

     function: time_ephemeris(t)
     Purpose: conversion between unix time and ephemeris time
     Usage:   et = time_ephemeris(ut)          ; Converts from UT (unix/posix time) to ephemeris time
     Or:      ut = time_ephemeris(et,/et2ut)   ; Converts from ephemeris time to UT double precision (UNIX time)

     Warning: this routine is only accurate to about 1 millisecond and does not attempt to reflect GR effects

     Does NOT require the ICY DLM to be loaded
    Author: Davin Larson

     $LastChangedBy: ali $
     $LastChangedDate: 2025-07-09 11:12:12 -0700 (Wed, 09 Jul 2025) $
     $LastChangedRevision: 33436 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spice/time_ephemeris.pro $

(See general/spice/time_ephemeris.pro)