Documentation:Reference:TDI TU - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

TAN (X)

F90 Mathematical Elemental. Tangent.

Argument. X must be real. Complex numbers are an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Same as X.

Result.. Processor approximation to tan(X), with X in radians.

Example. TAN(1.0) is 1.5574077, approximately.

TAND (X)

F90 Mathematical Elemental. Tangent in degrees.

Argument. X must be real. Complex numbers are an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Same as X.

Result.. Processor approximation to tan(X), with X in degrees.
Example. TAN(45.0) is 1.0, approximately.

TANH (X)

F90 Mathematical Elemental. Hyperbolic tangent.

Argument. X must be real. Complex numbers are an error.

Signals. Same as X.
Units... None, bad if X has units.
Form.... Same as X.

Result.. Processor approximation to tanh(X).
Example. TANH(1.0) is 0.76159416, approximately.

TASK_OF (A)

MDS Operation. Get the task field.

Argument. Descriptor as below.

Result.. A is searched for these:
DSC$K_DTYPE_ACTION, the task field.
DSC$K_DTYPE_PROCEDURE, unchanged..
DSC$K_DTYPE_PROGRAM, unchanged..
DSC$K_DTYPE_ROUTINE, unchanged..
DSC$K_DTYPE_METHOD, unchanged..
Otherwise, an error.

TEXT (X,[LENGTH])

Conversion Elemental. Convert to text of given length.

Arguments Optional: LENGTH.
X numeric or character.
LENGTH integer scalar.

Signals. Same as X.
Units... Same as X.
Form.... Character of given length or length associated with the
type of X. These are used B/BU 4, W/WU 8, L/LU 12,
Q/QU 20, O/OU 36, F 16, D/G 24, H 40, FC 32, DC/GC 48,
and HC 80.

Result.. A character string that represent the number.
(As of now, quadword and octaword are converted to hex.)
>>>>>>>>>WARNING, truncation does not cause an error.

Example. TEXT(1.2) is " 0.1200000E+02".

TIME_OUT_OF (A)

MDS Operation. Get the time_out field.

Argument. Descriptor as below.

Result.. A is searched for these:
DSC$K_DTYPE_METHOD, time_out field.
DSC$K_DTYPE_PROCEDURE, time_out field.
DSC$K_DTYPE_PROGRAM, time_out field.
DSC$K_DTYPE_ROUTINE, time_out field.
Otherwise, an error.

TINY (X)

F90 Inquiry. The smallest positive number in the model representing
numbers of the type of the argument.

Argument. X must be real or complex.

Signals. Same as X.
Units... Same as X.
Form.... Scalar of same type as real part of X.

Result.. The result is 1 if X is integer and b^(emin-1) if X is
real, where b is the real base and emin is the minimum
exponent in model numbers like X.

Example. TINY(1.0) is 2^-128 on the VAX.

transfer (SOURCE,MOLD,[SIZE])

F90 Transformation. A result with a physical representation identical
to that of SOURCE but interpreted with the type of MOLD.

Arguments Optional: SIZE.
SOURCE any type, scalar or array.
MOLD any type, scalar or array.
SIZE integer scalar.

Signals. Same as SOURCE.
Units... Single or common units of SOURCE and MOLD, else bad.
Form.... The type of MOLD, scalar if MOLD is scalar and SIZE is
absent. If MOLD is an array and SIZE is absent, the
result is a vector and the size is as small as possible
such that its physical representation is not shorter
than that of source. If SIZE present, the result is a
vector and the size is SIZE.

Result.. If the physical representation of the result is as long
as length as that of SOURCE, the physical representation
of the result is that of SOURCE and the remainder is
undefined; otherwise, the result is the leading part of
SOURCE.

Examples. TRANSFER(0x4180,0.0) is 4.0 on the VAX.
TRANSFER([1.1,2.2,3.3],[CMPLX(0.0,0.0)]) is a complex
vector of length 2 whose first element is CMPLX(1.1,2.2)
and whose second element has real part 3.3.
TRANSFER([1.1,2.2,3.3],[CMPLX(0.0,0.0)],1) is
[CMPLX(1.1,2.2)].

TRANSLATE (STRING,TRANSLATION,MATCH)

Character Elemental. Replace matching characters with others.

Arguments
STRING character.
TRANSLATION character.
MATCH character.

Signals. That of dominant shape.
Units... Same as STRING.
Form.... Character of compatible shape.

Result.. For each character of STRING found in MATCH the
corresponding character in TRANSLATION replaces it.

Example. TRANSLATE('ABCDEF','135','ACE') is "1B3D5F".

transpose (MATRIX)

F90 Transformation. Transpose an array of rank two.

Argument. MATRIX is any type, rank-2 array.

Signals. Same as MATRIX with dimensions exchanged.
Units... Same as MATRIX.
Form.... Same type as MATRIX with the indices interchanged.

Result.. Element [i,j] of the result is MATRIX[j,i] for all
i and j in the extent of the dimensions.

Example. TRANSPOSE([1 2 3]) is [1 4 7].
[4 5 6] [2 5 8]
[7 8 9] [3 6 9]

transpose_mul (MATRIX_A,MATRIX_B)

Transformation. Performs matrix multiplication of numeric matrices,
transposing the first.

Arguments
MATRIX_A numeric array of rank one or two.
MATRIX_B numeric array of rank one or two. The size of the first
dimension of MATRIX_B must be the same as the size of
the last dimension of MATRIX_A.

Signals. Single signal or smaller data.
Units... Same as for MATRIX_A * MATRIX_B.
Form.... If MATRIX_A has shape [m,n] and MATRIX_B has shape
[m,k], the result has shape [n,k]. For rank-one cases,
the n or k is omitted.

Result.. Result element [i,j] is
SUM(MATRIX_A[:,i] * MATRIX_B[:,j]).

Examples. TRANSPOSE_MUL(_A=[1 2],_B=[1 2]) is [14 20].
[2 3] [2 3] [20 29]
[3 4] [3 4]
TRANSPOSE_MUL([1,2],_A) is vector-matrix product
[5,8,11].
TRANSPOSE_MUL(_A,[1,2,3]) is matrix-vector product
[14,20].

TRIM (STRING)

F90 Transformation. The argument with trailing blank characters
removed, including tabs.

Argument. STRING is character scalar.

Signals. Same as STRING.
Units... Same as STRING.
Form.... Character with a length that is the length less the
number of trailing blanks (and tabs) in STRING.

Result.. Same as STRING except any trailing blanks are removed.
If STRING contains no nonblank characters, the result
has zero length.

Example. TRIM(' A B ') is " A B".

See also. ADJUSTL and ADJUSTR to justify strings.

UBOUND (ARRAY,[DIM])

F90 Inquiry. All the lower bounds of an array or a specified
lower bound.

Arguments Optional: DIM.
ARRAY any type array.
DIM integer scalar from 0 to n-1, where n is rank of ARRAY.

Signals. None.
Units... None.
Form.... Integer scalar if DIM present,
otherwise, vector of size n.
Result.. UBOUND(ARRAY,DIM) is equal to the declared lower bound
for subscript DIM of ARRAY. If no bounds were declared
it is one less than the multiplier for subscript DIM of
ARRAY. UBOUND(ARRAY) has value whose j-th component is
equal to UBOUND(ARRAY,j) for each j, 0 to n-1.

Example. UBOUND(_A=SET_RANGE(2:3,7:10,0)) is [3,10] and
UBOUND(_A,1) is 10.

See also LBOUND for lower bound, SHAPE for number of elements,
SIZE for total elements, and E... for signals.

UNION (A,...)

Transformation. The union of sets, keeping only unique values.

Arguments Any sortable data types--character, integer, or real.

Signals. None.
Units... The combined type of all arguments.
Form.... The compatible type of all arguments.

Result.. The A's are combined by VECTOR and sorted. Duplicates
are removed.

Example. UNION([4,5],[2,3,5]) is [2,3,4,5].

UNITS (A)

MDS Operation. Get the data of the units field or a blank.

Argument. Expression that is evaluated.

Result.. DSC$K_DTYPE_DIMENSION, UNITS(axis field).
DSC$K_DTYPE_RANGE, combined UNITS of the fields.
DSC$K_DTYPE_SLOPE, combined UNITS of the fields.
DSC$K_DTYPE_WINDOW, UNITS(value_at_idx0 field).
DSC$K_DTYPE_WITH_UNITS, DATA(units field).
else removing SIGNAL, PARAM, and such.
Otherwise, a single blank is returned, an empty string
cannot be used by IDL.
This recursive definition will find the first WITH_UNITS
field available.
>>>>>>>>>WARNING, types for which DATA is undefined give an error.

Example. Let _A=BUILD_WITH_UNITS(42,'m'//'/s'),
then UNITS(_A) is "m/s".

UNITS_OF (A)

MDS Operation. Get the units field.

Argument. Descriptor as below.

Result.. A is searched for this:
DSC$K_DTYPE_WITH_UNITS, the units field.
Otherwise, a single blank is returned.

Examples. UNITS_OF(BUILD_WITH_UNITS(42.,"V")) is "V".
UNITS_OF(42) is " ".

unpack (VECTOR,MASK,FIELD)

F90 Transformation. Unpack an array into an array under control of a
mask.

Arguments
VECTOR any type. Its size must be at least equal to the number
of $TRUE elements of MASK.
MASK logical array.
FIELD same type as VECTOR and conformable with MASK.
Signals. Single signal or smaller data.
Units... Single or common units of VECTOR and FIELD, else bad.
Form.... The type of VECTOR and the shape of MASK.

Result.. That corresponding to j-th true element of MASK in array
element order, is VECTOR(j-1). Other elements have value
equal to the corresponding element of FIELD.

Examples. Specific values may be scattered to specific positions.
UNPACK(_v=[1,2,3],_q=[0 1 0],[0 0 0],[0 1 0]) is [1 2 0])
[1 0 0] [0 0 0] [1 0 0] [1 1 0]
[0 0 1] [0 0 0] [0 0 1] [0 0 3]
and UNPACK(_v,_q,0) is [0 2 0].
[1 0 0]
[0 0 3]

UNARY_MINUS (X)

Numeric Elemental. Negate a number.
Usual Form - X.

Argument. X must be numeric.

Signals. Same as X.
Units... Same as X.
Form.... Same as X except unsigned become signed.

Result.. Negate each element.
(Two's complement for integers on VAX.)
Immediate at compilation.

Example. -2LU is -2.

UNARY_PLUS (X)

Numeric Elemental. Make a signed number. (Generally unneeded.)
Usual Form + X.

Argument. X must be numeric.

Signals. Same as X.
Units... Same as X.
Form.... Same as X except unsigned become signed.

Result.. Make number of each element.
Immediate at compilation.

Example. +2LU is 2.

UNSIGNED (A)

Conversion Elemental. Convert to unsigned integer.

Argument. A must be numeric.

Signals. Same as A.
Units... Same as A.
Form.... Unsigned integer of same length as real part of A.
Result.. The truncated integer.
Immediate at compilation.
>>>>>>>>>WARNING, truncation does not cause an error.

Example. UNSIGNED(2.783) is 2LU.

UPCASE (STRING)

Character Elemental. Change all alphabetics to uppercase.
Argument. STRING must be character.

Signals. Same as STRING.
Units... Same as STRING.
Form.... Same as STRING.

Result.. The same as STRING with all lower case alphabetics
replaced by the corresponding uppercase character.

Example. UPCASE('Name') is "NAME".

USING (A,[DEFAULT],[SHOTID],[EXPT])

MDS Operation. Evaluate expression from a different tree location.

Arguments Optional: DEFAULT, SHOTID, EXPT.
A an expression.
>>>>>>>>>WARNING, pathnames in the expression A will be relative to the
temporary tree location and may not be related to the
old tree.
DEFAULT character, NID, long, or PATH scalar. The new tree path.
>>>>>>>>>WARNING, relative paths are like the full name in the old tree.
SHOTID integer scalar. The shot number.
EXPT character scalar. The experiment name.

Result.. Depends on the expression at the node in the new tree.
The old node, shot, and experiment are used to evaluate
the expressions for DEFAULT, SHOTID, and EXPT. If SHOTID
or EXPT present, a new tree is opened for reading. The
temporary path is set from DEFAULT. If omitted, the
values used are those of the current tree and path.
There will be an error if the old tree is not open or
the old path is bad.

Example. Say shot 1234 is a "vacuum" subtraction shot for the
current shot and we are positioned at \TOP.XRAY:CHAN_01,
which has data, then the subtracted data might be
 :DATA - USING(:DATA,,1234)