slot_id[.subindex_id]Slot_id can be a SCAN name, a slot number or a symbol which translates to one of these. Subindex_id can be a name or a subindex number or a symbol that translates to one of these. Slot_id and subindex_id can be replaced by the wildcard character "
In fact, it is also allowed to refer to a queue element with a symbol which translates to a gqe_id.
The following examples will demonstrate the variety of options which are available for addressing queue elements. Suppose that these commands have been entered:
$ spectraThe queue consists of one SCAN and four TEXT elements. All of them are stored in slot number 1. The third TEXT ( the template for the description of the x-axis) can be changed by one of the following commands which are equivalent:
SPECTRA>
read/ascii alhe01
s1 = 1
s2 = 3
s3 = s1.s2
SPECTRAThe following commands are also equivalent. They set the lower window limit of the x-axis to -1:>
ch alhe01.x-axis
SPECTRA>
ch alhe01.3
SPECTRA>
ch 1.x-axis
SPECTRA>
ch 1.3
SPECTRA>
ch s1.x-axis
SPECTRA>
ch s1.3
SPECTRA>
ch s1.s2
SPECTRA>
ch alhe01.s2
SPECTRA>
ch 1.s2
SPECTRA>
ch s3
SPECTRA>
set alhe01/x_min=-1
SPECTRA>
set 1/x_min=-1
SPECTRA>
set s1/x_min=-1
The naming conventions in vector expressions (vector_id) are quite similar. The following commands are equivalent:
SPECTRANotice that the name alone refers to the y-values of a SCAN, i.e. y(alhe01) is equivalent to alhe01. X-values are used in the same way:>
calc alhe01 = log10(alhe01)
SPECTRA>
calc y(alhe01) = log10(y(alhe01))
SPECTRA>
calc y(1) = log10(y(1))
SPECTRA>
calc y(s1) = log10(y(s1))
SPECTRASlot numbers can only be used, if they are enclosed in parentheses. Otherwise they are interpreted as real numbers.>
calc x(alhe01) = x(alhe01) + 100
SPECTRA>
calc x(s1) = x(s1) + 100
If you write a multicolumn ASCII file, you have to specify the origin of the columns. The syntax is exactly the same as for the calc command. Example:
SPECTRA>
write/asc/x(alhe01)/alhe01/y(1)/x(1) test_name
This command creates an ASCII file containing four columns of data:
the first and the fourth column represent the x-values of alhe01,
the second and the third the y-values.
alhe01 is equivalent to y(alhe01) and y(1), if
alhe01 is in slot number 1.
Similarily, x(alhe01) is equivalent to x(1).
A single x- or y-component of a data point is read or written in a function type way:
scan_id( index [,column])Scan_id can be a name or a symbol which translates to a name or a slot number. It is not possible to use a slot number directly at this point. The index is the number of the data point, starting at 1. The optional second argument selects the column number: 1 - x-value, 2 - y-value (default). Here are a few examples:
SPECTRA>
alhe01(3) = 12
set the third y-value to 12 and the current index to 3.
SPECTRA>
alhe01(s2,2) = 12
set the third y-value to 12 and the current index to 3
SPECTRA>
s1(1,1) = 12
set the first x-value to 12 and the current index to 1
SPECTRA>
= s1( 3)
display the third y-value