Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/misc/

tuserdef.pro


Routines

Routines from tuserdef.pro

dummy_var, inp
string_parser, inpx, parse_by, out, output_count

NAME: string_parserPURPOSE: Parse strings into componentsCALLING SEQUENCE: string_parser, inpx, parse_by, out, output_countINPUT: inpx strings to parse parse_by character to parse byOUTPUT: out array of substrings output_count number of substringsHISTORY: Updated 22-April-1993 by Terry Slocum Fixed output_count bug, 28-mar-94, JMM Gave the ability to use a parse_by string of more than one character, jmm 13-jun-2007

code_fragment, inp_string, otp_string

NAME: code_fragmentPURPOSE: takes a string, where input variables are defined as array_elements 'qq' and creates a set of tplot commands using those dataCALLING SEQUENCE: code_fragment, inp_string, otp_stringHISTORY: 13-jun-2007, jmm, jimm@ssl.berkeley.edu

result = tuserdef(inp_var, input_string, otp_string=otp_string, success=success, out_varname=out_varname, _extra=_extra)

NAME: tuserdefPURPOSE: Inputs a string expression that operates on a tplot variable, or an array of tplot variables, and returns the result.

Routine details

top source dummy_var

dummy_var, inp

Parameters

inp

top source string_parser

string_parser, inpx, parse_by, out, output_count

NAME: string_parser PURPOSE: Parse strings into components CALLING SEQUENCE: string_parser, inpx, parse_by, out, output_count INPUT: inpx strings to parse parse_by character to parse by OUTPUT: out array of substrings output_count number of substrings HISTORY: Updated 22-April-1993 by Terry Slocum Fixed output_count bug, 28-mar-94, JMM Gave the ability to use a parse_by string of more than one character, jmm 13-jun-2007

Parameters

inpx
parse_by
out
output_count

top source code_fragment

code_fragment, inp_string, otp_string

NAME: code_fragment PURPOSE: takes a string, where input variables are defined as array_elements 'qq' and creates a set of tplot commands using those data CALLING SEQUENCE: code_fragment, inp_string, otp_string HISTORY: 13-jun-2007, jmm, jimm@ssl.berkeley.edu

Parameters

inp_string
otp_string

top source tuserdef

result = tuserdef(inp_var, input_string, otp_string=otp_string, success=success, out_varname=out_varname, _extra=_extra)

NAME: tuserdef PURPOSE: Inputs a string expression that operates on a tplot variable, or an array of tplot variables, and returns the result. Note that this is a very experimental program. CALLING SEQUENCE: otp_var = tuserdef(inp_var, input_string) INPUT: inp_var = a tplot variable, or an array of tplot variable names. Note that the time arrays of the variables need not be the same, the program will handle that. But the Y arrays of the variables must be the same, unless one is a 1d vector. input_string = an input string, where 'qq' represents the tplot variable data to be operated on, 'qq' can look like an array, each element of 'qq' is a separate tplot variable. E.g., '2.0*qq[0]/qq[1]' will divide the data for qq[0] by that for qq[1], and multiply by 2.0. OUTPUT: otp_var = an output tplot variable name, will be the null string if the process fails KEYWORDS: otp_string = the string used for the 'execute' command success = the success value from the execute command, 1 good, 0 not out_varname = a name for the output variable, the default is tuserdef_output EXAMPLES: For the absolute value of a variable: newvar = tuserdef(oldvar, 'abs(qq)') To divide a variable be the square root of another: newvar = tuserdef([oldvar1, oldvar2], 'qq[0]/sqrt(qq[1])' To compare THEMIS moment data: moment_ratio = tuserdef(['tha_peim_ptens', 'tha_peir_ptens'], 'qq[1]/qq[0]') HISTORY: 19-feb-2008, jmm, jimm@ssl.berkeley.edu 24-feb-2008, jmm, Allow replication of 1d y variables to n dimensions when multiple dimensions are passed in. 3-mar-2014, jmm, testing SVN mail +

Parameters

inp_var
input_string

Keywords

otp_string
success
out_varname
_extra

File attributes

Modification date: Thu Mar 13 16:35:40 2014
Lines: 155