This page was created by the IDL library routine mk_html_help2.

Last modified: Thu Aug 6 12:53:14 2020.


Directory Listing of Routines


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 DE435 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.

  The routine was originally designed (long ago) 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.

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

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

                  If not specified, use the current system time.

KEYWORDS:
       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)

       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.

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

       EPH:       Named variable to hold structure of planetary
                  orbital ephemeris data (1900-2100).

       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: 2006-10-26 to 2020-10-26

       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 2025-08-31

       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.

       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).

       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.

       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 and spacecraft, Parker
                  spiral, and all labels.

 $LastChangedBy: dmitchell $
 $LastChangedDate: 2020-07-31 15:50:18 -0700 (Fri, 31 Jul 2020) $
 $LastChangedRevision: 28965 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/general/spice/orrery.pro $

CREATED BY:	David L. Mitchell

(See general/spice/orrery.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/tags/spedas_4_0/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/tags/spedas_4_0/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/tags/spedas_4_0/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: 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/tags/spedas_4_0/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: 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/tags/spedas_4_0/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/tags/spedas_4_0/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/tags/spedas_4_0/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/tags/spedas_4_0/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: 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/tags/spedas_4_0/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/tags/spedas_4_0/general/spice/spice_m2q.pro $

(See general/spice/spice_m2q.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: 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/tags/spedas_4_0/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: 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/tags/spedas_4_0/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 if needed.
 NOTE: this routine is in development still.
 
 NAIF specifies a few "standard" files that must typically be loaded in before for any calculations can be performed. These are:
    Leap second kernel:   (naif????.tls)  Contains times of leap seconds.   ???? contains the version number and increments by 1 with every new leap second.
    PCK kernel:           (pck?????.tpc)  Contains spin axis and size of most solar system bodies. 
    SPK kernel:           (de???.bsp)     Contains ephemeris data for the planets. Mars (499) is NOT included in most recent version!
    
 The file names and locations (and even contents) of these kernels is not standard and will change with each new release.
 
KEYWORDS:
  MARS:   
 
CALLING SEQUENCE:
  files=spice_standard_kernels(/load) 
TYPICAL USAGE:
INPUT:
  none 
KEYWORDS:
 LOAD:   Set keyword to retrieve and load file
OUTPUT:
 fully qualified kernel filename(s)

 $LastChangedBy: rlillis3 $
 $LastChangedDate: 2019-12-20 16:22:29 -0800 (Fri, 20 Dec 2019) $
 $LastChangedRevision: 28135 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/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/tags/spedas_4_0/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/tags/spedas_4_0/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: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
 $LastChangedRevision: 27221 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/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: 2019-05-11 00:00:35 -0700 (Sat, 11 May 2019) $
 $LastChangedRevision: 27221 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/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: 2020-07-07 14:08:46 -0700 (Tue, 07 Jul 2020) $
 $LastChangedRevision: 28858 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/general/spice/time_ephemeris.pro $

(See general/spice/time_ephemeris.pro)