Up Next
Go up to Data arrays
Go forward to Gate arrays

Value arrays

VALUEARRAY defines a 1D, 2D or 3D array of 32-bit integer or real values that can be accessed in the commands section.


VALUEARRAY <array-name> [<xrange> [,<yrange> [,<zrange>]]] [SAVE] [<data list>]


where <xrange> is the channel range in the first dimension, and the <y-> and <z-> quantities the corresponding values in higher dimensions if applicable, specified in the same way as for gate-maps , so if no starting channel is given it is assumed to be zero and the maximum channel will be <range - 1> as before. If the SAVE keyword is specified, then the array is written back to disc at the end of the sort, allowing modified arrays to be preserved. This discfile will normally be in the sort setup directory created when a sortfile is compiled. The <data list> is allowed in free format. The array data type (integer or real) is determined from the type of the first data element specifiedin <data list>.

Note The values specified in <data list> are given in C-style ordering: the z-parameter changes more quickly than y- which changes more quickly than x-. This is the opposite way round to the convention used in FORTRAN.

eg.

VALUEARRAY   ANGLES   [1:20]
157.60 157.60 157.60 157.60 157.60
133.57   0    107.94   0    107.94
133.57  94.16 133.57 107.94  94.16
107.94 133.57   0    133.57 107.94
VALUEARRAY   ARRAY2  [2:6,3]  1 11 21  2 12 22  3 13 23  4 14 24  5 15 25

define a real 1D array ANGLES containing 20 elements and an integer 2D array ARRAY2 spanning from channels 2 to 6 in the first dimension (5 channels) and from channels 0 to 2 in the second. The values will be assigned as follows:

1 -> (2,0), 11 -> (2,1), 21 -> (2,2), 2 -> (3,0), 12 -> (3,1), 22 -> (3,2), 3 -> (4,0), 13 -> (4,1), 23 -> (4,2), etc.

Examples of their use in the commands section would be:

A = B / ANGLES(<argument>)
C = ARRAY2(<argument$_1$>,<argument$_2$>)

where <argument> is an integer expression.

Any array elements not initialised by VALUEARRAY are set to zero.


support@ns.ph.liv.ac.uk

Up Next