Calculate
Invokes the interpreter of arithmetic expressions for SCANs.
- Format:
- SPECTRA
>
calc
ulate result = vector_expr
- Description:
- result:
A vector_id that describes where the
result of the calculation is stored. See section 8
for an explanation of the term vector_id.
If the resultant SCAN does not exist, it is created. If the
vector_id refers to an empty slot (like y(10)), a SCAN
named scan_i (scan_10) is created.
vector_expr:
An arithmetic expression that contains vector_id's and
also scalar arithmetic. The expressions are explained in
sections 9ff and functions in sections 14ff.
- e.g.:
-
- SPECTRA
>
calc temp = log( ioni1/ioni2)
The y-values of ioni2 are interpolated at the x-positions
of ioni1. The x-values of temp vary in a range that is
covered by ioni1 and ioni2. The y-values of temp
are the logarithms of the ratio of the y-values of ioni1 and
the interpolated y-values of ioni2.
- SPECTRA
>
calc x(bpu1) = x(bpu1) / 1000
The x-values of bpu1 are divided by 1000, the y-values
are not changed.
The operators <
and >
cut on the x- and y-values.
- Format:
- SPECTRA
>
calc spec1 = spec2 >
y_min
- Format:
- SPECTRA
>
calc x(spec3) = x(spec2) <
x_max
- Description:
- Spec1 contains those points of spec2 which have y-values above y_min.
Spec2 contains those points of spec2 which have x-values below x_max.
Note that there is a verb vcalc that treats the data
like vectors - whithout any interpolation. The only
requirement is that all operands have the same length.
See section 15.3.81 for details.