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

Last modified: Thu Apr 9 01:15:17 2009.

# Directory Listing of Routines

# ssl_general/tools/tplot

- ADD_DATA
  Creates a tplot variable that is the difference of two tplot variables.
- ANG_DATA
  Creates a tplot variable that is the angle between two tplot variables.
- AVG_DATA
  Creates a new tplot variable that is the time average of original.
- DERIV_DATA
  Creates a tplot variable that is the derivative of a tplot variable.
- DIF_DATA
  Creates a tplot variable that is the difference of two tplot variables.
- DIV_DATA
  Creates a tplot variable that is the ratio of two other tplot variables.
- INTERP_GAP
- LOAD_WI_ELPD5
  loads WIND 3D Plasma Experiment key parameter data for "tplot".
- LOAD_WI_PDFIT
  loads WIND 3D Plasma Experiment key parameter data for "tplot".
- MULT_DATA
  Creates a tplot variable that is the product of two other tplot variables.
- NUL_DATA
  Null out a range of tplot data.
- TDEXISTS
- TPLOT_ASCII
- TSAMPLE
  Returns a vector (or array) of tplot data values.
- TSAMPLE2
  Returns a vector (or array) of tplot data values.

# Routine Descriptions

## ADD_DATA

[Next Routine] [List of Routines]

    PROCEDURE: add_data, n1,n2
    PURPOSE:
       Creates a tplot variable that is the difference of two tplot variables.
    INPUT: n1,n2  tplot variable names (strings)

(See ssl_general/tools/tplot/add_data.pro)

## ANG_DATA

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

    PROCEDURE: ang_data, n1,n2
    PURPOSE:
       Creates a tplot variable that is the angle between two tplot variables.
    INPUT: n1,n2  tplot variable names (strings)
       These should each be 3 element vectors

(See ssl_general/tools/tplot/ang_data.pro)

## AVG_DATA

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

    PROCEDURE: avg_data, name, res
    PURPOSE:
       Creates a new tplot variable that is the time average of original.
    INPUT: name  tplot variable names (strings)

(See ssl_general/tools/tplot/avg_data.pro)

## DERIV_DATA

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

    PROCEDURE: deriv_data, n1,n2
    PURPOSE:
       Creates a tplot variable that is the derivative of a tplot variable.
    INPUT: n1  tplot variable names (strings)

    Keywords:
     newname: the name of the tplot variable in which output should be
        stored. This will produce an error if you use this option with globbing.

     nsmooth: If this keyword is set smoothing will be performed.  The
     number you set this keyword equal to is the width of the smoothing
     to be applied to the data.  It is the same as the
     width argument to the idl smooth procedure. To get an explanation of
    how this keyword works please see the idl documentation for the
    'width' keyword to the idl 'smooth' procedure.

     suffix: the suffix to be applied to the input data.  Use this if you
     want to call this procedure on multiple tplot variables
    simultaneously.

     replace: set this keyword if you want to replace the original
    variables with the new values

     Examples:
          deriv_data,'thb_fgs_dsl'
          deriv_data,'th?_fgs_dsl',suffix='_fgsderiv'
          deriv_data,'thb_fgs_dsl thb_state_pos',nsmth=2
          deriv_data,'thb_fgs_dsl',newname='fgs_derivd'
          deriv_data,'the_*',/replace

     $LastChangedBy: jimm $
     $LastChangedDate: 2008-04-28 13:27:07 -0700 (Mon, 28 Apr 2008) $
     $LastChangedRevision: 2851 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/branches/tdas_4_00/idl/themis/common/thm_config.pro $

(See ssl_general/tools/tplot/deriv_data.pro)

## DIF_DATA

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

    PROCEDURE: dif_data, n1,n2
    PURPOSE:
       Creates a tplot variable that is the difference of two tplot variables.
    INPUT: n1,n2  tplot variable names (strings)

(See ssl_general/tools/tplot/dif_data.pro)

## DIV_DATA

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

    PROCEDURE: div_data, n1,n2
    PURPOSE:
       Creates a tplot variable that is the ratio of two other tplot variables.
    INPUT: n1,n2  tplot variable names (strings)

(See ssl_general/tools/tplot/div_data.pro)

## INTERP_GAP

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

    Procedure interp_gap,x,y,index=wb,count=c
    replaces NANs with interpolated values.

(See ssl_general/tools/tplot/interp_gap.pro)

## LOAD_WI_ELPD5

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

    PROCEDURE:	load_wi_elpd5
    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_elpd4.pro
    LAST MODIFICATION: 99/05/27

(See ssl_general/tools/tplot/load_wi_elpd5.pro)

## LOAD_WI_PDFIT

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

    PROCEDURE:	load_wi_pdfit
    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_elpd4.pro
    LAST MODIFICATION: 99/05/27

(See ssl_general/tools/tplot/load_wi_pdfit.pro)

## MULT_DATA

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

    PROCEDURE: mult_data, n1,n2
    PURPOSE:
       Creates a tplot variable that is the product of two other tplot variables.
    INPUT: n1,n2  tplot variable names (strings)

(See ssl_general/tools/tplot/mult_data.pro)

## NUL_DATA

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

    PROCEDURE: nul_data
    PURPOSE:
       Null out a range of tplot data.
    INPUT: none yet

(See ssl_general/tools/tplot/nul_data.pro)

## TDEXISTS

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

    function: tdexists

     purpose: Checks to see if a tplot variable exists and if its data
     exists. Exists means that there is data on the specified interval
     and that the data is not all NaNs

     Inputs:

     tvarname: A name or names to be checked(accepts type globs)
     start_time: a start datetime for the interval
     end_time: an end datetime for the interval

     Keywords:

      dims: set this keyword to a number if you want the function also to verify that
        the data has that number of elements in its second dimension.  For
        example, if you set dims = 3, it will verify that the y component
        of the tplot variable is Nx3.

     NOTES:
        If you pass in a list of variables, this routine will return 0 if
        any of them do not exist or they do not have data on the
        interval.
        If you use globbing, it will return 0 if no variables match the
        glob and 0 if any of the variables that match the glob do not
        have data on the interval.
        On the other hand, if, for example,
        you expect that 2 variables should match the glob, but only one is
        present or only one matches and that has data, it will return
        true, because it cannot predict how many variables you expect to
        exist if you do not explictly specify them.

        This routine always returns 0 if the size(d.y,/n_dim) gt 3
        Where d is the data struct of a tplot variable

     $LastChangedBy: pcruce $
     $LastChangedDate: 2008-05-21 16:19:20 -0700 (Wed, 21 May 2008) $
     $LastChangedRevision: 3144 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/tools/tplot/tdexists.pro $

(See ssl_general/tools/tplot/tdexists.pro)

## TPLOT_ASCII

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

    Procedure:  tplot_ascii
    Purpose:
      Creates an ascii file for selected tplot variables.
    Input:
      Names names of tplot variables. May use glob patterns  to specify
            a set of variables.
    Keywords:
      fname: file name, by default 'tplot_name' where name is set to
    		  tvar[n] (variable name)
      Ext:  by default, a separate file will be created in the
            current directory with name tplot_name.txt.  Use this
            keyword to set the .txt extension to a different extension.
      dir:  Put output  in dir as opposed to current working directory.
      precise: increases precision to maximum
      trange: array[2] of double  or string. Specify time range for output.
      header: optional keyword, if set ascii file will contain header information
    History:
      08-Jul-2008, cg, added formating to handle 3 d data sets
      09-may-2008, cg, added format statement to print so that the values didn't
                   run together
      09-may-2008, cg, added use of precision keyword, set default value = 3
      29-apr-2008, cg, fixed bug with dlimits
      28-mar-2008, cg, added keyword fname to allow user to specify a file
                   name (thm_ui_dproc procedure determines and passes the
                   filename)
      28-mar-2008, cg, added file header
      27-aug-2008, cg, added another time precision keyword /msec to print format

(See ssl_general/tools/tplot/tplot_ascii.pro)

## TSAMPLE

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

    FUNCTION:
      dat = tsample([var,trange],[times=t])
    PURPOSE:
      Returns a vector (or array) of tplot data values.
    USAGE:
      dat = tsample()               ;Use cursor to select a subset of data.
      dat = tsample('Np',[t0,t1])   ;extract all 'Np' data in the given time range
    KEYWORDS:
      AVERAGE:  if set the time average of the variable is returned
      TIMES:  time values returned through this (named) variable keyword.
      VALUES: values returned through this named variable keyword.
      DY :  dy values returned through this named variable keyword.

(See ssl_general/tools/tplot/tsample.pro)

## TSAMPLE2

[Previous Routine] [List of Routines]

    FUNCTION:
      dat = tsample([var,trange],[times=t])
    PURPOSE:
      Returns a vector (or array) of tplot data values.
    USAGE:
      dat = tsample()               ;Use cursor to select a subset of data.
      dat = tsample('Np',[t0,t1])   ;extract all 'Np' data in the given time range
    KEYWORDS:
      times:  time values returned through this keyword.
      values: values returned through this keyword.
      dy :  dy values

(See ssl_general/tools/tplot/tsample2.pro)