# SPLAT_TPLOT

This page was created by the IDL library routine `mk_html_help`. For more information on this routine, refer to the IDL Online Help Navigator or type:

         ? mk_html_help

at the IDL command line prompt.

Last modified: Fri Mar 9 05:41:50 2007.

# List of Routines

- 3D_STRUCTURE
- ADD_BDIR
- APPEND_ARRAY
- AVERAGE_STR
- BITPLOT
- BYTESCALE
- CAL_BSN2
- CART_TO_SPHERE
- CDF_ATTR_EXISTS
- CDF_FILE_NAMES
- CDF_INFO
- CDF_VAR_ATTS
- CDF_VAR_EXISTS
- COLORS_COM
- CONVERT_PH_UNITS
- CONVERT_VFRAME
- CONV_UNITS
- COPY_DATA
- CROSSHAIRS
- CTIME
- CTIME_GET_EXACT_DATA
- CUTS
- C_3D
- DATA_CUT
- DATA_TO_NORMAL
- DATA_TYPE
- DAY_TO_YEAR_DOY
- DEL_DATA
- DIAG_P
- DIMEN
- DIMEN1
- DIMEN2
- DIMEN_SHIFT
- DIVIDE_DATA
- DOY_TO_MONTH_DATE
- DRAW_COLOR_SCALE
- EDIT3DBINS
- ENLARGE_PERIODIC
- EXTRACT_TAGS
- FIND_HANDLE
- FIND_STR_ELEMENT
- FNAME_TO_TIME
- GETTIME
- GET_3DT
- GET_BSN2
- GET_COLORS
- GET_DATA
- GET_FILE_NAMES
- GET_FILE_NAMES_IND
- GET_SYMM
- GET_TIMESPAN
- GET_YLIMITS
- HEATFLUX
- INTERP
- ITON
- JE_3D
- J_3D
- LIBS
- LOADALLCDF
- LOADALLHDF
- LOADCDF2
- LOADCDFSTR
- LOADCT2
- LOAD_ACE_CRIS
- LOAD_ACE_EPAM
- LOAD_ACE_MAG
- LOAD_ACE_SEPICA
- LOAD_ACE_SIS
- LOAD_ACE_SWEPAM
- LOAD_ACE_ULEIS
- LOAD_DST
- LOAD_GE_MGF
- LOAD_HKP_MFI
- LOAD_I8_MAG
- LOAD_I8_PLA
- LOAD_IG_PCI
- LOAD_KP
- LOAD_PO_PWI
- LOAD_SO_CEL
- LOAD_SO_CST
- LOAD_SO_ERN
- LOAD_WI_3DP
- LOAD_WI_EHPD
- LOAD_WI_EHSP_3DP
- LOAD_WI_ELM2
- LOAD_WI_ELPD2
- LOAD_WI_ELPD_3DP
- LOAD_WI_ELSP_3DP
- LOAD_WI_EM_3DP
- LOAD_WI_EPA
- LOAD_WI_FRM_3DP
- LOAD_WI_H0_MFI
- LOAD_WI_HKP_3DP
- LOAD_WI_MFI
- LOAD_WI_OR
- LOAD_WI_PHSP_3DP
- LOAD_WI_PLSP_3DP
- LOAD_WI_PM_3DP
- LOAD_WI_SFPD
- LOAD_WI_SFSP_3DP
- LOAD_WI_SOPD
- LOAD_WI_SOSP_3DP
- LOAD_WI_SP_MFI
- LOAD_WI_SWE
- LOAD_WI_WAV
- MAKECDF
- MAKECDF2
- MAKEGAP
- MAKEGIF
- MAKE_3DMAP
- MAKE_CDF_INDEX
- MAT_DIAG
- MINMAX
- MK_HTML_HELP2
- MPLOT
- NDIMEN
- NN
- NORMAL_TO_DATA
- N_3D
- OMNI3D
- OPLOT_ERR
- OPTIONS
- PAD
- PADPLOT
- PANGLE
- PB5_TO_TIME
- PCLOSE
- PLOT3D
- PLOT3D_COM
- PLOT3D_OPTIONS
- PLOT_MAP
- PLOT_POSITIONS
- PMPLOT
- POPEN
- POPEN_COM
- PRESTENS
- PRINTDAT
- PRINT_CDF_INFO
- PRINT_OPTIONS
- P_3D
- REDUCE_DIMEN
- SCAT_PLOT
- SETFILEENV
- SHARE_COLORS
- SMOOTH_PERIODIC
- SPEC3D
- SPECPLOT
- SPHERE_TO_CART
- STORE_DATA
- STRFILTER
- STRPLOT
- STR_ELEMENT
- SUB3D
- SUM3D
- SYMM3D
- SYMMETRY_DIR
- TIMEBAR
- TIMERANGE
- TIMESPAN
- TIME_DOUBLE
- TIME_EPOCH
- TIME_PB5
- TIME_STAMP
- TIME_STRING
- TIME_STRUCT
- TIME_TICKS
- TLIMIT
- TNAMES
- TPLOT
- TPLOT_COM
- TPLOT_FILE
- TPLOT_KEYS
- TPLOT_NAMES
- TPLOT_OPTIONS
- TPLOT_PANEL
- TPLOT_POSITIONS
- TPLOT_QUANT__DEFINE
- TPLOT_RESTORE
- TPLOT_SAVE
- TPLOT_SORT
- TRANGE_STR
- TRANSFORM_VELOCITY
- T_3D
- UNITS
- VTH_3D
- V_3D
- WI
- XLIM
- XYZ_TO_POLAR
- YLIM
- YLIMIT
- ZLIM
- _GET_EXAMPLE_DAT
- _TPLOT_DEMO
- _TPLOT_EXAMPLE

# Routine Descriptions

## 3D_STRUCTURE

[Next Routine] [List of Routines]

    NAME:
       3d_structure
    PURPOSE:
       Documentation for the 3d structure.
       This is NOT a procedure or a function. It is ONLY Documentation. don't
       try to run it!
       The 3d structure is the standard structure that contains all information
       necessary to do data analysis on a particle distribution function.
       The following is an example structure obtained from the WIND data set:

    ** Structure <1b689b0>, 29 tags, length=35304, refs=1:
       PROJECT_NAME    STRING    'Wind 3D Plasma'
       DATA_NAME       STRING    'Eesa Low'
       UNITS_NAME      STRING    'Counts'           Current Units.
       TIME            DOUBLE       8.2313292e+08   Sample start. Secs since 1970
       END_TIME        DOUBLE       8.2313292e+08   Sample End. Secs since 1970.
       INTEG_T         DOUBLE           3.0000000   Integration Time.  Seconds.
       NBINS           INT             88           number of angle bins.
       NENERGY         INT             15           number of energy bins.
       MAP             INT       Array(32, 32)      bin map (req'd only for plot3d)
       DATA            FLOAT     Array(15, 88)
       ENERGY          FLOAT     Array(15, 88)
       THETA           FLOAT     Array(15, 88)
       PHI             FLOAT     Array(15, 88)
       GEOM            FLOAT     Array(15, 88)      Req'd by convert_esa_units
       DENERGY         FLOAT     Array(15, 88)
       DTHETA          FLOAT     Array(15, 88)
       DPHI            FLOAT     Array(15, 88)
       DOMEGA          FLOAT     Array(15, 88)
       EFF             FLOAT     Array(15, 88)      Req'd by convert_esa_units
       FEFF            FLOAT     Array(15, 88)      Req'd by convert_esa_units
       MASS            DOUBLE       5.6856593e-06
       GEOMFACTOR      DOUBLE       0.00039375000   Req'd by convert_esa_units
       VALID           LONG                 1
       SPIN            LONG             17152       (Optional)
       UNITS_PROCEDURE STRING    'convert_esa_units'
       MAGF            FLOAT     Array(3)           (Optional magnetic field vec.)
       VSW             FLOAT     Array(3)           (Optional flow velocity vec.)

    The following functions will return a 3d structure:

      For the WIND data set:            ("LOAD_3DP_DATA" must be called first.)
        "GET_EL", "GET_PL","GET_EH","GET_PH","GET_PLB","GET_PHB","GET_ELB",
        "GET_EHS","GET_SF","GET_SO","GET_SFB","GET_SOB"

      For the GIOTTO data set:
        "GET_GI"

      For the CLUSTER data set:
        In Progress....

      For the FAST data set:
        In Progress....

    Once the 3d structure is obtained then it can be displayed with the following
    routines:
        "SPEC3D", "PLOT3D", "CONT3D"

    The following routines are useful for manipulating the data:
        "CONV_UNITS", "CONVERT_VFRAME", "PAD"

(See .//3d_structure.pro)

## ADD_BDIR

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

    PROCEDURE:  add_bdir,dat,source
    PURPOSE:
        Adds magnetic field direction [theta,phi] to a 3d structure
        The new structure element will be a two element vector [theta,phi]
        with the tag name 'bdir'.
    INPUT:
        dat:   3D data structure        (i.e. from 'GET_EL')
        [source] : String index that points to magnetic field data.
    Notes:
        	Magnetic field data must be loaded first.
    	See 'GET_MFI'

(See .//add_bdir.pro)

## APPEND_ARRAY

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

    PROCEDURE:	append_array, a0, a1
    PURPOSE:
    	Append an array to another array.  Can also copy an array into a
    	subset of another.
    INPUT:
    	a0:	Array to modify.
    	a1:	Array to append to, or copy into, a0.
    KEYWORDS:
    	index:	Index of a0 at which to append or copy a1.  If index is
    		greater than the number of elements of a0, then
    		a0 is enlarged to append a1. Returns the index of the first
    		element of a0 past the section copied from a1.
    	done:	If set, make a0 equal to the first index elements of a0.
    CREATED BY:	Davin Larson
    LAST MODIFIED:	@(#)append_array.pro	1.6 98/08/13

(See .//append_array.pro)

## AVERAGE_STR

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

    FUNCTION:	average_str(data, res)
    PURPOSE:
    	Average data in res second time segments.
    INPUTS:
    	DATA:	array of structures.  One element of structure must be TIME.
    	RES:	resolution in seconds.
    KEYWORDS:
    	NAN:	If set, treat the IEEE NAN value as missing data.
    CREATED BY:	Davin Larson
    LAST MODIFIED:	%W% %E%

(See .//average_str.pro)

## BITPLOT

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

    NAME:
      bitplot

    INPUT: (optional if DATA keyword is set)
        x: array of x values
        y: array of y values

    PURPOSE:
      Plots 'ON' bits for housekeeping type data.
      Can be used by "tplot".
      See "_tplot_example" and "_get_example_dat" for an example.

    KEYWORDS:
        PSYMS: array of IDL plot psym values corresponding to each bit.
              OVERPLOT: create plot without erasing previous plot.
        DI: value to be given to first bit in plot.  Default is 1.
        LIMITS: TPLOT limits structure corresponding to the variable plotted.
        DATA: TPLOT data structure corresponding to the variable plotted.

(See .//bitplot.pro)

## BYTESCALE

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

    FUNCTION:  bytescale(array)
    PURPOSE:   Takes an array or image and scales it to bytes
    INPUT:     array of numeric values.
    KEYWORDS:
       RANGE:  Two element vector specifying the range of array to be used.
            Defaults to the min and max values in the array.
       ZERO:   Forces range(0) to zero
       TOP:    Maximum byte value  (default is !d.table_size-2)
       BOTTOM: Minimum byte value  (default is 1)
       MIN_VALUE: autoranging ignores all numbers below this value
       MAX_VALUE: autoranging ignores all numbers above this value
       MISSING:  Byte value for missing data. (values outside of MIN_VALUE,
         MAX_VALUE range)  If the value is less than 0 then !p.background is used.
       LOG:    sets logrithmic scaling

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)bytescale.pro	1.22 02/04/17

(See .//bytescale.pro)

## CAL_BSN2

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

    FUNCTION:	cal_bsn2(sx,sy,sz,bx,by,bz,vmag,bow=bow)
    INPUT:
    	sx,sy,sz:	x, y, and z coodinates of spacecraft in GSE with
    			units of Re
    	bx,by,bz:	magnetic field direction
    OPTIONS:
    	bow:	structure containing {L,ecc,x0}
    		L:	standoff parameter with units of Re
    		ecc:	eccentricity of shock
    		x0:	focus location in Re

           hyperbolic bow shock, see JGR 1981, p.11401, Slavin Fig.7
           r = L/(1+ecc*cos(theta))
           1 = (x-x0-c)^2/a^2 - (y^2+z^2)/b^2
           default L = b^2/a = 23.5
                   ecc = c/a = 1.15
                   xoffset= 3
                   c = (a^2 + b^2)^.5 = L*e/(e^2-1) = 83.8
                   a = L/(e^2-1) = 72.87
                   b = L/(e^2-1)^.5 = 41.38
    PURPOSE:
    	Function returns a structure that describes the interaction of a B-field
    	with a hyperboloid bow shock model.
    	Returned structure elements include:
    		th_bn: the angle (in degrees) between shock normal and the
    			field line that passes through the spacecraft
    		l1: the distance along the field line to the shock
    		l2: the distance from a point that is missdist from the
    			spacecraft in x to the tangent point
    		d,m: the distance along x from the spacecraft to a point
    			where the B field line would be tangent to the
    			bow shock.  A postive d means that the field
    			line has already intersected the shock.  A positive
    			m indicates that the field line has not yet
    			intersected the shock.
    		intpos: position vector in GSE of point where field line
    			originating at spacecraft intersects bow shock
    	All distances are in Re.
    CREATED BY:
    	P. Schroeder
    LAST MODIFICATION:
           L. Winslow 9/15/00
    LAST MODIFICATION: %W% %E%

(See .//cal_bsn2.pro)

## CART_TO_SPHERE

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

    PROCEDURE:  cart_to_sphere, x, y, z,  r, theta, phi
    PURPOSE:
                transform from cartesian to spherical coordinates
    INPUTS:     x, y, z          (array or scalor)
    OUTPUTS:    r, theta, phi    (same as x,y,z)
    KEYWORDS:   ph_0_360:   if positive, 0<=phi<=360, if zero, -180<=phi<=180,
                            ***if negative, best guess phi range returned***
                ph_hist:   a two element array of max and min values for phi.
                            eg: if ph_0_360 is not set, and ph_hist=[-220,220]
                                then if d(phi)/dt is positive near 180, then
                                phi => phi+360 when phi passes the 180/-180
                                discontinuity until phi reaches 220.
                CO_LATITUDE:  If set theta will be in co-latitude. (0<=theta<=180)
                MIN_VALUE:
                MAX_VALUE:
    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)cart_to_sphere.pro	1.13 02/04/17

    NOTES:
       -90 < theta < 90   (latitude not co-lat)

(See .//cart_to_sphere.pro)

## CDF_ATTR_EXISTS

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

     FUNCTION: cdf_attr_exists, cdf, attrname

     PURPOSE:
         determines if a specified CDF file has an attribute with a specified name

     INPUTS:
         cdf:
             either the cdf_id of an open CDF file, or the name of a CDF file
         attrname:
             name of the attribute to be asked about

     KEYWORDS:
         scope:
             if set, return the scope of the attribute (if it is present). The scope
             may be either of the strings 'GLOBAL_SCOPE' or 'VARIABLE_SCOPE'.
             The value of this variable is only meaningful if the return value is 1.

     OUTPUTS:
         return value is 1 if yes, 0 if no

     CREATED BY: Vince Saba

     LAST MODIFICATION: @(#)cdf_attr_exists.pro	1.1 98/04/14

(See .//cdf_attr_exists.pro)

## CDF_FILE_NAMES

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

    FUNCTION: cdf_file_names
    PURPOSE:
       Returns an array of filenames within a timerange.
    USAGE:
       files=cdf_file_names(FORMAT,trange=trange,/verbose)
    INPUT:
       FORMAT is a string that will be interpreted as one of two things:
         CASE 1:
            e.g.    FORMAT = '/home/wind/dat/wi/3dp/k0/????/wi_k0_3dp*.cdf'
            if FORMAT contains * or ? then filenames are returned that match that
            pattern and for which YYYYMMDD falls within the specified timerange.
            for example:
            (UNIX only)
         CASE 2:
            e.g.    FORMAT = 'fa_k0_ees_files'
            The name of an indexfile that associates filenames with start and
            end times. If his file is not found, then the environment variable
            getenv('CDF_INDEX_DIR') is prepended and searched for.
            See "make_cdf_index" for information on producing this file.
         SPECIAL NOTE:
            If strupcase(FORMAT) is the name of an environment varible. Then
            the value of that environment variable is used instead.
    KEYWORDS:
         TRANGE:
            Two element array specifying the time range for which data files should
            be returned.  If not provided then "timerange" is called to provide
            the time range.  See also "timespan".
         NFILES:
            Named variable that returns the number of files found.
         VERBOSE:
            Set to print some useful info.
         FILEINFO:  OBSOLETE!
            Set to a named variable that will return a table of file info.
    NOTES:
         UNIX only!

(See .//cdf_file_names.pro)

## CDF_INFO

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

    NAME:  cdf_info
    FUNCTION:   cdf_info(id)
    PURPOSE:
      Returns a structure with useful information about a CDF file.
      In particular the number of file records is returned in this structure.
    INPUT:
    	id:	CDF file ID.
    CREATED BY:	Davin Larson
    LAST MODIFIED:	@(#)cdf_info.pro	1.9 02/11/01

(See .//cdf_info.pro)

## CDF_VAR_ATTS

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

    NAME:  cdf_var_atts
    FUNCTION:   cdf_var_atts(id [,varname[,attname]])
    PURPOSE:
      Returns a structure that contains the attributes of a variable within
      a CDF file. If attname is provided then it returns the value of that attribute.
    KEYWORDS:
      DEFAULT: The default value of the attribute.

    INPUT:
    	id:	CDF file ID or filename.
    CREATED BY:	Davin Larson
    LAST MODIFIED:	@(#)cdf_var_atts.pro	1.2 02/11/01

(See .//cdf_var_atts.pro)

## CDF_VAR_EXISTS

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

     FUNCTION: cdf_var_exists, cdf, varname

     PURPOSE:
         determines if a specified CDF file has a variable with a specified name

     INPUTS:
         cdf:
             either the cdf_id of an open CDF file, or the name of a CDF file
         attrname:
             name of the variable to be asked about

     KEYWORDS:

     OUTPUTS:
         return value is 1 if yes, 0 if no

     CREATED BY: Vince Saba

     LAST MODIFICATION: @(#)cdf_var_exists.pro	1.1 98/04/14

(See .//cdf_var_exists.pro)

## COLORS_COM

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

    COMMON BLOCK  colors_com
    WARNING!  Don't rely on this file to remain stable!
    USE "get_colors" to get color information.
    SEE ALSO:
      "get_colors","bytescale","loadct2"
    CREATED BY: Davin Larson
    File:      96/08/30
    Version:   1.2
    Last Mod:  colors_com.pro

(See .//colors_com.pro)

## CONVERT_PH_UNITS

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

    NAME:      convert_ph_units
    PURPOSE:
               Converts the units of the data array of ph data structures.
    CALLING SEQUENCE:      convert_ph_units,data,units
    INPUTS:    data:  a ph data structure returned by "get_ph1.pro" or "get_ph2.pro"
                      data.data is rescaled in the requested units, and
                      data.units is set to the name of the new units
               units: a string.  One of: 'COUNTS','RATE','EFLUX','FLUX','DF'

    KEYWORD PARAMETERS:
               DEADTIME: (double) specifies a deadtime: the interval during which
                         a channel plate detector is turned off to record an event.
                         data.deadtime defaults to 1e-6
    		      (and has precedence over deadtime)
    COMMON BLOCKS:   get_ph_com: contains one element: deadtime

    LAST MODIFICATION:     @(#)convert_ph_units.pro	1.1 97/04/21
    CREATED BY:            Frank Marcoline.  Patterened after other convert_*_units.pro procedures.

(See .//convert_ph_units.pro)

## CONVERT_VFRAME

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

    NAME:
    	convert_vframe

    FUNCTION:  convert_vframe ,  dat,  velocity
    PURPOSE:   Change velocity frames
    INPUT:
      dat: 3d data structure
      velocity: SW velocity vector  [VX,VY,VZ]
    OUTPUT:  3d data structure.  Data will be in a different coordinate frame.
        (data will also be in units of distrubution function.)
    KEYWORDS:
       ETHRESH:  Threshold energy for interpolation.
       BINS:     Angle bins to be used
       EVALUES:
       INTERPOLATE:  set to non-zero value to have the data evaluated
       (interpolated) at the original energy steps.

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)convert_vframe.pro	1.21 02/11/01

(See .//convert_vframe.pro)

## CONV_UNITS

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

    FUNCTION:	conv_units

    PURPOSE:	To convert from counts to any other unit which is supported.
    		This procedure is just a shell that calls whatever conversion
    		procedure is specified in data.units_procedure.
    		right now the only conversion procedures are
    		"convert_esa_units" and
    		"convert_sst_units"
    INPUT:
    	data:	A 3d data structure such as those generated by get_el, get_eh,
    		get_pl,get_ph,etc.
    		e.g. "get_el"
    	units:	The units you wish to convert to, such as eflux,flux,df,ncounts,
    		rate,nrate.
    KEYWORDS:
    	scale:	a dummy keyword, returns the scale used to convert.

    CREATED BY:	Davin Larson
    LAST MODIFICATION: 	@(#)conv_units.pro	1.8 95/11/07

(See .//conv_units.pro)

## COPY_DATA

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

    PROCEDURE:  	copy_data,  oldname, newname
    PURPOSE:	to copy a data structure
    INPUT:
    	oldname:	name associated with old data structure
    	newname:	name associated with new data structure
    KEYWORDS:
           LINK:   if set, then the data is not copied but is linked to the old
                       name.

    SEE ALSO:	"get_data",
    		"store_data"

    CREATED BY:	Davin Larson
    LAST MODIFICATION: copy_data.pro  1.10   97/05/20

(See .//copy_data.pro)

## CROSSHAIRS

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

    NAME:                  crosshairs
    PURPOSE:
    Display crosshairs on the plot window, display the data coordinates of the
    cursor position on the plot, and return the coordinates of clicked points.
    			Use the mouse buttons to control operation:
    			1: Record and print a point
    			2: Delete the previously recorded point
    			3: Quit.
    CALLING SEQUENCE:      crosshairs,x,y
    INPUTS:                x,y:  set to named variables to return the data
                                 coordinates of the cursor position where mouse
                                 button 1 was pressed.

    KEYWORD PARAMETERS:
    	COLOR:  set to a scalar byte to change the color of the crosshairs.
    		note:  you will not get the color you ask for.  it's the nature
    		of XOR graphics.  could be useful to change colors though.
    	LEGEND: set a position for the legend, in data coords.
    	DOT_CURSOR:  change the cursor to a dot.  it's smaller and makes seeing
    		the data easier.  warning:  will reset the cursor to crosshairs
    		after quitting.  if you had set your own cursor (changed from
    		the default) it'll be replaced.
    	FIX:	if crosshairs crashes  (if you Control-C out of it) then
    		you probabaly want to call crosshairs,/fix
    		all it does is calls:  device,set_graphics=3,/cursor_cross
    		but do you want to remember that line?
    		FIX repairs the changes to the X device that crosshairs made.
    	SILENT: don't print clicked points
           NOLEGEND:  don't display the legend
    OUTPUTS:       prints clicked data points to the terminal, prints the current
    		cursor position on the graphics window (or last position before
    		leaving the window)
    SIDE EFFECTS:          can mess up your display.  use crosshairs,/fix to fix.
    			can leave junk on your plot.  not recommended for use
    			if you intend to call tvrd() before reploting.
    LAST MODIFICATION:     @(#)crosshairs.pro	1.5 98/07/31
    CREATED BY:            Frank V. Marcoline
    NOTES:			Inspired by IDL's box_cursor.pro

(See .//crosshairs.pro)

## CTIME

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

    PROCEDURE:   ctime,time,y,z
    INPUT:
        time: Named variable in which to return the selected time (seconds
              since 1970)
        y:    Named variable in which to return the y value
        z:    Named variable in which to return the z value
    KEYWORDS:
        PROMPT:  Optional prompt string
        NPOINTS: Max number of points to return
        PSYM:    If set to a psym number, the cooresponding psym is plotted at
                 selected points
        SILENT:  Do not print data point information
        PANEL:   Set to a named variable to return an array of tplot panel numbers
                 coresponding to the variables points were chosen from.
        APPEND:  If set, points are appended to the input arrays,
                 instead of overwriting the old values.
        VNAME:   Set to a named variable to return an array of tplot variable names,
                 cooresponding to the variables points were chosen from.
        COLOR:   An alternative color for the crosshairs.  0<=color<=!d.n_colors-1
        SLEEP:   Sleep time (seconds) between polling the cursor for events.
                 Defaults to 0.1 seconds.  Increasing SLEEP will slow ctime down,
                 but will prevent ctime from monopolizing cpu time.
        INDS:    Return the indices into the data arrays for the points nearest the
                 recorded times to this named variable.
        VINDS:   Return the second dimension of the v or y array.
                 Thus  TIME(i) is  data.x(INDS(i))           and
                       Y(i)    is  data.y(INDS(i),VINDS(i))  and
                       V(i)    is  data.v(VINDS(i)) or data.v(INDS(i),VINDS(i))
                 for get_data,VNAME(i),data=data,INDS=INDS,VINDS=VINDS
        EXACT:   Get the time,y, and (if applicable) z values from the data
                 arrays.  If on a multi-line plot, get the value from the line
                 closest to the cursor along y.
        NOSHOW:  Do not show the plot window.
        DEBUG:   Avoids default error handling.  Useful for debugging.
        DAYS, HOURS, MINUTES, SECONDS: Sets time granularity.  For example
                 with MINUTES=1, CTIME will find nearest minute to cursor
                 position.
    PURPOSE:
       Interactively uses the cursor to select a time (or times)
    NOTES:	      If you use the keyword EXACT, ctime may run noticeablly slower.
    	      Reduce the number of time you cross panels, especially with
    	      tplots of large data sets.
    SEE ALSO:  "crosshairs"

    CREATED BY:	Davin Larson & Frank Marcoline
    LAST MODIFICATION:     @(#)ctime.pro	1.44 02/11/01
    WARNING!
      If ctime crashes, you may need to call:
      IDL> device,set_graph=3,/cursor_crosshair

(See .//ctime.pro)

## CTIME_GET_EXACT_DATA

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

    NAME:
       ctime_get_exact_data
    PROCEDURE:     ctime_get_exact_data
    PURPOSE:       Get a data structure for ctime.  if var is a string or a strarr,
                   create a structure of data structures.
                   Get the new values for hx and hy, the crosshairs position.
                   Also check the spec option.
                   ctime need never see the actual data structures.
    		All work is done with pointers to reduce data duplication
                   and increase speed.
    COMMON BLOCKS: CTIME_COMMON
    HISTORY:       First appeared in ctime version 1.29

(See .//ctime.pro)

## CUTS

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

    PROCEDURE:	cuts
    PURPOSE:	to show x cuts or y cuts of a
    		"tplot" spectrogram
    INPUT:		none
    KEYWORDS:	name:	name of the variable you want cuts for

    CREATED BY:	Peter Schroeder
    LAST MODIFICATION:	@(#)cuts.pro	1.6 98/01/29

(See .//cuts.pro)

## C_3D

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

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

##

    FUNCTION:	c_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//c_3d.pro)

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

    FUNCTION: A = data_cut(name, t)
    PURPOSE:  Interpolates data from a data structure.
    INPUT:
      name:  Either a data structure or a string that can be associated with
          a data structure.  (see "get_data" routine)
          the data structure must contain the element tags:  "x" and "y"
          the y array may be multi dimensional.
      t:   (scalar or array)  x-values for interpolated quantities.
    RETURN VALUE:
      a data array: the first dimension is the dimension of t
                    the second dimension is the dimension of name

     NOTE!!  keyword options have been temporarily removed!!!!

    KEYWORDS:
      EXTRAPOLATE:  Controls interpolation of the ends of the data. Effects:
                    0:  Default action.  Set new y data to NAN or to MISSING.
                    1:  Extend the endpoints horizontally.
                    2:  Extrapolate the ends.  If the range of 't' is
                        significantly larger than the old time range, the ends
                        are likely to blow up.
      INTERP_GAP:   Determines if points should be interpolated between data gaps,
                    together with the GAP_DIST.  IF the data gap > GAP_DIST,
                    follow the action of INTERP_GAP
                    0:  Default action.  Set y data to MISSING.
                    1:  Interpolate gaps
      GAP_DIST:     Determines the size of a data gap above which interpolation
                    is regulated by INTERP_GAP.
                    Default value is 5, in units of the average time interval:
                    delta_t = (t(end)-t(start)/number of data points)
      MISSING:      Value to set the new y data to for data gaps.  Default is NAN.

    CREATED BY:	 Davin Larson
    LAST MODIFICATION:     @(#)data_cut.pro	1.19 02/04/17
                    Added the four keywords. (fvm 9/27/95)

    (See .//data_cut.pro)

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

    FUNCTION:	data_to_normal
    PURPOSE:	convert data coordinates to normal coordinates
    INPUT:
    	datav:	data coordinates
    	s:	!AXIS structure
    KEYWORDS:
    	none

    CREATED BY: 	Frank Marcoline.  Hiested from Davin's normal_to_data.
    LAST MODIFICATION: 	@(#)data_to_normal.pro	1.2 97/01/09

    NOTE:	I think this procedure is superceded by convert_coord.

    (See .//data_to_normal.pro)

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

    FUNCTION:  data_type(x)
    PURPOSE:
       Returns the variable type (ignores dimension).
    INPUTS: x:   Any idl variable.
    OUTPUT: integer variable type:
       0 = undefined
       1 = byte
       2 = integer
       3 = long
       4 = float
       5 = double
       6 = complex
       7 = string
       8 = structure
       9 = double precision complex

    KEYWORDS:
       STRUCTURE: When set and if input is a structure, then an array
           of data types are returned.

    SEE ALSO:  "dimen", "ndimen"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)data_type.pro	1.7 00/07/05

    (See .//data_type.pro)

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

    NAME:
       day_to_year_doy
    PURPOSE:
       determines year and day of year given day since 0000 AD
    USAGE:
       day_to_year_doy,daynum,year,doy
    INPUT:
       daynum:   (long int)  day since 0 AD
    OUTPUT:
       year:     year         (0 <= year <= 14699 AD)
       doy:      day of year  (1 <= doy  <=  366)
    NOTES:
      This procedure is reasonably fast, it works on arrays and works from
      0 AD to 14699 AD

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  day_to_year_doy.pro
    VERSION:  1.2
    LAST MODIFICATION:  97/01/27

    (See .//day_to_year_doy.pro)

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

    NAME:                  del_data
    PURPOSE:
    			obsolete procedure!  use "STORE_DATA" instead
                           delete tplot variables
                           del_data calls "store_data" with the DELETE keyword set
                           let: input=['a','b','c','d','e','f']
                           then, del_data,input is the same as
                           store_data,delete=input
    CALLING SEQUENCE:      del_data,input
    INPUTS:                input:  strarr() or intarr() of tplot variables
    LAST MODIFICATION:     @(#)del_data.pro	1.4 01/10/08
    CREATED BY:            Frank Marcoline

    (See .//del_data.pro)

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

    Procedure:	diag_p, p, n, t=t, s=s
    INPUT:
    	p:	pressure array of n by 6 or a string (e.g., 'p_3d_el')
    	n:	density array of n or a string (e.g., 'n_3d_el')
    PURPOSE:
    	Returns the temperature: [Tpara,Tperp,Tperp], and
    		the unit symmetry axis s. Also returns 'T_diag' and 'S.axis'
    		for plotting purposes.

    CREATED BY:
    	Tai Phan	95-09-28
    LAST MODIFICATION:
    	95-9-29		Tai Phan

    (See .//diag_p.pro)

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

    FUNCTION:   dimen(x)
    PURPOSE:
      Returns the dimensions of an array as an array of integers.
    INPUT:  matrix
    RETURNS:  vector of dimensions of matrix.
       If the input is undefined then 0 is returned.
       if the input is a scaler then 1 is returned.

    SEE ALSO:  "dimen", "data_type", "dimen1", "dimen2"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)dimen.pro	1.6 96/12/16

    (See .//dimen.pro)

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

    FUNCTION:   dimen1
    INPUT:  matrix
    RETURNS:  scaler int:  size of first dimension  (1 if dimension doesn't exist)

    CREATED BY:	Davin Larson
    LAST MODIFICATION;	@(#)dimen1.pro	1.3 95/08/24

    (See .//dimen1.pro)

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

    FUNCTION:   dimen2
    INPUT:  matrix
    RETURNS:  scaler int:  size of second dimension  (1 if dimension doesn't exist)

    CREATED BY:	Davin Larson
    LAST MODIFICATION;	@(#)dimen2.pro	1.3 95/08/24

    (See .//dimen2.pro)

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

    FUNCTION:  dimen_shift(x,shift)
    NAME:
      dimen_shift
    PURPOSE:
      Rotate dimensions of a multidimensional array.
      This function is very similar to transpose but works on multi-dimensional
      arrays to shift the dimensions around.
      It has no effect on scalars and one dimensional arrays.
    INPUT:
      x   multi-dimensional array of any type
      shift:  1 or -1  direction of shift.
    CREATED BY: Davin Larson
    LAST MODIFICATION:	@(#)dimen_shift.pro	1.4 98/07/09

    (See .//dimen_shift.pro)

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

    PROCEDURE:	divide_data

    PURPOSE:

      Divides successive channels of SST data by powers of 'factor', to

      separate the traces. Also, optionally, multiplies data by an overall factor,

      'conv_factor', to convert units.

    INPUT:		in_name (string), the name of the input TPLOT variable
    			structure.
                   out_name (string), the name of the output TPLOT variable
    			structure.

    KEYWORDS:      factor (float), by which fluxes in successive channels are

                   	divided.
    		conv_factor (optional float), by which fluxes in all channels
    			are multiplied.

    CREATED BY:	Ted Freeman

    FILE:  divide_data.pro

    LAST MODIFIED:  @(#)divide_data.pro	1.2 99/09/01

    NOTES:	  "LOAD_3DP_DATA" and "GET_SPEC" must be called first.

    (See .//divide_data.pro)

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

    PROCEDURE:
      doy_to_month_date, year, doy, month, date
    NAME:
      doy_to_month_date
    PURPOSE:
     Determines month and date given the year and day of year.
     fast, vector oriented routine that returns the month and date given year and
     day of year (1<=doy<=366)

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  doy_to_month_date.pro
    VERSION:  1.2
    LAST MODIFICATION:  97/01/27

    (See .//doy_to_month_date.pro)

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

    PROCEDURE:   draw_color_scale
    NAME:
      draw_color_scale
    PURPOSE:
      Procedure to draw a color scale.
    INPUTS: (none)
    KEYWORDS:
    	RANGE:		Array of two giving the range in data values the scale
    	        	corresponds to.
           BRANGE: 	intarr(2) giving the range in color map values the
    			scale spans.
           LOG:		If set, make scale logarithmic.
    	CHARSIZE:	Character size to be used for scale.
    	YTICKS:		Functions like IDL plot yticks keyword.  Used to set
    			number of scale annotations.
    	POSITION:	fltarr(4) giving the position of the color scale in the
    			window in the form (x0,y0,x1,y1).
    	OFFSET:		fltarr(2) giving the offsets from the right side of the
    			current plot for calculating the x0 and x1 positions
    			of the color scale. In device units. Ignored if
    			POSITION keyword is set.
    	TITLE:		String title for color scale.
    CREATED BY:	Davin Larson
    LAST MODIFIED:	@(#)draw_color_scale.pro	1.16 01/06/25

    (See .//draw_color_scale.pro)

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

    PROCEDURE:  edit3dbins,dat,bins
    PURPOSE:   Interactive procedure to produce a bin array for selectively
        turning angle bins on and off.  Works on a 3d structure (see
        "3D_STRUCTURE" for more info)

    INPUT:
       dat:  3d data structure.  (will not be altered)
       bins:  a named variable in which to return the results.
    KEYWORDS:
       EBINS:     Specifies energy bins to plot.
       SUM_EBINS: Specifies how many bins to sum, starting with EBINS.  If
                  SUM_EBINS is a scaler, that number of bins is summed for
                  each bin in EBINS.  If SUM_EBINS is an array, then each
                  array element will hold the number of bins to sum starting
                  at each bin in EBINS.  In the array case, EBINS and SUM_EBINS
                  must have the same number of elements.
    SEE ALSO:  "PLOT3D" and "PLOT3D_OPTIONS"
    CREATED BY:	Davin Larson
    FILE: edit3dbins.pro
    VERSION:  1.14
    LAST MODIFICATION: 98/01/16

    (See .//edit3dbins.pro)

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

    NAME:
    	enlarge_periodic
    FUNCTION:   enlarge_periodic
    INPUT:   image   (On the surface of a sphere)
    PURPOSE: enlarges a 2 dimensional matrix by n elements on each side
       It assumes the array has spherical boundary conditions.
    OUTPUT:  enlarged image array
    NOTES:   Called from function: 'SMOOTH_PERIODIC'

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)smooth_periodic.pro	1.5 95/10/04

    (See .//smooth_periodic.pro)

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

    PROCEDURE:  extract_tags, newstruct, oldstruct
    PURPOSE: takes the named tag elements from oldstruct and puts them into
       newstruct.  This procedure is very useful for creating a structure that
       can be passed onto the PLOT or OPLOT subroutines using the _EXTRA keyword.
       If no tag keywords are included then all tag elements of oldstruct are
       added to newstruct.  The mode keyword PRESERVE is used to prevent the
       overwritting of an existing keyword.
    INPUTS:
      newstruct:  new structure to be created or added to.
      oldstruct:  old structure from which elements are extracted.
    KEYWORDS:  Only one of the following should be given:;
     (TAG KEYWORDS)
      TAGS:  array of strings.  (tag names) to be taken from oldstruct and put in
          newstruct
      EXCEPT: array of strings.  Tag names not to be copied from old to new.
      OPLOT:  (flag)  If set, then TAGS is set to an array of valid keywords
         for the OPLOT subroutine.
      PLOT:   (flag)  If set, then TAGS is set to an array of valid keywords
         for the PLOT subroutine.
      CONTOUR: (flag) If set, then TAGS is set to an array of valid keywords
         for the CONTOUR procedure.   (might not be complete)
    If no KEYWORDS are set then all elements of oldstruct are put into newstruct
      (MODE KEYWORDS)
      PRESERVE: (flag) Prevents the overwritting of an existing, non-null keyword.
         Adds tags to newstruct that were not already there, or if they were there
         and their values were either "" or 0.
    CREATED BY:	Davin Larson
    FILE:  extract_tags.pro
    VERSION  1.21
    LAST MODIFICATION: 02/04/17

    (See .//extract_tags.pro)

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

    FUNCTION:  find_handle(name)

    PURPOSE:
       Returns the index associated with a string name.
       This function is used by the "TPLOT" routines.

    INPUT:     name  (scalar string)
        name can also be the corresponding integer index to a TPLOT quantity,
        in which case name will be converted to the string handle.

    RETURN VALUE:   tplot index. (0 if not found)

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)find_handle.pro	1.14 99/02/26

    (See .//find_handle.pro)

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

     **** OBSOLETE!!! Please use "str_element"instead! ***

    FUNCTION:  find_str_element
    PURPOSE:  find an element within a structure
     Input:
       struct,  generic structure
       name,    string  (tag name)
     Purpose:
       Returns index of structure tag.
       Returns -1 if not found
       Returns -2 if struct is not a structure
    KEYWORDS:
      If VALUE is set to a named variable then  the value of that element is
       returned in it.

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)find_str_element.pro	1.6 95/10/06

    (See .//find_str_element.pro)

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

    PROCEDURE:	fname_to_time, fname, time
    PURPOSE:
    	To translate the name of a standard WIND data file into the starting
    	time of the data.
    INPUT:
    	fname: filename (string) to be translated
    	time: variable in which to return time (double)

    CREATED BY:	Peter Schroeder
    LAST MODIFICATION:	%W% %E%

    (See .//fname_to_time.pro)

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

    FUNCTION:  gettime(x)
    INPUTS:   x: Null or double or string or integer
    OUTPUT:   double,  seconds since Jan 1, 1970
    Examples:
      t = gettime('95-7-4/12:34')
      t = gettime('12:34:56')     (get time on reference date)
      t = gettime(t+300.)         (assumes t is a double)
      t = gettime(10)             (t = 10 am on reference date)
      t = gettime(/key)           (prompts user for time on reference date)
      t = gettime(key='Enter time: ')
      t = gettime(/curs)          (select time using cursor in tplot routine)
    KEYWORDS:
       KEYBOARD:  If non-zero then user is prompted to enter a time.  If KEYBOARD
          is a string then that string is used as a prompt.
       CURSOR:  if non-zero then user can select a time with the cursor.
       VALUES:  if cursor keyword set, returns data values for time chosen.
       REFDATE:  Sets the reference date if REFDATE is a string with
           format: "yyyy-mm-dd".

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)gettime.pro	1.17 98/08/02

    (See .//gettime.pro)

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

    PROGRAM:	get_3dt(funct,get_dat,ERANGE=erange,BINS=bins,NAME=name)
    INPUT:
    	funct:	function,	function that operates on structures generated
    					by get_pl, get_el, etc.
    				e.g. "get_el"

    				funct   = 'n_3d','j_3d','v_3d','p_3d','t_3d',
    					  'vth_3d', or 'c_3d'
    				"n_3d"
    				"j_3d"
    				"v_3d"
    				"p_3d"
    				"t_3d"
    				"vth_3d"
    				"c_3d"
    	get_dat:function,	function that returns 3d data structures
    				function name must be "get_"+"get_dat"
    				get_dat = 'pl' for get_pl,
    				get_dat = 'el' for get_el, etc.
    KEYWORDS:
    	erange:	fltarr(2),	optional, min,max energy bin numbers for integration
    	bins:	bytarr(nbins),	optional, angle bins for integration, see edit3dbins.pro
    				0,1=exclude,include,  nbins = temp.nbins
    	name:	string		New name of the Data Quantity
    				Default: funct+'_'+get_dat
           times:  dblarr(1or2)or  Specifies start time (and end time)
                   strarr(1or2)
           index:  lonarr(1 or 2)  Specifies starting index (and ending index)
                                   keyword time overrides keyword index
    PURPOSE:
    	To generate time series data for "tplot"
    NOTES:
    	Program names time series data to funct+"_"+get_dat.
    		See "tplot_names".

    CREATED BY:    J.McFadden
    LAST MODIFICATION:  01/05/09
    FILE:   @(#)get_3dt.pro	1.13

    (See .//get_3dt.pro)

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

    PROGRAM:	get_bsn2,PNAME=pname,BNAME=bname,VNAME=vname,BOW=bow,
    			intpos=intpos

    INPUT OPTIONS
    	pname:	string,		Name of orbital position structure
    				Default is 'wi_pos'
    	bname:	string,		Name of magnetic field structure
    				Default is 'wi_B3'
    	vname:  string,		Name of solar wind velocity structure
    				Default is 'wi_pm_Vp'
    	bow:	structure	Bow Shock parameters
    				Default bow={standoff:23.5,eccentricity:1.15,x_offset:3.0}
    PURPOSE:
    	Generates tplot structures for intersection of Bow Shock and s/c B-field line.
    	Generates the following structures:
                   th_bn: the angle (in degrees) between shock normal and the
                           field line that passes through the spacecraft
                   l1: the distance along the field line to the shock
                   l2: the distance from a point that is missdist from the
                           spacecraft in x to the tangent point
                   d,m: the distance along x from the spacecraft to a point
                           where the B field line would be tangent to the
                           bow shock.  A positive d means that the field
                           line has already intersected the shock.  A positive
    			m indicates that the field line has not yet intersected
                           the shock.
           All distances are in Re. l1 and l2 are negative if the field line is
    	anti-parallel to the vector connecting the spacecraft and the point
    	of field line intersection.
    OPTIONAL OUTPUT:
    	intpos:	array of position vectors giving points where bow shock
    		intersects B field line that passes through spacecraft
    CREATED BY:
    	P.Schroeder
    LAST MODIFICATION:
    	@(#)get_bsn2.pro	1.5 02/04/17

    (See .//get_bsn2.pro)

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

    FUNCTION:    get_colors
    PURPOSE:   returns a structure containing color pixel values
    INPUT:    none
    KEYWORDS:
       NOCOLOR:  forces all colors to !d.table_size-1.

    Written by: Davin Larson    96-01-31
    FILE: get_colors.pro
    VERSION:  1.2
    LAST MODIFICATION: 99/04/07

    (See .//get_colors.pro)

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

    PROCEDURE:  get_data , name, time, data, values
    PURPOSE:
       Retrieves the data and or limit structure associated with a name handle.
       This procedure is used by the "TPLOT" routines.
    INPUT:  name    scalar string or index of TPLOT variable
            time	 named variable to return time values.
            data    named variable to return data (y) values.
            values  named variable to return additional (v) values.
    KEYWORDS:
       DATA:   named variable to hold the data structure.
       LIMITS: named variable to hold the limits structure.
       DLIMITS: named variable to hold the default limits structure.
       ALIMITS: named variable to hold the combined limits and default limits
                structures.
       DTYPE: named variable to hold the data type value.  These values are:
    		0: undefined data type
    		1: normal data in x,y format
    		2: structure-type data in time,y1,y2,etc. format
    		3: an array of tplot variable names
       PTR:   named variable to hold pointers to data structure.
       INDEX:  named variable to hold the name index.  This value will be 0
         if the request was unsuccessful.

    SEE ALSO:	"STORE_DATA", "TPLOT_NAMES", "TPLOT"

    CREATED BY:	Davin Larson
    MODIFICATION BY: 	Peter Schroeder
    LAST MODIFICATION:	@(#)get_data.pro	1.28 02/04/17

    (See .//get_data.pro)

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

    PROCEDURE:  get_file_names,  fnames
    PURPOSE:
       Gets an array of filenames within a time range
    INPUT:
       fnames:  named variable in which the output array of filenames is placed.
    KEYWORDS:
       TIME_RANGE: Two element vector (double or string) specifying the time range.
         If time range is not set, then "GET_TIMESPAN" will be called
         to get a time range.
       MASTERFILE: Use this keyword to pass in one of the following:
    	1) Name of a masterfile that contains times and associated
    	     	filenames.  The file should have the format:
    yyyy-mm-dd/hh:mm:ss   yyyy-mm-dd/hh:mm:ss   fullpathfilename
         		with one line for each file.
    	     (Hint: for CDF files, the masterfile can be created using the
    	     UNIX program 'kpdfile' or the IDL procedure "MAKE_CDF_INDEX".)
    	2) Full path/file names with wildcard characters to search for
    		relevant files.  Input should be in the form:
    		/path/xxx* for files of form /path/xxx_date.
    	3) The name of a previously defined environment variable containing
    		data in the form of 1 or 2 above.
       ROOT_DIR:   Optional root_directory of the masterfile.  This will properly
          manage operating system dependancies.

    CREATED BY:	Davin Larson
    MODIFIED BY:	Peter Schroeder
    VERSION:	1.26 00/10/04 get_file_names.pro

    (See .//get_file_names.pro)

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

    PROCEDURE:  get_file_names_ind,  fnames
    PURPOSE:
       Gets an array of filenames within a masterfile within a time range
    INPUT:
       fnames:  named variable in which the output array of filenames is placed.
    KEYWORDS:
       TIME_RANGE: Two element vector (double or string) specifying the time range.
         If time range is not set, then "GET_TIMESPAN" will be called
         to get a time range.
       MASTERFILE: Name of a masterfile that contains times and associated
         filenames.  The file should have the format:
    yyyy-mm-dd/hh:mm:ss   yyyy-mm-dd/hh:mm:ss   fullpathfilename
         with one line for each file.
         (Hint: for CDF files, the masterfile can be created using the
         UNIX program 'kpdfile' or the IDL procedure "MAKE_CDF_INDEX".)
       ROOT_DIR:   Optional root_directory of the masterfile.  This will properly
          manage operating system dependancies.
       NO_DUPLICATES:  (N;  integer)
          when set the first N characters of file names are compared and only
          the highest version is returned.

    CREATED BY:	Davin Larson
    VERSION:	@(#)get_file_names_ind.pro	1.1 97/06/23

    (See .//get_file_names_ind.pro)

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

    PROCEDURE:	get_symm
    PURPOSE:	Gets symmetry direction of magnetic field
    INPUT:
    	none
    KEYWORDS:
    	use_mag:
    	use_q:
    	use_dir:
    	time:
    	stheta:
    	sphi:

    CREATED BY: 	Davin Larson
    LAST MODIFICATION:	@(#)get_symm.pro	1.5 95/08/24

    (See .//get_symm.pro)

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

    PROCEDURE:	get_timespan
    PURPOSE:	To get timespan from tplot_com or by using timespan, if
    		tplot time range not set.
    INPUT:
    	t, actually returned to you
    KEYWORDS:
    	none

    SEE ALSO:	"timespan"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)get_timespan.pro	1.9 97/06/02

    (See .//get_timespan.pro)

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

    PROCEDURE:  get_ylimits, datastr, limits, trg
    PURPOSE:
       Calculates appropriate ylimits for a string array of "TPLOT" variables
       to be plotted in the same panel.
    INPUT:  datastr	string array of TPLOT variables
    	 limits		limits structure to be modified (usually the limits
    			structure of the TPLOT variable whose data
    			field is a string array of TPLOT variables)
    	 trg		time range over which to calculate the limits;
    			double[2]
    CREATED BY:	Peter Schroeder
    LAST MODIFIED:	%W% %E%

    (See .//get_ylimits.pro)

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

    FUNCTION:	heatflux
    PURPOSE:	Calulates heatlux from a 3dimensional data structure such as
    		those generated by get_el,get_pl,etc.
    		e.g. "get_el"
    INPUT:
    	dat:	A 3d data structure.
    KEYWORDS:
    	esteprange:	the energy step range to use, default is full range
    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)heatflux.pro	1.5 95/10/06

    (See .//heatflux.pro)

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

    FUNCTION:   interp(y,x,u)
    PURPOSE:
      Linearly Interpolates vectors with an irregular grid.
      INTERP is functionally the same as INTERPOL, however it is typically
      much faster for most applications.
    USAGE:
      result = interp(y,x,u)
    INPUTS:
           Y:      The input vector can be any type except string.

           X:      The absicissae values for Y.  This vector must have same # of
                   elements as Y.  The values MUST be monotonically ascending
                   or descending.

           U:      The absicissae values for the result.  The result will have
                   the same number of elements as U.  U does not need to be
                   monotonic.
    KEYWORDS:
      NO_CHECK_MONOTONIC:   set this keyword to skip the check for monotonic data.
      INDEX:  Set to named variable to return the index of the closest x less than u.
          (same dimensons as u)
      NO_EXTRAPOLATE:  Set this keyword to prevent extrapolation.
      INTERP_THRESHOLD:  Set to minimum allowed gap size.

    CREATED BY:	Davin Larson  4-30-96
    FILE:  interp.pro
    VERSION:  1.15
    LAST MODIFICATION:  02/04/17

    (See .//interp.pro)

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

    NAME:                  iton
    PURPOSE:
                           Convert an index or array of indicies to data names.
                           This exits because it is not always reasonable to make
                           a program tell the difference between a data array
                           and an index array, and because not all programs
                           accept indicies as inputs instead of data names.
    CALLING SEQUENCE:      names=iton(ind)
    INPUTS:                ind:  an index or array of indicies
    OPTIONAL INPUTS:       none
    KEYWORD PARAMETERS:    none
    OUTPUTS:               a data name or array of data names
    OPTIONAL OUTPUTS:      none
    COMMON BLOCKS:         tplot_com
    SIDE EFFECTS:          none
    EXAMPLE:               for i=6,13 do store_data,iton(6),/delete
    LAST MODIFICATION:     @(#)iton.pro	1.5 97/06/11
    CREATED BY:            Frank Marcoline

    (See .//iton.pro)

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

    FUNCTION:	je_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//je_3d.pro)

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

    FUNCTION:	j_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//j_3d.pro)

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

    Name: libs
    Purpose:
      Displays location of source files.

    Usage:
      libs,string  ; string is the name of an IDL source file.
                     It may contain wildcard characters
    Restrictions:
       UNIX only

    (See .//libs.pro)

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

    PROCEDURE: loadallcdf
    USAGE:
      loadallcdf,  FORMAT
    PURPOSE:
      Loads selected CDF file variables into a data structure.
      VARYing data is returned through the keyword: DATA.
      NOVARY data is returned through the keyword:  NOVARDATA.
    INPUT:
      FORMAT is a string (i.e. 'wi_k0_3dp_files') that specify the type of
      files to be searched for.  see "cdf_file_names" for more info.
    KEYWORDS:  (all keywords are optional)
      FILENAMES:   string (array); full pathname of file(s) to be loaded.
         (INDEXFILE, ENVIRONVAR, MASTERFILE and TIME_RANGE are ignored
         if this is set.)
      TIME_RANGE:  Two element vector specifying time range (default is to use
         trange_full; see "TIMESPAN" or "TIMERANGE" for more info)

      CDFNAMES:    Names of CDF variables to be loaded. (string array)
      TAGNAMES:	String array of structure tag names.
      DATA:        Named variable that data is returned in.
      RESOLUTION:	Resolution in seconds to be returned.

      NOVARNAMES:  Names of 'novary' variables to be loaded
      NOVARDATA:   Named variable that 'novary' data is returned in.

      TPLOT_NAME:  "TPLOT" string name. If set then a tplot variable is created.
         Individual elements can be referred to as 'NAME.ELEMENT'
      CARR_FILE:	Load Carrington rotation files.

    SEE ALSO:
      "loadcdf","loadcdfstr","makecdf","make_cdf_index","get_file_names","
    VERSION:  02/04/19  loadallcdf.pro  1.27
    Created by Davin Larson,  August 1996

    (See .//loadallcdf.pro)

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

    PROCEDURE: loadallhdf
    PURPOSE:
      Loads selected HDF file variables into a data structure.
    KEYWORDS:
      VDATANAME:   (Required) name of VData set to be retrieved from HDF file.
      (following keywords are optional)
      FILENAMES:   string (array); full pathname of file(s) to be loaded.
         (INDEXFILE, ENVIRONVAR, MASTERFILE and TIME_RANGE are ignored
         if this is set.)

      MASTERFILE:  Full Pathname of indexfile or name of environment variable
         giving path and filename information as defined in "get_file_names".
         (INDEXFILE and ENVIRONVAR are ignored if this is set)

      INDEXFILE:   File name (without path) of indexfile. This file
         should be located in the directory given by ENVIRONVAR.  If not given
         then "PICKFILE" is used to select an index file. see "make_cdf_index" for
         information on producing this file.

      ENVIRONVAR:  Name of environment variable containing directory of indexfiles
         (default is 'CDF_INDEX_DIR')

      TIME_RANGE:  Two element vector specifying time range (default is to use
         trange_full; see "TIMESPAN" or "GET_TIMESPAN" for more info)

      HDFNAMES:    Names of HDF variables to be loaded. (string array)
      TAGNAMES:    String array of structure tag names.
      DATA:        Named variable that data is returned in.

      TPLOT_NAME:  "TPLOT" string name. If set then a tplot variable is created.
         Individual elements can be referred to as 'NAME.ELEMENT'

    VERSION:  @(#)loadallhdf.pro	1.1 00/01/20
    Created by Peter Schroeder, January 2000

    (See .//loadallhdf.pro)

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

    PROCEDURE:	loadcdf2
    PURPOSE:
       Loads one type of data from specified cdf file.
    INPUT:
    	CDF_file:	the file to load data from  (or the id of an open file)
    	CDF_var:	the variable to load
    	x:		the variable to load data into

    KEYWORDS:
    	zvar:	 	must be set if variable to be loaded is a zvariable.
           append:         appends data to the end of x instead of overwriting it.
           nrecs:          number of records to be read.
    	no_shift:	if set, do not perform dimen_shift to data.
    	rec_start:	CDF record number to begin reading.

    CREATED BY:	Jim Byrnes, heavily modified by Davin Larson (was loadcdf)
    MODIFICATIONS:
      96-6-26  added APPEND keyword
    LAST MODIFICATION:	@(#)loadcdf2.pro	1.5 98/08/13

    (See .//loadcdf2.pro)

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

    PROCEDURE:	loadcdfstr
    PURPOSE:
      loads data from specified cdf file into a structure.
    INPUT:
    	x:		A named variable to return the structure in
    	novardata:	A named variable to return the non-varying
    			data.

    KEYWORDS:
           FILENAMES:  [array of] CDF filename[s].  (or file id's)
    	PATH:	    CDF file path.
           VARNAMES:   [array of] CDF variable name[s] to be loaded.
    	NOVARNAMES: [array of] CDF non-varying field names.
           TAGNAMES:   optional array of structure tag names.
    	RESOLUTION: resolution to return in seconds.
    	APPEND:     if set, append data to the end of x.
           TIME:     If set, will create tag TIME using the Epoch variable.
    SEE ALSO:
      "loadcdf2", "loadallcdf", "print_cdf_info","make_cdf_index"

    CREATED BY:	Davin Larson
    MODIFICATIONS:
    LAST MODIFICATION:	@(#)loadcdfstr.pro	1.22 02/04/17

    (See .//loadcdfstr.pro)

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

    PROCEDURE loadct2, colortable

    KEYWORDS:
       FILE:  Color table file
              Uses the environment variable IDL_CT_FILE to determine
              the color table file if FILE is not set.
    common blocks:
       colors:      IDL color common block.  Many IDL routines rely on this.
       colors_com:
    See also:
       "get_colors","colors_com","bytescale"

    Created by Davin Larson;  August 1996
    Version:           1.4
    File:              00/07/05
    Last Modification: loadct2.pro

    (See .//loadct2.pro)

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

    PROCEDURE:     load_ace_cris
    PURPOSE:
       loads ACE CRIS Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_cris.pro	1.1 00/01/20

    (See .//load_ace_cris.pro)

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

    PROCEDURE:     load_ace_epam
    PURPOSE:
       loads ACE EPAM Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_epam.pro	1.1 00/01/20

    (See .//load_ace_epam.pro)

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

    PROCEDURE:     load_ace_mag
    PURPOSE:
       loads ACE MAG Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
      POLAR:	Computes B field and SC position in polar coordinates.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_mag.pro	1.2 02/04/12

    (See .//load_ace_mag.pro)

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

    PROCEDURE:     load_ace_sepica
    PURPOSE:
       loads ACE SEPICA Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_sepica.pro	1.1 00/01/20

    (See .//load_ace_sepica.pro)

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

    PROCEDURE:     load_ace_sis
    PURPOSE:
       loads ACE SIS Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_sis.pro	1.1 00/01/20

    (See .//load_ace_sis.pro)

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

    PROCEDURE:     load_ace_swepam
    PURPOSE:
       loads ACE SWEPAM (Ion) Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
      POLAR:	Computes proton velocity and SC position in polar coordinates.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_swepam.pro	1.3 02/04/12

    (See .//load_ace_swepam.pro)

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

    PROCEDURE:     load_ace_uleis
    PURPOSE:
       loads ACE ULEIS Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (String) full filename of master file.
    SEE ALSO:
      "loadallhdf"

    CREATED BY:    Peter Schroeder
    LAST MODIFIED: @(#)load_ace_uleis.pro	1.1 00/01/20

    (See .//load_ace_uleis.pro)

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

    PROCEDURE:	load_dst
    PURPOSE:
       loads DST data from a DST text file

    INPUTS:
      none, but will call "timespan" if time_range is not already set.

    KEYWORDS:
      time_range:	2 element vector specifying the time range.

    CREATED BY:	Peter Schroeder
    LAST MODIFIED: @(#)load_dst.pro	1.6 02/11/01

    (See .//load_dst.pro)

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

    PROCEDURE:	load_ge_mgf
    PURPOSE:
       loads GEOTAIL MAGNETOMETER Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time range is not already set.
    KEYWORDS:
      POLAR:       Also computes the B field in polar coordinates.
      TIME_RANGE:  2 element vector specifying the time range
      DATA:        Data returned in this named variable
    RESTRICTIONS:
      This routine expects to find the master file: 'ge_k0_mgf_files'
      in the directory specified by the environment variable: 'CDF_DATA_DIR'
      See "make_cdf_index" for more info.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_ge_mgf.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_ge_mgf.pro)

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

    PROCEDURE:	load_hkp_mfi
    PURPOSE:
    	Creates TPLOT magnetic field variables from 3DP housekeeping data.
    	To be used when key parameter file is not available.
    INPUTS:
    	none
    KEYWORDS:
    	none
    NOTES:
    	3DP housekeeping data gives direction of magnetic field only.  A
    	magnitude of 1 is assumed to create these variables.
    CREATED BY:	Peter Schroeder
    LAST MODIFIED:	%W% %E%

    (See .//load_hkp_mfi.pro)

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

    PROCEDURE:	load_i8_mag
    PURPOSE:
       loads IMP-8 magnetometer key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
      DATA:	returns data structure
    RESTRICTIONS:
      This routine expects to find the master file: 'i8_k0_mag_files'
      In the directory specified by the environment variable: 'CDF_DATA_DIR'
      See "make_cdf_index" for more info.

    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_i8_mag.pro
    LAST MODIFICATION: 02/04/12

    (See .//load_i8_mag.pro)

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

    PROCEDURE:	load_i8_pla
    PURPOSE:
       loads IMP-8 Plasma Experiment key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
      DATA:	returns data structure
    RESTRICTIONS:
      This routine expects to find the master file: 'i8_k0_pla_files'
      In the directory specified by the environment variable: 'CDF_DATA_DIR'
      See "make_cdf_index" for more info.

    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_i8_pla.pro
    LAST MODIFICATION: 02/04/12

    (See .//load_i8_pla.pro)

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

    PROCEDURE:	load_ig_pci
    PURPOSE:
       loads INTERBALL Ground key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
    SEE ALSO:
      "make_cdf_index"

    CREATED BY:	Davin Larson
    FILE:  load_wi_epa.pro
    LAST MODIFICATION: 96/08/23

    (See .//load_ig_pci.pro)

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

    PROCEDURE:	load_kp
    PURPOSE:
       Loads Kp and ap data from a text file
       Variables stored include:
    	Kp: Kp index (multiplied by 10)
    	ap: ap index
    	Sol_Rot_Num: Bartels Solar Rotation Number
    	Sol_Rot_Day: Number of day within Bartels 27-day cycle
    	Kp_Sum: Sum of the eight Kp indices for the day
    	ap_Mean: Mean of the eight ap indices for the day
    	Cp: Cp or Planetary Daily Character Figure
    	C9: Conversion of Cp to the 0-9 range
    	Sunspot_Number: International Sunspot Number
    	Solar_Radio_Flux: Ottawa 10.7-cm Solar Radio Flux Adjusted to 1 AU
    	Flux_Qualifier: "0" indicates flux required no adjustment.
    		"1" indicates flux required adjustment for burst
    		in progress at time of measurement.  "2" indicates a flux
    		approximated by either interpolation or extrapolation.
    		"3" indicates no observation.

    INPUTS:
      none, but will call "timespan" if time_range is not already set.

    KEYWORDS:
      time_range:	2 element vector specifying the time range.

    CREATED BY:	Peter Schroeder
    LAST MODIFIED: @(#)load_kp.pro	1.1 99/01/14

    (See .//load_kp.pro)

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

    PROCEDURE:	load_po_pwi
    PURPOSE:
      Loads Polar Plasma Wave Instrument key parameter data into "tplot" variables.

    INPUTS:
       none, but will call "timespan" if time range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range

    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_po_pwi.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_po_pwi.pro)

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

    PROCEDURE:	load_so_cel
    PURPOSE:
       loads SOHO CEL key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
      MASTERFILE:  (string) full filename of master index file

    CREATED BY:	Davin Larson
    FILE:  load_so_cel.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_so_cel.pro)

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

    PROCEDURE:	load_so_cst
    PURPOSE:
       loads SOHO CST key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range

    CREATED BY:	Davin Larson
    FILE:  load_so_cst.pro
    LAST MODIFICATION: 97/11/20

    (See .//load_so_cst.pro)

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

    PROCEDURE:	load_so_ern
    PURPOSE:
       loads SOHO ERN key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_so_ern.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_so_ern.pro)

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

    PROCEDURE:	load_wi_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      POLAR:       Computes polar coordinates if set.
      TIME_RANGE:  2 element vector specifying the time range.
      VTHERMAL:	if nonzero, calculates ion thermal velocities.
      RESOLUTION:	Returns data at a given time resolution.  In seconds.
      MASTERFILE:	(String) full filename of master file.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_3dp.pro
    LAST MODIFICATION: 02/04/19

    (See .//load_wi_3dp.pro)

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

    PROCEDURE:	load_wi_ehpd
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'ehpd'

    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_ehpd.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_ehpd.pro)

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

    PROCEDURE:	load_wi_ehsp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:	(string) full filename of master file.
      PREFIX:	Prefix for tplot variables. Default is 'ehsp'
      RESOLUTION:	Resolution to be returned in seconds.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_ehsp_3dp.pro
    LAST MODIFICATION: 01/10/08

    (See .//load_wi_ehsp_3dp.pro)

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

    PROCEDURE:	load_wi_elm2
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'el_mom'

    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    LAST MODIFIED: @(#)load_wi_elm2.pro	1.3 99/05/27

    (See .//load_wi_elm2.pro)

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

    PROCEDURE:	load_wi_elpd_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range
    RESTRICTIONS:
      This routine expects to find the master file: 'wi_elsp_3dp_files'
      In the directory specified by the environment variable: 'CDF_INDEX_DIR'
      See "make_cdf_index" for more info.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_elpd2.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_elpd2.pro)

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

    PROCEDURE:	load_wi_elpd_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      NO_PLOT:	Suppresses the display of the summary plot.
      MASTERFILE:	(string) full filename of master file.
      PREFIX:	(string) prefix for returned TPLOT variables.  Default is
    		'elpd'
      RESOLUTION:	Resolution to return in seconds.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_elpd_3dp.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_elpd_3dp.pro)

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

    PROCEDURE:	load_wi_elsp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'elsp'
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_elsp_3dp.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_elsp_3dp.pro)

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

    PROCEDURE:	load_wi_em_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'wi_em_'
      POLAR:	If nonzero, compute velocities in polar coordinates.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_em_3dp.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_em_3dp.pro)

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

    PROCEDURE:	load_wi_epa
    PURPOSE:
       loads WIND Energetic Particle Analyser key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
    		none
    SEE ALSO:
      "make_cdf_index"

    CREATED BY:	Davin Larson
    FILE:  load_wi_epa.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_epa.pro)

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

    PROCEDURE:	load_wi_frm_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'wi_frm'
      RESOLUTION:	Resolution of data in seconds.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    FILE:  load_wi_frm_3dp.pro
    LAST MODIFICATION: 97/02/26

    (See .//load_wi_frm_3dp.pro)

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

    PROCEDURE:	load_wi_h0_mfi
    PURPOSE:
       loads WIND MAGNETOMETER high resolution data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
      POLAR:       Also computes the B field in polar coordinates.
      DATA:        Data returned in this named variable.
      HOUR:	Load hourly averages instead of 3 second data.
      MINUTE:	Load 60 second averages instead of 3 second data.
      NODATA:	Returns 0 if data exists for time range, otherwise returns 1.
      GSM:		If set, GSM data is retrieved.
      PREFIX:	(string) prefix for tplot variables.  Default is 'wi_'
      NAME:	(string) name for tplot variables. Default is 'wi_Bh'
      RESOLUTION:	Resolution to return in seconds.
      MASTERFILE:	(string) full filename of master file.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    LAST MODIFIED:	@(#)load_wi_h0_mfi.pro	1.10 02/11/01

    (See .//load_wi_h0_mfi.pro)

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

    PROCEDURE:	load_wi_hkp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'wi_hkp'
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    LAST MODIFIED:	@(#)load_wi_hkp_3dp.pro	1.5 99/05/27

    (See .//load_wi_hkp_3dp.pro)

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

    PROCEDURE:	load_wi_mfi
    PURPOSE:
       loads WIND MAGNETOMETER Experiment key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'wi_'
      POLAR:       Also computes the B field in polar coordinates.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_mfi.pro
    LAST MODIFICATION: 02/11/01

    (See .//load_wi_mfi.pro)

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

    PROCEDURE:	load_wi_or
    PURPOSE:
       loads WIND 3D Plasma Experiment orbit data for "tplot".
    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      RESOLUTION:  number of seconds resolution to return.
      POLAR:       Computes polar coordinates if set.
      PRE:		If set, use predicted (pre) data.
      NODATA:	Returns 1 if no data available.
      HEC:		If set, retrieve HEC data.
      VAR_LAB:	Return polar data and use as var_labels in tplot.
      GSM:		If set, retrieve GSM data.
      LAT:		If set, retrieve LAT data.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_or.pro
    LAST MODIFICATION: 99/12/28

    (See .//load_wi_or.pro)

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

    PROCEDURE:	load_wi_phsp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'phsp'
    SEE ALSO:
      "loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    LAST MODIFICATION: @(#)load_wi_phsp_3dp.pro	1.4 99/05/27

    (See .//load_wi_phsp_3dp.pro)

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

    PROCEDURE:	load_wi_plsp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'plsp'
      MOMENT:	Load PESA Low moment data.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    LAST MODIFICATION: @(#)load_wi_plsp_3dp.pro	1.7 02/11/01

    (See .//load_wi_plsp_3dp.pro)

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

    PROCEDURE:	load_wi_pm_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'wi_pm_'
      POLAR:       Computes polar coordinates if set.
      VTHERMAL:	If set, calculates and stores thermal velocity.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_pm_3dp.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_pm_3dp.pro)

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

    PROCEDURE:	load_wi_sfpd
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'sfpd'
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_sfpd.pro
    LAST MODIFICATION: 02/04/19

    (See .//load_wi_sfpd.pro)

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

    PROCEDURE:	load_wi_sfsp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'sfsp'
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_sfsp_3dp.pro
    LAST MODIFICATION: 02/04/19

    (See .//load_wi_sfsp_3dp.pro)

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

    PROCEDURE:	load_wi_sopd
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'ehpd'

    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    FILE:  load_wi_sopd.pro
    LAST MODIFICATION: 2000/9/13

    (See .//load_wi_sopd.pro)

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

    PROCEDURE:	load_wi_sosp_3dp
    PURPOSE:
       loads WIND 3D Plasma Experiment key parameter data for "tplot".

    INPUTS:
      none, but will call "timespan" if time_range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      PREFIX:	Prefix for TPLOT variables created.  Default is 'sosp'
    SEE ALSO:
      "loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Peter Schroeder
    FILE:  load_wi_sosp_3dp.pro
    LAST MODIFICATION: 03/04/30

    (See .//load_wi_sosp_3dp.pro)

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

    PROCEDURE:	load_wi_sp_mfi
    PURPOSE:
       loads WIND MAGNETOMETER 3 second data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      TIME_RANGE:  2 element vector specifying the time range
      POLAR:       Also computes the B field in polar coordinates.
      DATA:        Data returned in this named variable.
      NODATA:	Returns 0 if data exists for time range, otherwise returns 1.
      GSM:		If set, GSM data is retrieved.
      PREFIX:	(string) prefix for tplot variables.  Default is 'wi_'
      NAME:	(string) name for tplot variables. Default is 'wi_B3'
      RESOLUTION:	Resolution to return in seconds.
      MASTERFILE:	(string) full filename of master file.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_sp_mfi.pro
    VERSION: 1.17
    LAST MODIFICATION: 01/07/16

    (See .//load_wi_sp_mfi.pro)

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

    PROCEDURE:	load_wi_swe
    PURPOSE:
       loads WIND Solar Wind Experiment key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      POLAR:	If set, calculate and store velocity in polar
    		coordinates.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_swe.pro
    LAST MODIFICATION: 02/12/03

    (See .//load_wi_swe.pro)

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

    PROCEDURE:	load_wi_wav
    PURPOSE:
       loads WIND WAVES Experiment key parameter data for "tplot".

    INPUTS:	none, but will call "timespan" if time
    		range is not already set.
    KEYWORDS:
      DATA:        Raw data can be returned through this named variable.
      NVDATA:	Raw non-varying data can be returned through this variable.
      TIME_RANGE:  2 element vector specifying the time range.
      MASTERFILE:  (string) full file name to the master file.
      RESOLUTION:  number of seconds resolution to return.
      NE_FILTER:	Name of electron density variable to be used as filter.
      MOON:	Load moon position data.
      SOLAR:	Load solar data.
    SEE ALSO:
      "make_cdf_index","loadcdf","loadcdfstr","loadallcdf"

    CREATED BY:	Davin Larson
    FILE:  load_wi_wav.pro
    LAST MODIFICATION: 99/05/27

    (See .//load_wi_wav.pro)

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

     PROCEDURE:
         makecdf, datavary, datanovary=datanovary, filename=filename, status=status, $
             gattributes=gattr, vattributes=vattr, tagsvary=tagsvary, $
    	  tagsnovary=tagsnovary, overwrite=overwrite

     PURPOSE:
         Creates a CDF file given an array of structures

     KEYWORDS:
         filename:
             Name of file to be created.
         datanovary:
             a structure containing the time invariant data to be written to CDF (like
             array descriptors).
         tagsvary:
             array of strings that will be used as the CDF variable names for the values
             stored in the datavary structure.  Default CDF variable names are the names
             of the tags of the datavary structure.
             Note that, since IDL internally capitalizes all variable and tag names,
             the CDF variable names will be all caps in the default, so the tagsvary
             keyword should generally be used to control capitalization of the CDF variable
             names.
         tagsnovary:
             array of strings that will be used as the CDF variable names for the values
             stored in the datanovary structure.  Default CDF variable names are the names
             of the tags of the datanovary structure.
             Note that, since IDL internally capitalizes all variable and tag names,
             the CDF variable names will be all caps in the default, so the tagsnovary
             keyword should generally be used to control capitalization of the CDF variable
             names.
         gattributes:
             a structure specifying the names, entry numbers, and values of the global
             CDF attributes that will be written to the CDF file.
             The tagnames of the gattributes structure are actually dummy placeholders
             which are not used (but must all be unique, or course).
             The value of each field is a struture containing three fields, 'name',
             which contains the name of the attribute, 'entry', which contains the entry
             number (many attributes contain just a single entry, generally just entry 0,
             and some contain several entries, generally entries 0,1,2,3, etc), and
             'value' which contains the value of the attribute for the specified entry.
             (see the example below)
         vattributes:
             a structure specifying, for each CDF variable that has variable attributes,
             the names and values of the variable CDF attributes that will be written to
             the CDF file.  The tagnames of the vattributes structure are actually dummy
             placeholders and are not used.  The values of the fields of the vattributes
             structure should each be a structure, with a 'varname' field containing the
             name of a CDF variable, and an 'attrlist' field which contains a structure
             containing the set of attribute names and values for the specified variable.
             (see the example below)
         overwrite:
             if set, overwrite any existing CDF file with the specified name (default
             is to not overwrite any such existing file).
         status:
             status is 0 on successful return, nonzero on unsuccessful return.
             A routine that calls makecdf should in general use the status keyword parameter
             and verify that the CDF write has completed successfully.

     INPUT:
         datavary:
             an array of structures containing the time variant data to be written to CDF.
             Each element of the array is a structure containing the values for one time.
             Datavary must have a tag named 'time' that contains the time in seconds since
             01-01-1970/00:00:00 UT.  An additional CDF variable named 'Epoch', of type
             CDF_EPOCH, will be written to the CDF, and will be computed from 'time'.

     EXAMPLE:
         To make a CDF file named 'foo.cdf' containing tplot variables 'el_0' and 'el_high',
         and with two global attributes, named 'foo' (with one entry with value 'bar') and
         'goo' (with two entries, one with value 1.0, and one with value 2.0),
         and with two variable attributes, 'VALIDMIN' and 'VALIDMAX', with VALIDMIN for el_0
         to be set to 1.0, and VALIDMAX of el_0 to be set to 2.0, and VALIDMIN of el_high to
         be set to 1.0 and VALIDMAX of el_high to be set to 2.0,
         give the following IDL commands:

             > make_cdf_structs, ['el_0', 'el_high'], datavary, datanovary
             > gattr = {foo0: {name:'foo', entry:0, value:'bar'}, $
                        goo0: {name:'goo', entry:0, value:1.0  }, $
                        goo1: {name:'goo', entry:1, value:2.0  }}
             > vattr_el_0    = {VALIDMIN:1.0, VALIDMAX:2.0}
             > vattr_el_high = {VALIDMIN:1.0, VALIDMAX:2.0}
             > vattr = {el_0:    {varname:'el_0',    attrlist:vattr_el_0},  $
                        el_high: {varname:'el_high', attrlist:vattr_el_high}}
             > makecdf, file='foo', datavary, datanovary=datanovary, $
                   tagsvary=['time', 'el_0', 'el_high'], tagsnovary=['el_0_en', 'el_high_pa'], $
                   gattr=gattr, vattr=vattr

         Note that, in the above specification of vattr, the names of the CDF variables (el_0
         and el_high in this example), appear to be repeated in two places each.  The first
         occurrence of each, in the tagname, is actually just an unused dummy, and the second
         occurrence of each, in the string value of varname, is the CDF variable name.  This
         is because IDL variable names and tag names can't be used to specify the more general
         strings that CDF variable names can have.  Similarly with gattr.

         The resulting CDF file will contain an Epoch variable (computed from the time),
         a time variable (taken by default from the 'x' component of the first named tplot
         variable, but specifiable otherwise by the 'times' keyword to 'make_cdf_structs'),
         and, for each tplot variable named in the argument list to 'make_cdf_structs', the
         'y' component, with a name taken from 'tagsvary', and the 'v' component, with a
         name taken from 'tagsnovary'.
         Thus the CDF file from the above commands will contain the CDF variables
             Epoch:
                 This is of type CDF_EPOCH, and is calculated from the time variable below
             time:
                 by default, the 'x' tag from the tplot variable 'el_0'
             el_0:
                 the 'y' tag from the tplot variable 'el_0'
             el_high:
                 the 'y' tag from the tplot variable 'el_high'
             el_0_en:
                 the 'v' tag from the tplot variable 'el_0'
             el_high_pa:
                 the 'v' tag from the tplot variable 'el_high'

     SEE ALSO:
         "loadcdf", "loadcdfstr"
         "make_cdf_structs.pro", "strarr_to_arrstr.pro"

     VERSION: @(#)makecdf.pro	1.6 08/13/98

    (See .//makecdf.pro)

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

     PROCEDURE:
         makecdf2, data, sktfile=sktfile, cdffile=cdffile, $
             gattributes=gattr, vattributes=vattr, overwrite=overwrite, $
    	  status=status, verbose=verbose

     PURPOSE:
         Creates a CDF file from a structure of arrays

     INPUT:
         data:
         (this sounds complicated to describe, but see the EXAMPLE below)
             The structure containing the data to write out to CDF.
             The 'data' structure will contain exactly one field for each variable that
             is to be written to the output CDF (with the exception that additional
             variables 'Epoch' and 'Time_PB5' will be written to the CDF file, if they
             have been specified in the skeleton file input via the 'sktfile' keyword
             parameter).
             Each field of the 'data' structure is itself a structure containing exactly
             4 fields, named 'name', 'value', 'recvary', and 'fill'.
             The 'name' field of the n-th field of 'data' should be the name of the n-th
             CDF variable in the output CDF file.  The 'value' field of the n-th field of
             'data' should be an array containing the values of the n-th variable (the
             i-th element of the array is the value at the i-th time).  The 'recvary'
             field of the n-th field of 'data' should be 1 if the n-th variable is time
             varying and 'recvary' should be 0 if the n-th variable is time invariant.
             Time invariant variables are generally things like various kinds of array
             descriptors that don't depend on the time.  The 'fill' field of the n-th field
             of 'data' should be 1 if the variable should have its values overwritten with
             ISTP standard FILLVAL's for all times for which data are missing or invalid,
             as specified by the values of the 'quality_flag' variable, otherwise, 'fill'
             should be zero.

             NOTE: the first field of the 'data' structure must contain the time values
             in seconds since 01-01-1970/00:00:00 UT.

             NOTE: all of the time variant variable arrays in the 'data' structure must
             be based on the exact same time array (that set of times given in the first
             field of the 'data' structure).  If you have a set of arrays to write out
             to CDF which are not all based on the same time array, you must first do
             the appropriate interpolations to generate a set of arrays that are all
             based on the same time array.  See the routine 'time_align.pro' for one
             simple way to do this with tplot variables.

     KEYWORDS:
         sktfile:
             name of the skeleton file that is to be used to specify the global attributes
             and their values, variable attributes and their values, and variable types and
             sizes.  The value used for this parameter should not include any '.skt' suffix.
         cdffile:
             Name of CDF file to be created.  Do not include any '.cdf' suffix.
         gattributes:
             FIX
         vattributes:
             FIX
         overwrite:
             if set, overwrite any existing CDF file with the specified name (default
             is to not overwrite any such existing file).
         status:
             status is 0 on successful return, nonzero on unsuccessful return.
             A routine that calls makecdf2 should in general use the status keyword parameter
             and verify that the CDF write has completed successfully.
         verbose:
    	  if set, display diagnostic messages.  Useful for debugging.

     EXAMPLE:
         Consider making a CDF file of the FAST EESA summary data, as is done by the IDL
         routine 'fast_e_summary.pro'.  Assume that an appropriate skeleton file named
         'fa_k0_ees_template.skt' has been created, containing the appropriate variable
         definitions and the appropriate global and variable scope attributes and their
         values.  Assume that all the standard data necessary has been stored with
         'store_data' in IDL.

         Then to make the CDF file named 'fa_k0_ees.cdf'containing the variables 'unix_time',
         'el_0', 'el_90', 'el_180', 'el_en', 'el_low', 'el_low_pa', 'el_high',
         'el_high_pa', 'JEe', and 'Je', you could give the following IDL commands:

             > get_data, 'el_0',     data=el_0
             > get_data, 'el_90',    data=el_90
             > get_data, 'el_180',   data=el_180
             > get_data, 'el_low',   data=el_low
             > get_data, 'el_high',  data=el_high
             > get_data, 'JEe',      data=JEe
             > get_data, 'Je',       data=Je
             >
             > data = {unix_time:  {name:'unix_time',  value:el_0.x,    recvary:1, fill:0}, $
             >         el_0:       {name:'el_0',       value:el_0.y,    recvary:1, fill:1}, $
             >         el_90:      {name:'el_90',      value:el_90.y,   recvary:1, fill:1}, $
             >         el_180:     {name:'el_180',     value:el_180.y,  recvary:1, fill:1}, $
             >         el_en:      {name:'el_en',      value:el_0.v,    recvary:1, fill:1}, $
             >         el_low:     {name:'el_low',     value:el_low.y,  recvary:1, fill:1}, $
             >         el_low_pa:  {name:'el_low_pa',  value:el_low.v,  recvary:1, fill:1}, $
             >         el_high:    {name:'el_high',    value:el_high.y, recvary:1, fill:1}, $
             >         el_high_pa: {name:'el_high_pa', value:el_high.v, recvary:1, fill:1}, $
             >         JEe:        {name:'JEe',        value:JEe.y,     recvary:1, fill:1}, $
             >         Je:         {name:'Je',         value:Je.y,      recvary:1, fill:1}}
             >
             > makecdf2, data, sktfile='fa_k0_ees_template', $
                   cdffile='fa_k0_ees', status=status, /overwrite
             > if status ne 0 then begin
             >     message, /info, 'makecdf2 failed.'
             >     return
             > endif

         Note that in the above, the name of the field containing time was named 'unix_time',
         and not 'time'.  In general, CDF variables can be named anything you want, but there
         are a few special exceptions.
         IF A CDF CONTAINS AN 'EPOCH' VARIABLE, THE FOLLOWING VARIABLE NAMES SHOULD NOT BE
         USED:  TIME, YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, MSEC, IYEAR, IMONTH, IDAY,
         IHOUR, IMINUTE, ISECOND, IMSEC.  THIS IS BECAUSE MANY STANDARD CDF ANALYSIS TOOLS
         USE THESE NAMES FOR SPECIFIC PURPOSES.  This is because of certain assumptions
         made by various software tools developed by CDHF.

     SEE ALSO:
         "time_align"

     VERSION: @(#)makecdf2.pro	1.2 98/08/13

    (See .//makecdf2.pro)

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

    PROCEDURE makegap,dg,x,y
    PURPOSE:
       Creates data gaps (by inserting NaN) when the time between data points is
       larger than a value either passed in by the user or calculated to a
       default.
    INPUT:
       dg: If dg is positive, it is the maximum allowed time gap.  Any time gaps
    	greater than dg will be treated as data gaps.  If dg is negative,
    	the procedure will calculate a default value for dg of 20 times the
    	the smallest time gap in the time series.
        x: The time array.
        y: The data array.
    KEYWORDS:
        v: Optional third dimension array.
        dy: Optional uncertainty in y.
    CREATED BY: Peter Schroeder
    LAST MODIFIED:	@(#)makegap.pro	1.2 98/02/18

    (See .//makegap.pro)

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

    PROCEDURE:  makegif, filename
    NAME:
      makegif
    PURPOSE:
      Creates a GIF file from the currently displayed image.
    NOTES:
      extension '.gif' is added automatically
    Restrictions:
      Current device should have readable pixels (ie. 'x' or 'z')

    Created by:  Davin Larson
    FILE:  makegif.pro
    VERSION:  1.11
    LAST MODIFICATION:  02/11/06

    (See .//makegif.pro)

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

    FUNCTION make_3dmap, dat,nx,ny
    PURPOSE:
      Returns a 3d map using the theta's and phi's of a 3d structure.
      This routine is primarily used by "PLOT3D".
    INPUT:  dat:  a 3d structure (see "3D_STRUCTURE" for more info).
             nx:  x dimension of output array.
             ny:  y dimension of output array.
    OUTPUT: A 2 dimensional array of bin values that reflect the mapping.
    KEYWORDS:
       HIGHEST:  force the highest bin number to prevail for overlapping bins.
    ASSUMPTIONS: theta +/- dtheta should be in the range:  -90 to +90.
    NOTES: if there are any overlapping bins, then the lowest bin number
        will win, unless the HIGHEST keyword is set.
    WRITTEN BY:  Davin Larson,   96-2-8
    LAST MODIFICATION:	@(#)make_3dmap.pro	1.7 99/10/22

    (See .//make_3dmap.pro)

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

    NAME:
      make_cdf_index
    PROCEDURE:
      make_cdf_index,  [pattern]
    PURPOSE:
      Creates an index file for CDF files.
      The index file will have one line for each CDF file found.
      Each line contains the start time, end time and filename
      with the following format:
    YYYY-MM-DD/hh:mm:ss  YYYY-MM-DD/hh:mm:ss   fullpathname.cdf
      CDF files may be distributed over many directories or disks.

    INPUT:
      pattern:  (string) file pattern, default is:  '*.cdf'
    KEYWORDS:
      DATA_DIREC  (string) data directory(s)
      INDEX_FILENAME:  (string) Name of index file to be created.
      NO_DUPLICATES:   Set to 1 if duplicate days are to be ignored.
    SEE ALSO:
      "makecdf","loadcdf","loadcdfstr","loadallcdf",
    CREATED BY:
      Davin Larson,  August 1996
    VERSION:
      02/04/17  make_cdf_index.pro  1.5

    (See .//make_cdf_index.pro)

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

    Program:	mat_diag, p, EIG_VAL= eig_val, EIG_VEC= eig_vec
    INPUT:
    	p	6-element vector [Pxx, Pyy, Pzz, Pxy, Pxz, Pyz] of a
    		symmetric matrix
    OUTPUT:
    	eig_val, eig_vec
    PURPOSE:
    	Diagonalize a 3x3 symmetric matrix
    	Returns the eigenvalues and eigenvectors.
    	The eigenvalues are the diagnonal elements of the matrix
    	The eigenvectors are the associated principle axis.
    NOTES:
    	The first eigenvalue (eig_val(0)) and eigenvector (eig_vec(*,0))
    	are the distinguisheable eigenvalue and the major (symmetry) axis,
    	respectively.
    	The "degenerate" eigenvalues are sorted such that the 2nd eigenvalue
    	is smaller than the third one.
    CREATED BY:
    	Tai Phan (95-9-15)
    LAST MODIFICATION:
    	95-9-29		Tai Phan

    (See .//mat_diag.pro)

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

    FUNCTION:   minmax,array
    PURPOSE:  returns a two element array of min, max values
    INPUT:  array
    KEYWORDS:
      MAX_VALUE:  ignore all numbers greater than this value
      MIN_VALUE:  ignore all numbers less than this value
      POSITIVE:   forces MINVALUE to 0

    CREATED BY:    Davin Larson
    LAST MODIFICATION:     @(#)minmax.pro	1.2 02/04/17

    (See .//minmax.pro)

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

     NAME:
    	MK_HTML_HELP2

     PURPOSE:
           Creates a html document from a list of IDL procedures.
    	Given a list of IDL procedure files (.PRO), VMS text library
           files (.TLB), or directories that contain such files, this procedure
           generates a file in the HTML format that contains the documentation
           for those routines that contain a DOC_LIBRARY style documentation
           template.  The output file is compatible with World Wide Web browsers.
           This version is enhanced over the routine supplied by IDL, It will
           also cross reference, print the purpose, and add links to the source
           code.

     CATEGORY:
    	Help, documentation.

     CALLING SEQUENCE:
    	MK_HTML_HELP, Sources, Outfile

     INPUTS:
         Sources:  A string or string array containing the name(s) of the
    		.pro or .tlb files (or the names of directories containing
                   such files) for which help is desired.  If a source file is
                   a VMS text library, it must include the .TLB file extension.
                   If a source file is an IDL procedure, it must include the .PRO
                   file extension.  All other source files are assumed to be
                   directories.  If not provided, searches down directory tree
    		from current directory for files.

         Outfile:	The name of the output file which will be generated without
    		HTML extension.

         If no inputs are given: All directories in the current directory tree
                   are used with the exception of: directories named: 'obsolete'
                   or 'SCCS.'  (UNIX only)

     KEYWORDS:
         TITLE:	If present, a string which supplies the name that
    		should appear as the Document Title for the help.
         FILENAME: Alternative method of specifying Outfile (see above)
         VERBOSE:	Normally, MK_HTML_HELP does its work silently.
    		Setting this keyword to a non-zero value causes the procedure
    		to issue informational messages that indicate what it
    		is currently doing. !QUIET must be 0 for these messages
                   to appear.
         STRICT:   If this keyword is set to a non-zero value, MK_HTML_HELP will
                   adhere strictly to the HTML format by scanning the
                   the document headers for characters that are reserved in
                   HTML (",&,").  These are then converted to the appropriate
                   HTML syntax in the output file. By default, this keyword
                   is set to zero (to allow for faster processing).
         CROSSLINK:If this keyword is set MK_HTML_HELP will create a cross
                   reference between library files.
         CLTURBO:  If this keyword is set to a single character string, then the
                   cross reference procedure will only cross reference lines that
                   contain the character given in CLTURBO.  This greatly increases
                   the speed of the routine.  By default the double quote (") is
                   used
         PRINT_PURPOSE:  If this keyword is set then the first line after PURPOSE:
                   is printed in the output file.
         MASTLIST:	If set, create master list only.  Do not create subdirectory
    		file listings.

     COMMON BLOCKS:
    	None.

     SIDE EFFECTS:
    	A help file with the name given by the Outfile argument is
    	created.

     RESTRICTIONS:
    	The following rules must be followed in formatting the .pro
    	files that are to be searched.
    		(a) The first line of the documentation block contains
    		    only the characters ";+", starting in column 1.
                   (b) There must be a line which contains the string "NAME:",
                       which is immediately followed by a line containing the
                       name of the procedure or function being described in
                       that documentation block.  If this NAME field is not
                       present, the name of the source file will be used.
    		(c) The last line of the documentation block contains
    		    only the characters ";-", starting in column 1.
    		(d) Every other line in the documentation block contains
    		    a ";" in column 1.

           Note that a single .pro file can contain multiple procedures and/or
           functions, each with their own documentation blocks. If it is desired
           to have "invisible" routines in a file, i.e. routines which are only
           for internal use and should not appear in the help file, simply leave
           out the ";+" and ";-" lines in the documentation block for those
           routines.

    	No reformatting of the documentation is done.

     MODIFICATION HISTORY:
           July 5, 1995, DD, RSI. Original version.
           July 13, 1995, Mark Rivers, University of Chicago. Added support for
                   multiple source directories and multiple documentation
                   headers per .pro file.
           July 17, 1995, DD, RSI. Added code to alphabetize the subjects;
                   At the end of each description block in the HTML file,
                   added a reference to the source .pro file.
           July 18, 1995, DD, RSI. Added STRICT keyword to handle angle brackets.
           July 19, 1995, DD, RSI. Updated STRICT to handle & and ".
                   Changed calling sequence to accept .pro filenames, .tlb
                   text librarie names, and/or directory names.
                   Added code to set default subject to name of file if NAME
                   field is not present in the doc header.
           September, 1995, D. Larson. SSL Berkeley. Added crosslink, print_purpose
                   clturbo.
           October 4, 1995, D. Larson. SSL Berkeley. Added link to source file.
           October 3, 1996, F. Marcoline. SSL Berkeley.  Added Alphabet Jumpline.
           October 10, 1996, D. Larson. Added Listing by Directory.

    FILE:  mk_html_help2.pro
    VERSION 1.26
    LAST MODIFICATION: 99/04/22

    (See .//mk_html_help2.pro)

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

    PROCEDURE:  mplot, x, y, [,dy]
    INPUT:
                x:  1 or 2 dimensional array of x values.
                y:  1 or 2 dimensional array of y values.
               dy;  error bars for y;  same dimensions as y. (optional)
    PURPOSE:
        General purpose procedure used to make multi-line plots.

    KEYWORDS:
        DATA:     A structure that contains the elements 'x', 'y' ['dy'].  This
           is an alternative way of inputing the data  (used by "TPLOT").
        LIMITS:   Structure containing any combination of the following elements:
              ALL PLOT/OPLOT keywords  (ie. PSYM,SYMSIZE,LINESTYLE,COLOR,etc.)
              ALL MPLOT keywords
              NSUMS:   array of NSUM keywords.
              LINESTYLES:  array of linestyles.
        LABELS:  array of text labels.
        LABPOS:  array of positions for LABELS.
        LABFLAG: integer, flag that controls label positioning.
                 -1: labels placed in reverse order.
                  0: No labels.
                  1: labels spaced equally.
                  2: labels placed according to data.
                  3: labels placed according to LABPOS.
        BINS:    flag array specifying which channels to plot.
        OVERPLOT: If non-zero then data is plotted over last plot.
        NOXLAB:   if non-zero then xlabel tick marks are supressed.
        COLORS:   array of colors used for each curve.
        NOCOLOR:  do not use color when creating plot.
    NOTES:
        The values of all the keywords can also be put in the limits structure or
        in the data structure using the full keyword as the tag name.
        The structure value will overide the keyword value.

    CREATED BY:	Davin Larson
    FILE:  mplot.pro
    VERSION  1.43
    LAST MODIFICATION: 02/11/01

    (See .//mplot.pro)

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

    FUNCTION: ndimen
    PURPOSE:
      Returns the number of dimensions in an array.
    INPUT:  array
    RETURNS number of dimensions  (0 for scalers,-1 for undefined)

    SEE ALSO:  "dimen", "data_type"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)ndimen.pro	1.6 97/03/10

    (See .//ndimen.pro)

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

    NAME:                  nn
    PURPOSE:               Find the index of the data point(s) nearest to the specified time(s)

    CALLING SEQUENCE:      ind=nn(data,time)
    INPUTS:                data:  a data structure, a tplot variable name/index,
                              or a time array
                           time:  (double) seconds from 1970-01-01, scalar or array
                                  if not present, "ctime" is called to get time(s)
    OPTIONAL INPUTS:       none
    KEYWORD PARAMETERS:    x, y, & v:  set to named keywords to return the values
    			of the x, y, & v arrays, if applicable

    OUTPUTS:               a long scalar index or long array of indicies
                           on failure, returns: -2 if bad inputs,
                                                -1 if nearest neighbor not found
    EXAMPLE:               ctime,times,npoints=2
                           inds=nn('Np',times)
                           get_data,'Np',data=dens & get_data,'Tp',data=temp
                           plot,dens.y(inds(0):inds(1)),temp(inds(0):inds(1))
    LAST MODIFICATION:     @(#)nn.pro	1.8 02/04/17
    CREATED BY:            Frank Marcoline

    (See .//nn.pro)

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

    FUNCTION:	normal_to_data
    PURPOSE:	convert normal coordinates to data coordinates
    INPUT:
    	normv:	normal coordinates
    	s:	!AXIS structure
    KEYWORDS:
    	none

    CREATED BY: 	Davin Larson
    LAST MODIFICATION: 	@(#)normal_to_data.pro	1.5 98/08/02

    NOTE:	I think this procedure is superceded by convert_coord.

    (See .//normal_to_data.pro)

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

    FUNCTION:	n_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//n_3d.pro)

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

    FUNCTION:  omni3d
    PURPOSE:  produces an omnidirectional spectrum structure by summing
     over the non-zero bins in the keyword bins.
     this structure can be plotted with "spec3d"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)omni3d.pro	1.12 02/04/17

     WARNING:  This is a very crude structure; use at your own risk.

    (See .//omni3d.pro)

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

     PROCEDURE:
    	oplot_err, x, low, high
     PURPOSE:
    	Plot error bars over a previously drawn plot.

    (See .//oplot_err.pro)

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

    PROCEDURE:   options, str, tag_name, value
    PURPOSE:
      Add (or change) an element of a structure.
      This routine is useful for changing plotting options for tplot, but can also
      be used for creating limit structures for other routines such as "SPEC3D"
      or "CONT2D"

    INPUT:
      str:
        Case 1:  String (or array of strings)
           The limit structure associated with the "TPLOT" handle name is altered.
           Warning!  wildcards accepted!  "*" will change ALL tplot quantities!
        Case 2:  Number (or array of numbers)
           The limit structure for the given "TPLOT" quantity is altered.  The
           number/name association is given by "TPLOT_NAMES"
        Case 3:  Structure or not set (undefined or zero)
           Structure to be created, added to, or changed.
      tag_name:     string,  tag name for value.
      value:    (any type or dimension) value of new element.
    NOTES:
      if VALUE is undefined then it will be DELETED from the structure.
      if TAG_NAME is undefined, then the entire limit structure is deleted.

    KEYWORDS:
      DEF:  If set, modify the default limits structure rather than the
    	    regular limits structure (tplot variables only).
    SEE ALSO:
      "GET_DATA","STORE_DATA", "TPLOT", "XLIM", "YLIM", "ZLIM", "STR_ELEMENT"

    CREATED BY:	Jasper Halekas
    Modified by:   Davin Larson
    LAST MODIFICATION:	@(#)options.pro	1.19 99/04/07

    (See .//options.pro)

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

    FUNCTION:	pad
    PURPOSE:	makes a data pad from a 3d structure
    INPUT:
    	dat:	A 3d data structure such as those gotten from get_el,get_pl,etc.
    		e.g. "get_el"
    KEYWORDS:
    	bdir:	Add B direction
    	esteps:	Energy steps to use
    	bins:	bins to sum over
    	num_pa:	number of the pad

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)pad.pro	1.21 02/04/17

    (See .//pad.pro)

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

    PROCEDURE: padplot,pad
       Plots pad data vs pitch angle.
    INPUTS:
       pad   - structure containing pitch angle distribution (PAD) data.
               (Obtained from "pad()" routine)
    KEYWORDS:
       LIMITS - limit structure. (see "xlim" , "YLIM" or "OPTIONS")
          The limit structure can have the following elements:
          UNITS:  units to be plotted in.
          ALL PLOT and OPLOT keywords.
       UNITS  - convert to given data units before plotting
       MULTI  - Set to the number of plots desired across the page.
       OPLOT  - Overplots last plot if set.
       LABEL  - set to print labels for each energy step.

    SEE ALSO:	"spec3d"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)padplot.pro	1.18 02/04/17

    (See .//padplot.pro)

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

    FUNCTION:  pangle,theta,phi,b_theta,b_phi
    PURPOSE:
     Computes pitch angle given two sets of theta and phi
    INPUT:
      theta,phi:       double (array or scaler)  first directions
      b_theta,b_phi :  double (array or scaler)  second directions
    RETURNS:  pitch angle (array or scaler) same dimensions as theta and phi

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)pangle.pro	1.4 95/11/28

    (See .//pangle.pro)

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

    WARNING!!! This Function is OBSOLETE try not to use it...
    FUNCTION: pb5_to_time
    INPUT: pb5 array from cdf files (especially kpd files)
    OUTPUT:  double array,  seconds since 1970

    SEE ALSO: 	"print_cdf_info",
    		"loadcdf"

    CREATED BY: 	Davin Larson
    LAST MODIFICATION:	@(#)pb5_to_time.pro	1.5 95/10/18

    (See .//pb5_to_time.pro)

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

    PROCEDURE:   pclose
    INPUT:  none
    PURPOSE: Close postscript file opened with popen, and change device back to
      default.
      If common block string 'printer_name' is set, then file is sent to that
      printer.
    SEE ALSO: 	"print_options"
    		"popen"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)pclose.pro	1.10 99/02/18

    (See .//pclose.pro)

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

    NAME:
      PLOT3D
    PROCEDURE: plot3d, dat , latitude, longitude
    PURPOSE:
      Draws a series of 3d color plots, one plot per energy step.
    INPUT:
      dat:  3d data structure.
      latitude:  latitude of center of plot
      longitude:  longitude of center of plot
    KEYWORDS:
       EBINS:     Specifies energy bins to plot.
       SUM_EBINS: Specifies how many bins to sum, starting with EBINS.  If
                  SUM_EBINS is a scaler, that number of bins is summed for
                  each bin in EBINS.  If SUM_EBINS is an array, then each
                  array element will hold the number of bins to sum starting
                  at each bin in EBINS.  In the array case, EBINS and SUM_EBINS
                  must have the same number of elements.
       BNCENTER:  if > 0 then lat,lon set so that B direction is in center
                  if < 0 then lat,lon set so that -B direction is in center
                  ('magf' element must exist in dat structure. See "ADD_MAGF")
       BINS:    bins to use for autoscaling.
       SMOOTH:  smoothing parameter.  0=none,  2 is typical
       TITLE:   overrides default plot title.
       NOTITLE: if set, suppresses plot title.
       NOCOLORBAR: if set, suppresses colorbar.
       NOBORDER: if set, suppresses plot border.
    SEE ALSO:  "PLOT3D_OPTIONS" to see how to set other options.

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)plot3d.pro	1.43 02/04/17

    (See .//plot3d.pro)

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

    COMMON BLOCK:	plot3d_com
    PURPOSE:	Common block for "PLOT#D" routines
    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)plot3d_com.pro	1.8 95/11/07
    SEE ALSO:   "PLOT3D" and "PLOT3D_OPTIONS"

    (See .//plot3d_com.pro)

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

    PROCEDURE:  plot3d_options
    PURPOSE:  Sets default options for the "plot3d" routine
       The only inputs are through keywords:
    KEYWORDS:
       MAP:  one of the following strings:
           'cylindrical', 'molleweide', 'ait' ,'lambert'  ....
           (See manual for other maps, only the first 3 characters are req'd)
       COMPRESS:  integer defining map resolution (see manual)  1 si default
       SMOOTH:    0 gives no smoothing.
       LOG:       0: linear color scale;   1: log color scale
       TRIANGULATE:  Uses spherical triangulation if set
       LATITUDE:  Center Latitude.
       LONGITUDE: Center Longitude.

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)plot3d_options.pro	1.10 96/09/24

    (See .//plot3d_options.pro)

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

     PROCEDURE:
    	PLOT_MAP

     DESCRIPTION:

    	Plot the map from the standard 3-D data structure that is returned
    	from the IDL from SDT interface.  The THETA, PHI, DTHETA, DPHI,
    	DATA_NAME and PROJECT_NAME tags must exist for this routine to work.
    	(The standard 3-D data structure should contain these.)

     CALLING SEQUENCE:

     	plot_map, data_structure

     ARGUMENTS:

    	data_structure 		The standard 3-D data structure to plot the
    				map from.

     REVISION HISTORY:

    	@(#)plot_map.pro	1.1 22 Aug 1995
     	Originally written by Jonathan M. Loran,  University of
     	California at Berkeley, Space Sciences Lab.   Aug. '95

    (See .//plot_map.pro)

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

    FUNCTION:   plot_positions
    PURPOSE:
      Procedure that will compute plot positions for multiple plots per page.
    Created by Davin Larson

    (See .//plot_positions.pro)

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

     PROCECURE:	pmplot

     PURPOSE:	Used for making log y-axis plots.  Preformats data for
    		use with "mplot".  Plots negative data in red and positive
    		data in green.

     KEYWORDS:
        DATA:     A structure that contains the elements 'x', 'y' ['dy'].  This
           is an alternative way of inputing the data  (used by "TPLOT").
        LIMITS:   Structure containing any combination of the following elements:
              ALL PLOT/OPLOT keywords  (ie. PSYM,SYMSIZE,LINESTYLE,COLOR,etc.)
              ALL PMPLOT keywords
              NSUMS:   array of NSUM keywords.
              LINESTYLES:  array of linestyles.
        LABELS:  array of text labels.
        LABPOS:  array of positions for LABELS.
        LABFLAG: integer, flag that controls label positioning.
                 -1: labels placed in reverse order.
                  0: No labels.
                  1: labels spaced equally.
                  2: labels placed according to data.
                  3: labels placed according to LABPOS.
        BINS:    flag array specifying which channels to plot.
        OVERPLOT: If non-zero then data is plotted over last plot.
        NOXLAB:   if non-zero then xlabel tick marks are supressed.
        COLORS:   array of colors used for each curve.
        NOCOLOR:  do not use color when creating plot.
    NOTES:
        The values of all the keywords can also be put in the limits structure or
        in the data structure using the full keyword as the tag name.
        The structure value will overide the keyword value.

    LAST MODIFIED: @(#)pmplot.pro	1.4 02/04/17

    (See .//pmplot.pro)

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

    PROCEDURE: popen, filename
    PURPOSE:
      Change plot device to postscript.
    INPUT:    optional;  if:
      string   :  string used as filename,  '.ps' extension is added automatically
      integer X:  filename set to 'plotX.ps'.  value of x is incremented by 1.
      none:       filename set to 'plot.ps'
    KEYWORDS: See print_options for info.
      COPY:    pass COPY keyword to set_plot
      INTERP:  pass INTERP keyword to set_plot  (default is to have interp off)

    SEE ALSO:	"pclose",
    		"print_options",
    		"popen_com"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)popen.pro	1.21 98/06/23

    (See .//popen.pro)

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

    COMMON BLOCK:	popen_com
    PURPOSE:	Common block for print routines

    SEE ALSO:	"popen","pclose",
    		"print_options"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)popen_com.pro	1.10 97/12/05

    (See .//popen_com.pro)

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

    PROCEDURE:	prestens
    PURPOSE:	This function computes the relative components of the pressure
    		tensor
    INPUT:
    	dat:	A 3d structure such as those gotten by using get_el,get_pl,etc.
    		e.g. "get_el"
    KEYWORDS:
    	esteprange:	energy range to use

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)prestens.pro	1.5 95/10/06

    NOTE:	 It is NOT yet corrected to give physical results

    (See .//prestens.pro)

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

    PROCEDURE: printdat,x, [name]
    PURPOSE:
       Displays information and contents of a data variable.
       This routine is most useful for displaying contents of complex
       data structures.

    Keywords:
       WIDTH:   Width of screen.
       MAX:     Maximum number of array elements to print.  (default is 5)
       NSTRMAX  Maximum number of structure (or pointer) elements to print.
                (default is 3)

    Written by Davin Larson, May 1997.

    (See .//printdat.pro)

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

    PROCEDURE: 	print_cdf_info
    PURPOSE:	prints information about a specified cdf file
    INPUT:
    	filename:	The name of the file for which info is desired.
    KEYWORDS:
    	none

    CREATED BY:	unknown
    LAST MODIFICATION: 	@(#)print_cdf_info.pro	1.13 02/11/01

    (See .//print_cdf_info.pro)

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

    PROCEDURE: print_options
    PURPOSE:  controls postscript printing options
    KEYWORDS:
      PORT:   print pages in portrait format (default)
      LAND:   print pages in landscape format
      BW:     Use black and white mode  (untested)
      COLOR:  Use Color postscript (default)
    FUTURE OPTIONS:
      Ecapsulated postscript format
      changing plotting area

    SEE ALSO:	"popen","pclose"

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)print_options.pro	1.16 97/05/30

    (See .//print_options.pro)

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

    FUNCTION:	p_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//p_3d.pro)

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

    PROCEDURE: reduce_dimen,name,d,n1,n2,deflim=deflim,newname=newname
    PURPOSE:  reduces dimension of tplot variable for plotting.
    INPUT:
      name:  tplot handle of 3 dimensional data
      d:  dimension to sum over.  (1 or 2)
      n1: starting index
      n2: ending index

    Caution:  This procedure is still in development.
    Created by: Davin Larson,  Sept 1995
    File:  reduce_dimen.pro
    Version:  1.1
    Last Modified:  02/04/12

    (See .//reduce_dimen.pro)

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

    PROCEDURE:	scat_plot, xname, yname
    PURPOSE:
       Produces a scatter plot of selected tplot variables.
       Colors are scaled according to zname, if present
    INPUTS:
    	xname:	xvariable name
    	yname:	yvariable name
    	zname: 	if present, color variable name
    KEYWORDS:
           TRANGE:  two element vector giving start and end time.
    	limits:		a structure with plotting keywords
    	begin_time:	time at which to start plot
    	end_time:	time at which to end plot

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)scat_plot.pro	1.13 02/04/17

    (See .//scat_plot.pro)

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

    PROCEDURE:	setfileenv
    PURPOSE:
    	Sets up environment variables giving information on the location
    	of master index files and file paths of WIND 3DP data.
    CREATED BY:	Peter Schroeder
    VERSION:	@(#)setfileenv.pro	1.26 03/09/25

    (See .//setfileenv.pro)

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

    PROCEDURE:
      share_colors
    PURPOSE:
      Procedure that allows multiple IDL sessions to share the same color table.
      The procedure should be called in each session before any
      windows are created.
    USAGE:
      Typically this procedure will be put in a startup routine. such as:
      share_colors,first=f
      if f then loadct,39

    KEYWORDS:
      FIRST Named variable that will be set to 1 if this is the
          first session, and set to 0 otherwise.
    SIDE EFFECTS:
      Creates a temporary file with the name 'idl_cmap:NAME' on the users home
      directory where NAME is the name of the display machine.
      This file is deleted upon exiting IDL.
      The procedure is only useful on UNIX for users with a common home directory.

    (See .//share_colors.pro)

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

    NAME:
    	smooth_periodic

    FUNCTION: smooth_periodic, old_image, n
    PURPOSE:  Uses box car smoothing of a surface with sperical periodic boundary
        conditions.
    INPUT:
       old_image:  2d matrix
       n:          size of boxcar averaging window
    Output:  smoothed image.

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)smooth_periodic.pro	1.5 95/10/04

    (See .//smooth_periodic.pro)

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

    PROCEDURE: spec3d,data
       Plots 3d data as energy spectra.
    INPUTS:
       data   - structure containing 3d data  (obtained from get_??() routine)
    		e.g. "get_el"
    KEYWORDS:
       LIMITS - A structure containing limits and display options.
                 see: "options", "xlim" and "ylim", to change limits
       UNITS  - convert to given data units before plotting
       COLOR  - array of colors to be used for each bin
       BINS   - array of bins to be plotted  (see "edit3dbins" to change)
       OVERPLOT  - Overplots last plot if set.
       LABEL  - Puts bin labels on the plot if set.

    See "plot3d" for another means of plotting data.
    See "conv_units" to change units.
    See "time_stamp" to turn time stamping on and off.

    CREATED BY:	Davin Larson  June 1995
    FILE:  spec3d.pro
    VERSION 1.25
    LAST MODIFICATION: 02/04/17

    (See .//spec3d.pro)

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

    PROCEDURE specplot,x,y,z
    NAME:
       specplot
    PURPOSE:
       Creates a spectrogram plot.
       All plot limits and plot positions are handled by the keyword LIMITS.
    INPUT:
       x:  xaxis values:  dimension N.
       y:  yaxis values:  dimension M.  (Future update will allow (N,M))
       Z:  color axis values:  dimension (N,M).

       All options are passed in through a single structure.
    KEYWORDS:
       LIMITS:  A structure that may contain any combination of the following
           elements:
           X_NO_INTERP:   Prevents interpolation along the x-axis.
           Y_NO_INTERP:   Prevents interpolation along the y-axis.
           NO_COLOR_SCALE: Prevents drawing of color bar scale.
           BOTTOM, TOP:   Sets the bottom and top colors for byte-scaling
           ALL plot keywords such as:
           XLOG,   YLOG,   ZLOG,
           XRANGE, YRANGE, ZRANGE,
           XTITLE, YTITLE,
           TITLE, POSITION, REGION  etc. (see IDL documentation for a description)
             The following elements can be included in LIMITS to effect DRAW_COLOR_SCALE:
           ZTICKS, ZRANGE, ZTITLE, ZPOSITION, ZOFFSET
       DATA:  A structure that provides an alternate means of supplying
           the data and options.  This is the method used by "TPLOT".
       X_NO_INTERP:   Prevents interpolation along the x-axis.
       Y_NO_INTERP:   Prevents interpolation along the y-axis.
       OVERPLOT:      If non-zero then data is plotted over last plot.
       OVERLAY:	   If non-zero then data is plotted on top of data from last
    		   last plot.
       PS_RESOLUTION: Post Script resolution.  Default is 60.
       NO_INTERP:	   If set, do no x or y interpolation.
       IGNORE_NAN:    If nonzero, ignore data points that are not finite.

    Notes:
      - The arrays x and y MUST be monotonic!  (increasing or decreasing)
      - The default is to interpolate in both the x and y dimensions.
      - Data gaps can be included by setting the z values to NAN  (!values.f_nan).
      - If ZLOG is set then non-positive zvalues are treated as missing data.

    See Also:  "XLIM", "YLIM", "ZLIM",  "OPTIONS",  "TPLOT", "DRAW_COLOR_SCALE"

    (See .//specplot.pro)

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

    PROCEDURE sphere_to_cart,r,theta,phi, x,y,z
    PURPOSE:  transform from spherical to cartesian coordinates
    INPUTS:  r, theta, phi    (array or scaler)
    OUTPUTS: x, y, z          (will have the same dimensions as r,theta,phi)
    KEYWORD OUTPUT:
       VEC:  a named variable in which the vector [x,y,z] is returned

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)sphere_to_cart.pro	1.6 02/11/01

    NOTES:
       -90 < theta < 90   (latitude not co-lat)

    (See .//sphere_to_cart.pro)

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

    PROCEDURE:  store_data,name,DATA=data,LIMITS=limits,DLIMITS=dlimits,
    		NEWNAME=newname,DELETE=delete
    PURPOSE:
       Store time series structures in static memory for later retrieval
       by the tplot routine.  Three structures can be associated with the
       string 'name':  a data structure (DATA) that typically contains the x and
       y data. A default limits structure (DLIMITS) and a user limits structure
       (LIMITS) that will typically contain user defined limits and options
       (typically plot and oplot keywords).  The data structure and the default
       limits structure will be
       over written each time a new data set is loaded.  The limit structure
       is not over-written.
    INPUT:
       name:   string name to be associated with the data structure and/or
         the limits structure.  Also, can enter tplot index as name.
         The name should not contain spaces or the characters '*' and '?'
    KEYWORDS:
        DATA:  variable that contains the data structure.
        LIMITS; variable that contains the limit structure.
        DLIMITS; variable that contains the default limits structure.
        NEWNAME: new tplot handle.  Use to rename tplot names.
        DELETE: array of tplot handles or indices to delete from common block.
        MIN: if set, data values less than this value will be made NaN.
        MAX: if set, data values greater than this value will be made NaN.
        NOSTRSW: if set, do not transpose multidimensional data arrays in
    	      structures.  The default is to transpose.

    SEE ALSO:    "GET_DATA", "TPLOT_NAMES",  "TPLOT", "OPTIONS"

    CREATED BY:	Davin Larson
    MODIFIED BY:   Peter Schroeder
    VERSION: 	@(#)store_data.pro	1.44 02/04/17

    (See .//store_data.pro)

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

    FUNCTION:
      res =  strfilter(stringarray,filterstring)
    PURPOSE:
      Returns the subset of stringarray that matchs filterstring
      '*' will match all (non-null) strings
      ''  will match only the null string
      Output can be modified with keywords
    INPUT:
      stringarray:  An array of strings to be filtered
      filterstring: A string that may contain wildcard characters ("*")
               (If filterstring is an array then results are OR'd together)
    RETURN VALUE:
      Either:
         Array of matching strings.
      or:
         Array of string indices.
      or:
         Byte array with same dimension as input string.
      Depends upon keyword setting (See below)

    KEYWORDS:
      STRING: if set then the matching strings are returned.  (default)
      INDEX:  if set then the indices are returned.
      BYTES:  if set then a byte array is returned with same dimension as input string.
      NEGATE: pass only strings that do NOT match.
      COUNT:  A named variable that will contain the number of matched strings.
    Limitations:
      This function still needs modification to accept the '?' character
      July 2000;  modified to use the IDL strmatch function so that '?' is accepted
    EXAMPLE:
      Print,strfilter(findfile('*'),'*.pro',/negate) ; print all files that do NOT end in .pro
    AUTHOR:
      Davin Larson,  Space Sciences Lab, Berkeley; Feb, 1999
    VERSION:  01/10/08

    (See .//strfilter.pro)

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

    PROCEDURE:  strplot, x, y
    INPUT:
                x:  array of x values.
                y:  array of y strings.
    PURPOSE:
        Procedure used to print strings in a "TPLOT" style plot.

    KEYWORDS:
        DATA:     A structure that contains the elements 'x', 'y.'  This
           is an alternative way of inputing the data.
        LIMITS:   The limits structure including PLOT and XYOUTS keywords.
        OVERPLOT: If set, then data is plotted over last plot.
        DI:       Not used. Exists for backward compatibility.

    LAST MODIFIED: @(#)strplot.pro	1.2 98/08/03

    (See .//strplot.pro)

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

    PROCEDURE:  str_element, struct,  tagname, value
    PURPOSE:
     Find (or add) an element of a structure.
     This procedure will not
     Input:
       struct,  generic structure
       tagname,    string  (tag name)
     Output:
       value,  Named variable in which value of the structure element is returned.
     Purpose:
       Retrieves the value of a structure element.  This function will not produce
       an error if the tag and/or structure does not exist.
    KEYWORDS:
      SUCCESS:  Named variable that will contain a 1 if the element was found
         or a 0 if not found.
      INDEX: a named variable in which the element index is returned.  The index
         will be -2 if struct is not a structure,  -1 if the tag is not found,
         and >= 0 if successful.
      ADD_REPLACE:  Set this keyword to add or replace a structure element.
      DELETE:   Set this keyword to delete the tagname.
      CLOSEST:  Set this keyword to allow near matchs (useful with _extra)
      VALUE: (obsolete) alternate method of returning value. (Will not work with recursion)
    Notes:
      Value remains unchanged if the structure element does not exist.
      If tagname contains a '.' then the structure is recursively searched and
        index will be an array of indices.
      If struct is an array then results may be unpredictable.

    Modifications:
      5/7/97: Added recursive searching of structure hierarchy.  D. Larson

    CREATED BY:	Davin Larson
    FILE:  str_element.pro
    VERSION  1.10
    LAST MODIFICATION: 01/10/08

    (See .//str_element.pro)

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

    FUNCTION: sub3d
    PURPOSE: Takes two 3D structures and returns a single 3D structure
      whose data is the difference of the two.
      This routine is useful for subtracting background counts.
      Integration period is considered if units are in counts.
    INPUTS: d1,d2  each must be 3D structures obtained from the get_?? routines
    	e.g. "get_el"
    RETURNS: single 3D structure

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)sub3d.pro	1.10 01/10/08

    Notes: This is a very crude subroutine. Use at your own risk.

    (See .//sub3d.pro)

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

    FUNCTION: sum3d
    PURPOSE: Takes two 3D structures and returns a single 3D structure
      whose data is the sum of the two
    INPUTS: d1,d2  each must be 3D structures obtained from the get_?? routines
    	e.g. "get_el"
    RETURNS: single 3D structure

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)sum3d.pro	1.8 02/04/17

    Notes: This is a very crude subroutine. Use at your own risk.

    (See .//sum3d.pro)

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

    FUNCTION:	symm3d
    PURPOSE:	Returns [theta,phi]  given a 3d data struct
    INPUT:
    	dat:	A 3d data structure such as those generated by get_el,get_pl,etc
    		e.g. "get_el"
    KEYWORDS:
    	esteps:		energy steps to use

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)symm3d.pro	1.5 95/10/06

    (See .//symm3d.pro)

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

    FUNCTION:	symmetry_dir
    PURPOSE:	Calculates symmetry direction
    INPUT:
    	Pt:	array of pts
    KEYWORDS:
    	none

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)symmetry_dir.pro	1.3 95/08/24

    (See .//symmetry_dir.pro)

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

    NAME:                  timebar
    PURPOSE:
                           plot vertical lines on tplots at specified times
    CALLING SEQUENCE:      timebar,t
    INPUTS:                t: dblarr of times at which to draw vertical lines,
    				seconds since Jan, 1, 1970.
    KEYWORD PARAMETERS:
    			COLOR:      byte or bytarr of color values
    			LINESTYLE:  int or intarr of linestyles
    			THICK:      int or intarr of line thicknesses
    	for any of the above keywords, a scalar input will apply to all times
    			VERBOSE: print more error messages; useful for
    				 debugging
    			VARNAME: TPLOT variable name indicating panel in which
    				 to plot timebar
    			BETWEEN: array of two TPLOT variable names indicating
    				 between which two panels to plot timebar
                           TRANSIENT:  timebar,t,/transient called once plots a
    				 timebar. Called twice, it deletes the timebar.
                                    Note:  1) all other keywords except VERBOSE
                                    be the same for both calls. 2) COLOR will most
                                    likely not come out what you ask for, but
                                    since it's transient anyway, shouldn't matter.
    OUTPUTS:
    OPTIONAL OUTPUTS:
    COMMON BLOCKS:         tplot_com
    EXAMPLE:               load_3dp_data,'95-01-01',2 & get_pmom
    			tplot,['Np','Tp','Vp']
    			t=time_double('95-01-01/1:12')
    			timebar,t ;put a white line at 1:12 am, Jan, 1, 1995
    			ctime,t1,t2 ;select two times from the plot
    			timebar,[t1,t2],color=!d.n_colors-2 ;plot them in red
    SEE ALSO:
      "CTIME","TPLOT"
    CREATED BY:            Frank V. Marcoline
    LAST MODIFICATION:     99/01/21
    FILE:                  1.9
    VERSION:               timebar.pro

    (See .//timebar.pro)

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

    FUNCTION:  timerange
    PURPOSE:	To get timespan from tplot_com or by using timespan, if
    		tplot time range not set.
    INPUT:
    	tr (optional)
    KEYWORDS:
    	none
    RETURNS:
        two element time range vector.  (double)

    SEE ALSO:	"timespan"
    REPLACES:  "get_timespan"
    CREATED BY:	Davin Larson

    (See .//timerange.pro)

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

    PROCEDURE:  timespan, t1, dt
    PURPOSE:
      Define a time span for the "tplot" routine.
    INPUTS:
        t1:  starting time (seconds since 1970 or string)
        dt:  duration of time span  (DAYS is default)
    KEYWORDS:   set one of the following:
      SECONDS
      MINUTES
      HOURS
      DAYS     (default)

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)timespan.pro	1.14 97/06/04

    (See .//timespan.pro)

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

    FUNCTION: time_double(time)
    NAME:
      time_double
    PURPOSE:
     A fast, vectorized routine that returns the number of seconds since 1970.
    INPUT:  input can be of type:
      double(s)      seconds since 1970   (returns the input)
      string(s)      format:  YYYY-MM-DD/hh:mm:ss  see "time_string"
      structure(s)   format returned in "time_struct"
      long array     (MUST be 2 dimensional!)  PB5 time  (req. by CDF)

    OUTPUT:
      double, number of seconds since 1970  (UNIX time)
    KEYWORDS:
      EPOCH:  if set, it implies the input is double precision EPOCH time.

    SEE ALSO:  "time_string", "time_struct", "time_epoch", "time_pb5"

    NOTE:
      This routine works on vectors and is designed to be fast.
      Output will have the same dimensions as the input
      Out of range values are interpreted correctly.
      ie.  1994-13-1/12:61:00  will be treated as:  1995-1-1/13:01:00

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  time_double.pro
    VERSION:  1.9
    LAST MODIFICATION:  01/07/12

    (See .//time_double.pro)

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

    NAME:
      time_epoch
    PURPOSE:
      Returns the EPOCH time required by CDF files.
    USAGE:
      epoch = time_epoch(t)
     NOT TESTED!!!

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  time_epoch.pro
    VERSION:  1.1
    LAST MODIFICATION:  96/10/16

    (See .//time_epoch.pro)

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

    NAME:
      time_pb5
    PURPOSE:
      Returns the PB5 time required by CDF files.
    USAGE:
      pb5 = time_pb5(t)
    OUTPUT:
      2 dimensional long integer array with dimensions:  (n,3)  Where n is the number
      of elements in t
    Not fully TESTED!!!!

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  time_pb5.pro
    VERSION:  1.3
    LAST MODIFICATION:  97/01/27

    (See .//time_pb5.pro)

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

    PROCEDURE:   time_stamp,charsize=charsize
    PURPOSE:
         Prints a time stamp along the lower right edge of the current plot box
    KEYWORDS:
         CHARSIZE:  The character size to be used.  Default is !p.charsize/2.
         ON:        if set, then timestamping is turned on. (No other action taken)
         OFF:       if set, then timestamping is turned off. (Until turned ON)

    (See .//time_stamp.pro)

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

    FUNCTION: time_string(time)
    NAME:
      time_string
    PURPOSE:
      Converts time to a date string.
    INPUT:  input can be a scaler or array of any dimension of type:
      double(s)      seconds since 1970
      string(s)      format:  YYYY-MM-DD/hh:mm:ss
      structure(s)   format:  given in "time_struct"
      float(s)
      longs(s)
                     values outside normal range will be corrected.
    KEYWORDS:
      FORMAT:         specifies output format.
        FORMAT=0:  YYYY-MM-DD/hh:mm:ss
        FORMAT=1:  YYYY Mon dd hhmm:ss
        FORMAT=2:  YYYYMMDD_hhmmss
        FORMAT=3:  YYYY MM dd hhmm:ss
      SQL:            produces output format: "YYYY-MM-DD hh:mm:ss.sss"
                      (quotes included) which convenient for building SQL queries.
      PRECISION:      specifies precision
          -5:   Year only
          -4:   Year, month
          -3:   Year, month, date
          -2:   Year, month, date, hour
          -1:   Year, month, date, hour, minute
           0:   Year, month, date, hour, minute, sec
          >0:   millisecs
      AUTOPREC  If set PREC will automatically be set based on the array of times
      DELTAT:   (float) PREC set based on this precision.
      DATE_ONLY:   Same as PREC = -3
      MSEC:        Same as PREC = 3

    OUTPUT:
      string with the following format: YYYY-MM-DD/hh:mm:ss (Unless
      modified by keywords.)

    See Also:  "time_double"  , "time_struct" or "time_ticks"

    NOTE:
      This routine works on vectors and is designed to be fast.
      Output will have the same dimensions as the input.

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  time_string.pro
    VERSION:  1.14
    LAST MODIFICATION:  02/11/01

    (See .//time_string.pro)

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

    FUNCTION: time_struct(time)
    NAME:
      time_struct
    PURPOSE:
     A fast, vectorized routine that returns a time structure.
    INPUT:  input can be of type:
      double(s)      seconds since 1970
      string(s)      format:  YYYY-MM-DD/hh:mm:ss
      structure(s)   similar to format below.

    OUTPUT:
      structure with the following format:
    ** Structure TIME_STRUCT, 11 tags, length=40:
       YEAR            INT           1970            ; year    (0-14699)
       MONTH           INT              1            ; month   (1-12)
       DATE            INT              1            ; date    (1-31)
       HOUR            INT              0            ; hours   (0-23)
       MIN             INT              0            ; minutes (0-59)
       SEC             INT              0            ; seconds (0-59)
       FSEC            DOUBLE           0.0000000    ; fractional seconds (0-.999999)
       DAYNUM          LONG            719162        ; days since 0 AD  (subject to change)
       DOY             INT              0            ; day of year (1-366)
       DOW             INT              3            ; day of week  (subject to change)
       SOD             DOUBLE           0.0000000    ; seconds of day

    See Also:  "time_double", "time_string", "time_epoch", "time_pb5"

    NOTE:
      This routine works on vectors and is designed to be fast.
      Output will have the same dimensions as the input

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  time_struct.pro
    VERSION:  1.15
    LAST MODIFICATION:  02/11/01

    (See .//time_struct.pro)

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

    FUNCTION:  time_tk_str = time_ticks(timerange,offset)
    NAME:
      time_ticks
    PURPOSE:
      Returns a structure that can be used to create time ticks for a plot.
      See "timetick" for more info
    INPUT:
      timerange: Two element vector specifying the time range of the plot
          this input can be obtained from: "time_double", "time_struct"
          or "time_string"
      offset: named variable in which offset time is placed.
    KEYWORDS:
      NUM_LAB_MIN:   minimum number of labels for bottom axis.

    OUTPUT:
      a structure that can be used with the _EXTRA keyword of the PLOT routine

    See Also: "box", "tplot"

     NOTES:

         The returned time_tk_str has tags named so that it can be used
         with the special _EXTRA keyword in the call to PLOT or OPLOT.

         The offset value that is returned from timetick must be
         subtracted from the time-axis data values before plotting.
         This is to maintain resolution in the PLOT routines, which use
         single precision floating point internally.  Remember that if
         the CURSOR routine is used to read a cursor position from the
         plot, this offset will need to be added back to the time-axis
         value to get seconds since  1970-01-01/00:00:00.

    NOTE:
      This routine is an enhanced version of the routine "timetick"
      See this routine for more info on usage

    WARNING!:
      This routine does not yet work on very small time scales.

    CREATED BY:	Davin Larson  Oct 1996
    FILE:  time_ticks.pro
    VERSION:  1.16
    LAST MODIFICATION:  02/04/17

    (See .//time_ticks.pro)

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

    PROCEDURE:   tlimit,t1,t2
    PURPOSE:  defines time range for "tplot"
    	   (tplot must be called first)
    INPUTS:  Starting and Ending times.  These can be string, double (seconds
       since 1970), or hours since refdate.  If no Input is given then the cursor
       is used to select times from the most recent time plot.
    KEYWORD:
    	REFDATE:   new TPLOT reference data in seconds (double).
    	FULL:	   use full limits.
    	LAST:	   use the last plot's limits.
    	ZOOM:	   set to a value between 0 (no range in times) and 1 (full
    		   time range) to zoom in on the center of the time range.
    	WINDOW:    window in which to plot new time range.
    	OLD_TVARS: use this to pass an existing tplot_vars structure and
    		   override the one in the tplot_com common block.  This
    		   can be used to select which window and set of data to
    		   define a time range in.
    	NEW_TVARS: returns the tplot_vars structure created when plotting
    		   the newly defined time range.
    	DAYS, HOURS, MINUTES, SECONDS: passed to "ctime" for cursor input of
    		   time range.
    EXAMPLES:
       tlimit                     ; Use the cursor
       tlimit,'12:30','14:30'
       tlimit, 12.5, 14.5
       tlimit,t,t+3600            ; t must be set previously
       tlimit,/FULL               ; full limits
       tlimit,/LAST               ; previous limits

    CREATED BY:	Davin Larson
    FILE:  tlimit.pro
    VERSION:  1.26
    LAST MODIFICATION:  98/08/06

    (See .//tlimit.pro)

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

    FUNCTION:              names=tnames(s [,n])
    PURPOSE:
                           Returns an array of "TPLOT" names
                           This routine accepts wildcard characters.
    CALLING SEQUENCE:      nam=tnames('wi*') ; match tplot variables that start with 'wi'
    INPUTS:                s: a match string (ie.  '*B3*' )
    OPTIONAL INPUTS:       s: an array of indices for tplot variables
    KEYWORD PARAMETERS:
     INDEX:    the indices
    OUTPUTS:               a data name or array of data names
    OTHER OUTPUTS:         n: the number of matched strings
    COMMON BLOCKS:         tplot_com
    SIDE EFFECTS:          none
    EXAMPLE:               print,tnames('*wi*')
    VERSION: 	1.8  @(#)tnames.pro	1.8 02/11/01
    copied from iton.pro
    CREATED BY:            Davin Larson   Feb 1999

    (See .//tnames.pro)

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

    PROCEDURE:   tplot  [,datanames]
    PURPOSE:
       Creates a time series plot of user defined quantities.
    INPUT:
       datanames: A string of space separated datanames.
                 wildcard expansion is supported.
                 if datanames is not supplied then the last values are used.
                 Each name should be associated with a data quantity.
                 (see the "STORE_DATA" and "GET_DATA" routines.)
                 Alternatively datanames can be an array of integers or strings.
                 run "TPLOT_NAMES" to show the current numbering.

    KEYWORDS:
       TITLE:    A string to be used for the title. Remembered for future plots.
       ADD_VAR:  Set this variable to add datanames to the previous plot.  If set
    	      to 1, the new panels will appear at the top (position 1) of the
    	      plot.  If set to 2, they will be inserted directly after the
    	      first panel and so on.  Set this to a value greater than the
    	      existing number of panels in your tplot window to add panels to
                 the bottom of the plot.
       LASTVAR:  Set this variable to plot the previous variables plotted in a
    	      TPLOT window.
       PICK:     Set this keyword to choose new order of plot panels
                 using the mouse.
       WINDOW:   Window to be used for all time plots.  If set to -1, then the
                 current window is used.
       VAR_LABEL:  String [array]; Variable(s) used for putting labels along
         the bottom. This allows quantities such as altitude to be labeled.
       VERSION:  Must be 1,2,3, or 4 (3 is default)  Uses a different labeling
    	scheme.  Version 4 is for rocket-type time scales.
       OVERPLOT: Will not erase the previous screen if set.
       NAMES:    The names of the tplot variables that are plotted.
       NOCOLOR:  Set this to produce plot without color.
       TRANGE:   Time range for tplot.
       NEW_TVARS:  Returns the tplot_vars structure for the plot created. Set
    	      aside the structure so that it may be restored using the
                 OLD_TVARS keyword later. This structure includes information
                 about various TPLOT options and settings and can be used to
                 recreates a plot.
       OLD_TVARS:  Use this to pass an existing tplot_vars structure to
    		override the one in the tplot_com common block.
       HELP:     Set this to print the contents of the tplot_vars.options
    	      (user-defined options) structure.

    RESTRICTIONS:
       Some data must be loaded prior to trying to plot it.  Try running
       "_GET_EXAMPLE_DAT" for a test.

    EXAMPLES:  (assumes "_GET_EXAMPLE_DAT" has been run)
       tplot,'amp slp flx2' ;Plots the named quantities
       tplot,'flx1',/ADD          ;Add the quantity 'flx1'.
       tplot                      ;Re-plot the last variables.
       tplot,var_label=['alt']   ;Put Distance labels at the bottom.
           For a long list of examples see "_TPLOT_EXAMPLE"

    OTHER RELATED ROUTINES:
       Examples of most usages of TPLOT and related routines are in
          the crib sheet: "_TPLOT_EXAMPLE"
       Use "TNAMES" function to return an array of current names.
       Use "TPLOT_NAMES" to print a list of acceptable names to plot.
       Use "TPLOT_OPTIONS" for setting various global options.
       Plot limits can be set with the "YLIM" procedure.
       Spectrogram limits can be set with the "ZLIM" procedure.
       Time limits can be set with the "TLIMIT" procedure.
       The "OPTIONS" procedure can be used to set all IDL
          plotting keyword parameters (i.e. psym, color, linestyle, etc) as well
          as some keywords that are specific to tplot (i.e. panel_size, labels,
          etc.)  For example, to change the relative panel width for the quantity
          'slp', run the following:
                OPTIONS,'slp','panel_size',1.5
       TPLOT calls the routine "SPECPLOT" to make spectrograms and
          calls "MPLOT" to make the line plots. See these routines to determine
          what other options are available.
       Use "GET_DATA" to retrieve the data structure (or
          limit structure) associated with a TPLOT quantity.
       Use "STORE_DATA" to create new TPLOT quantities to plot.
       The routine "DATA_CUT" can be used to extract interpolated data.
       The routine "TSAMPLE" can also be used to extract data.
       Time stamping is performed with the routine "TIME_STAMP".
       Use "CTIME" or "GETTIME" to obtain time values.
       tplot variables can be stored in files using "TPLOT_SAVE" and loaded
          again using "TPLOT_RESTORE"

    CREATED BY:	Davin Larson  June 1995
    FILE:  tplot.pro
    VERSION:  1.97
    LAST MODIFICATION:  02/11/01

    (See .//tplot.pro)

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

    COMMON BLOCK:  tplot_com

    WARNING!  THIS COMMON BLOCK IS SUBJECT TO CHANGE!  DON'T BE TOO SURPRISED
       IF VARIABLES ARE ADDED, CHANGED, OR DISAPPEAR!

       data_quants:  structure array,  handle to location of ALL data.
       tplot_vars:   structure containing all tplot window and plotting
    			 information.
    SEE ALSO:   "tplot_options" and "tplot"
    MODIFIED BY:	Peter Schroeder
    CREATED BY:	Davin Larson
    LAST MODIFICATION: 01/10/08
    VERSION: @(#)tplot_com.pro	1.21

    (See .//tplot_com.pro)

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

    PROCEDURE:  tplot_file , name [,filename]
    PURPOSE:
       OBSOLETE PROCEDURE!  Use "TPLOT_SAVE" and "TPLOT_RESTORE" instead.
       Store tplot data in a file.
      gets the data, limits and name handle associated with a name string
       This procedure is used by the tplot routines.
    INPUT:
       name    (string, tplot handle)
       filename:  file name
    KEYWORDS:
       SAVE:   set to save files.
       RESTORE:set to restore files.
    SEE ALSO:      "STORE_DATA", "GET_DATA", "TPLOT"

    CREATED BY:    Davin Larson
    LAST MODIFICATION:     tplot_file.pro   98/08/06

    (See .//tplot_file.pro)

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

    PROCEDURE:	tplot_keys
    PURPOSE:
    	Sets up function keys on user keyboard to perform frequent "tplot"
    	functions and procedures.  Definitions will be explained when run.
    INPUT:	(none)
    OUTPUT: (none)
    CREATED BY:	Davin Larson
    LAST MODIFIED:	@(#)tplot_keys.pro	1.5 02/11/22

    (See .//tplot_keys.pro)

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

    PROCEDURE:  tplot_names [, datanames ]
    PURPOSE:
       Lists current stored data names that can be plotted with the TPLOT routines.
    INPUT:   (Optional)  An string (or array of strings) to be displayed
             The strings may contain wildcard characters.
    Optional array of strings.  Each string should be associated with a data
           quantity.  (see the "store_data" and "get_data" routines)
    KEYWORDS:
      TIME_RANGE:  Set this keyword to print out the time range for each quantity.
      CREATE_TIME: Set to print creation time.
      VERBOSE:     Set this keyword to print out more info on the data structures
      NAMES:       Named variable in which the array of valid data names is returned.
      ASORT:       Set to sort by name.
      TSORT:       Set to sort by creation time.
      CURRENT:     Set to display only names in last call to tplot.
    EXAMPLE
       tplot_names,'*3dp*'   ; display all names with '3dp' in the name
    CREATED BY:	Davin Larson
    SEE ALSO:   "TNAMES"  "TPLOT"
    MODS:     Accepts wildcards
    LAST MODIFICATION:	@(#)tplot_names.pro	1.19 01/10/08

    (See .//tplot_names.pro)

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

    PROCEDURE:  tplot_options [,string,value]
    NAME:
      tplot_options
    PURPOSE:
      Sets global options for the "tplot" routine.
    INPUTS:
       string: 	option to be set.
       value:	value to be given the option.
    KEYWORDS:
       HELP:      Display current options structure.
       VAR_LABEL:   String [array], variable[s] to be used for plot labels.
       FULL_TRANGE: 2 element double array specifying the full time range.
       TRANGE:      2 element double array specifying the current time range.
       DATANAMES:  String containing names of variable to plot
       REFDATE:    Reference date.  String with format: 'YYYY-MM-DD'.
             This reference date is used with the gettime subroutine.
       WINDOW:     Window to be used for all time plots. (-1 specifies current
           window.
       VERSION:    plot label version. (1 or 2 or 3)
       TITLE:	string used for the tplot title
       OPTIONS:	tplot options structure to be passed to replace the current
    		structure.
       GET_OPTIONS:returns the new tplot options structure.
    EXAMPLES:
       tplot_options,'ynozero',1          ; set all panels to YNOZERO=1
       tplot_options,'title','My Data'    ; Set title
       tplot_options,'xmargin',[10,10]    ; Set left/right margins to 10 characters
       tplot_options,'ymargin',[4,2]      ; Set top/bottom margins to 4/2 lines
       tplot_options,'position',[.25,.25,.75,.75]  ; Set plot position (normal coord)
       tplot_options,'wshow',1             ; de-iconify window with each tplot
       tplot_options,'version',3          ; Sets the best time ticks possible
       tplot_options,'window',0           ; Makes tplot always use window 0
       tplot_options,/help                ; Display current options
       tplot_options,get_options=opt      ; get option structure in the variable opt.

    SEE ALSO:  "TPLOT", "OPTIONS", "TPLOT_COM"
    CREATED BY:  Davin Larson   95/08/29
    LAST MODIFICATION: 01/10/08
    VERSION: @(#)tplot_options.pro	1.16

    (See .//tplot_options.pro)

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

    PROCEDURE: tplot_panel [,time,y]
    INPUTS: (optional)
       time:      dblarr of time values associated with a variable to overplot
    	       in a designated "tplot" panel.
       y:	       array of variable values to be plotted.
    KEYWORDS:
       VARIABLE:  (string) name of previously plotted tplot variable.
       OPLOTVAR:  Data that will be plotted on top of the selected panel
       DELTATIME: Named variable in which time offset is returned.
       PANEL:     Returns panel number of designated tplot variable.
       PSYM:      Sets the IDL plot PSYM value for overplot data.
    PURPOSE:
      Sets the graphics parameters to the specified tplot panel.
      The time offset is returned through the optional keyword DELTATIME.

    LAST MODIFICATION:	@(#)tplot_panel.pro	1.9 02/04/17

    (See .//tplot_panel.pro)

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

    NAME:               tplot_positions
    PURPOSE:
                        Return a set of plot positions for tplot.
                        Given the number of plots, the margins, and the relative
                        sizes of the plot panels, determine the plot coordinates.
                        The positions are the device coordinates of the plot, not
                        of the plot region. (See IDL User's Guide Chapter 14.10)

                        If the margins are not specifically set, first the limit
                        structures are checked, then ![x,y].margin are checked,
                        then some defaults are used.

    CALLING SEQUENCE:   positions = tplot_positions(panels)

    INPUTS:             panels: the number of plots, an integer

    KEYWORD PARAMETERS: xm,xom,ym,yom: the x and y inner and outer margins
                               these are two element arrays. ![x,y].margin
     			    and ![x,y].omargin are used if left off
                        sizes: fltarr(panels) containing the relative plot sizes

    OUTPUTS:            positions = fltarr(4,n_elements(panels))
                               positions(*,i) is the ith plot position
                               (x0,y0,x1,y1)
    EXAMPLE:

    LAST MODIFICATION:  @(#)tplot_positions.pro	1.2 97/05/30

    (See .//tplot_positions.pro)

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

    PROCEDURE: tplot_quant__define

     This procedure defines the tplot_quant structure.

    (See .//tplot_quant__define.pro)

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

    PROCEDURE:  tplot_restore ,filenames=filenames, all=all, sort=sort
    PURPOSE:
       Restores tplot data, limits, name handles, options, and settings.
    INPUT:
    KEYWORDS:
       filenames:  file name or array of filenames to restore.  If
                   no file name is chosen and the all keyword is not set,
    		tplot_restore will look for and restore a file called
    		saved.tplot.
       all: restore all *.tplot files in current directory
       append: append saved data to existing tplot variables
       sort: sort data by time after loading in
       get_tvars: load tplot_vars structure (the structure containing tplot
    		options and settings even if such a structure already exists
    		in the current session.  The default is to only load these
    		if no such structure currently exists in the session.
    SEE ALSO:      "TPLOT_SAVE","STORE_DATA", "GET_DATA", "TPLOT"

    CREATED BY:    Peter Schroeder
    LAST MODIFICATION:     @(#)tplot_restore.pro	1.23 02/11/01

    (See .//tplot_restore.pro)

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

    PROCEDURE:  tplot_save , name ,filename=filename, limits=limits
    PURPOSE:
       Store tplot data in a file.
    INPUT:
       name:   (optional) tplot handle or array of tplot handles to save.  If
    	    no name is supplied, tplot_save will save all defined tplot
    	    handles.
    KEYWORDS:
       filename:  file name in which to save data.  A default suffix of .tplot or
    	       .lim will be added to this depending on whether the limits
                  keyword has been set.  If not given, the default file name is
    	       saved.tplot or saved.lim.
       limits:    will save only limits structures.  No data will be saved.
    SEE ALSO:      "STORE_DATA", "GET_DATA", "TPLOT", "TPLOT_RESTORE"

    CREATED BY:    Peter Schroeder
    LAST MODIFICATION:     tplot_save.pro   97/05/14

    (See .//tplot_save.pro)

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

    PROCEDURE:  tplot_sort,name
    PURPOSE:
       Sorts tplot data by time (or x).
    INPUT:
       name: name of tplot variable to be sorted.
    KEYWORDS:

    CREATED BY:    Peter Schroeder
    LAST MODIFICATION:     %W% %E%

    (See .//tplot_sort.pro)

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

    FUNCTION:   trange_str,t1,t2
    INPUT:  t1,t2   doubles,   seconds since 1970
    OUTPUT:  string  with the format:  'YYYY-MM-DD/HH:MM:SS - HH:MM:SS'

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)trange_str.pro	1.10 97/12/22

    (See .//trange_str.pro)

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

    NAME:
    	transform_velocity

    PROCEDURE:   transform_velocity,  vel, theta, phi,  deltav
    PURPOSE:  used by the convert_vframe routine to transform arrays of velocity
        thetas and phis by the offset deltav
    INPUT:
      vel:  array of velocities
      theta: array of theta values
      phi:   array of phi values
      deltav: [vx,vy,vz]  (transformation velocity)
    KEYWORDS:
    	vx,vy,vz:	return vx,vy,vz separately as well as in vector form

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)convert_vframe.pro	1.21 02/11/01

    (See .//convert_vframe.pro)

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

    FUNCTION:	t_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//t_3d.pro)

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

    PROCEDURE:  units
    PURPOSE:    adds the tag 'units' to the structure "struct"
    INPUTS:
       struct:  structure to be added to.  (Created if non-existent)
       units:     string containing units name.
    Typical usage:
       units,lim,'Counts'

    CREATED BY:	Davin Larson
    LAST MODIFICATION: 	@(#)units.pro	1.4 02/04/17

    (See .//units.pro)

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

    FUNCTION:	vth_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//vth_3d.pro)

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

    FUNCTION:	v_3d(dat,ENERGY=en,ERANGE=er,EBINS=ebins,ANGLE=an,ARANGE=ar,BINS=bins)
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    KEYWORDS
    	ENERGY:	fltarr(2),	optional, min,max energy range for integration
    	ERANGE:	fltarr(2),	optional, min,max energy bin numbers for integration
    	EBINS:	bytarr(na),	optional, energy bins array for integration
    					0,1=exclude,include,
    					na = dat.nenergy
    	ANGLE:	fltarr(2,2),	optional, angle range for integration
    				theta min,max (0,0),(1,0) -90
    (See .//v_3d.pro)

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

    PROCEDURE: 	wi, wnum

    PURPOSE:	Switch or open windows.

    INPUT:
    	wnum - the window number.

    CREATED BY:	REE, 95-10-23
    FILE: wi.pro
    VERSION: 1.6
    LAST MODIFICATION: 97/06/03

    (See .//wi.pro)

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

    PROCEDURE:  xlim,lim, [min,max, [log]]
    PURPOSE:
       To set plotting limits for plotting routines.
       This procedure will add the tags 'xrange', 'xstyle' and 'xlog' to the
       structure lim.  This structure can be used in other plotting routines such
       as "SPEC3D".
    INPUTS:
       lim:     structure to be added to.  (Created if non-existent)
       min:     min value of range
       max:     max value of range
    KEYWORDS:
       LOG:  (optional)  0: linear,   1: log
    See also:  "OPTIONS", "YLIM", "ZLIM"
    Typical usage:
       xlim,lim,-20,100      ; create a variable called lim that can be passed to
                             ; a plotting routine such as "SPEC3D".

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)xlim.pro	1.9 02/04/17

    (See .//xlim.pro)

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

    PROCEDURE:  xyz_to_polar,xyz
    PURPOSE: Calculates magnitude, theta and phi given a 3 vector
    INPUT:   several options exist for xyz:
        string:    data associated with the string is used.
        structure: data.y is assumed to contain the xyz array
        array(n,3)   n by (x,y,z components)
        array(3)      vector:  [x,y,z]
    RETURN VALUES: through the keywords.  Same dimensions and type as the
        input value of x.
    KEYWORDS:    Named variables in which results are put
       MAGNITUDE:
       THETA:
       PHI:
       MAX_VALUE:
       MIN_VALUE:
       MISSING:
    OPTION KEYWORDS:  These are used to set "cart_to_sphere" opts.
       CO_LATITUDE:   If set theta will be in co-latitude. (0<=theta<=180)
       PH_0_360:      If set positive, 0<=phi<=360, if zero, -180<=phi<=180.
                      If set negative, will guess the best phi range.
       PH_HIST:       A 2 element vector, a min and max histeresis value.
    EXAMPLES:

         Passing arrays:
    x = findgen(100)
    y = 2*x
    z = x-20
    vecs = [[x],[y],[z]]
    xyz_to_polar,vecs,mag=mag      ;mag will be the magnitude of the array.

         Passing a structure:
    dat = {ytitle:'Vector',x:findgen(100),y:vecs}
    xyz_to_polar,dat,mag=mag,theta=th,phi=ph
    mag,th and ph will be all be structures.

         Passing a string:  (see store_data, get_data)
    xyz_to_polar,'Vp'   ; This assumes data has been created for this string.
        This will compute new data quantities: 'Vp_mag','Vp_th','Vp_ph'

    (See .//xyz_to_polar.pro)

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

    PROCEDURE:  ylim [, str [ , min, max, [ LOG=log ] ] ]
    PURPOSE:
      Sets y-axis limits for plotting routines.
      Adds the tags 'yrange', 'ystyle' and 'ylog' to the structure str, or to the
      limit structure associated with the string str.
    INPUTS:
       str is a:
          CASE 1: structure (or zero or non-existent)
             Structure to be added to.  (Created if non-existent)
          CASE 2: string  (handle associated with a "TPLOT" variable)
             The limits structure associated with this string is used.  This
             structure can be retrieved with the "GET_DATA" procedure.
       min:     min value of yrange
       max:     max value of yrange
    KEYWORDS:
       LOG:   (optional)  0: linear,   1: log
       DEFAULT:   Sets default tplot limits.
       STYLE:  value to set the IDL plot YSTYLE keyword
    Typical usage:
       ylim,lim,-20,100   ; create (or add to) the structure lim

       ylim,'Ne',.01,100,1  ; Change limits of the "TPLOT" variable 'Ne'.

    NO INPUTS:
       ylim                 ; Set "TPLOT" limits using the cursor.

    SEE ALSO:  "OPTIONS", "TLIMIT", "XLIM", "ZLIM"
    CREATED BY:	Davin Larson
    VERSION: ylim.pro
    LAST MODIFICATION: 01/06/25

    (See .//ylim.pro)

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

    PROCEDURE: ylimit
    PURPOSE:  Interactive setting of y-limits for the "TPLOT" procedure.

    SEE ALSO:	"YLIM", a noninteractive version which calls this routine.

    NOTES:  This procedure will probably be made obsolete by embedding it in.
        "YLIM".
            Run "TPLOT" prior to using this procedure.

    CREATED BY:	Davin Larson
    FILE: ylimit.pro
    VERSION:  1.11
    LAST MODIFICATION: 98/08/06

    (See .//ylimit.pro)

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

    PROCEDURE:  zlim,lim, [min,max, [log]]
    PURPOSE:
       To set plotting limits for plotting routines.
       This procedure will add the tags 'zrange', 'zstyle' and 'xlog' to the
       structure lim.  This structure can be used in other plotting routines.
    INPUTS:
       lim:     structure to be added to.  (Created if non-existent)
       min:     min value of range
       max:     max value of range
       log:  (optional)  0: linear,   1: log
    If lim is a string then the limit structure associated with that "TPLOT"
       variable is modified.
    See also:  "OPTIONS", "YLIM", "XLIM", "SPEC"
    Typical usage:
       zlim,'ehspec',1e-2,1e6,1   ; Change color limits of the "TPLOT" variable
                                  ; 'ehspec'.

    CREATED BY:	Davin Larson
    LAST MODIFICATION:	@(#)zlim.pro	1.2 02/11/01

    (See .//zlim.pro)

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

    PROCEDURE: _get_example_dat
    NAME:
      _get_example_dat
    PURPOSE:
      A procedure that generates sample data for "TPLOT".
      See the crib sheet: "_tplot_example" for instructions on using this routine.

    CREATED BY:	Davin Larson  96-2-19
    FILE:  _get_example_dat.pro
    VERSION:  1.4
    LAST MODIFICATION:  96/10/14

    (See .//_get_example_dat.pro)

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

    DEMONSTRATION OF TPLOT AND RELATED ROUTINES
    PURPOSE:
      A sample crib sheet that explains how to use the "TPLOT" procedure.

    Written by Peter Schroeder 97-9-17

    (See .//_tplot_demo.pro)

    _TPLOT_EXAMPLE
    [Previous Routine]
    [List of Routines]

    CRIB SHEET EXAMPLE
    PURPOSE:
      A sample crib sheet that explains how to use the "TPLOT" procedure.

    Written by Davin Larson 96-2-19

    (See .//_tplot_example.pro)