There are two modes of operation which depend on whether the text file contains co-ordinate information, or solely data values (determined by Parameter AUTO).
a) AUTO=FALSE If the file contains co-ordinate information
the format of the data is tabular; the positions and values are
arranged in columns and a record may contain information for only
a single point. Where data points are duplicated only the last
value appears in the NDF. Comment lines can be given, and are
indicated by a hash or exclamation mark in the first column.
Here is an example file (the vertical ellipses indicate missing
lines in the file):
# Model 5, phi = 0.25, eta = 1.7
1 -40.0 40.0 1121.9
2 0.0 30.0 56.3
3 100.0 20.0 2983.2
4 120.0 85.0 339.3
. . . .
. . . .
. . . .
<EOF>
The records do not need to be ordered (but see the warning in the ``Notes''), as the application searches for the maximum and minimum co-ordinates in each dimension so that it can define the size of the output image. Also, each record may contain other data fields (separated by one or more spaces), which need not be all the same data type. In the example above only columns 2, 3 and 4 are required. There are parameters (POSCOLS, VALCOL) which select the co-ordinate and value columns.
The distance between adjacent pixels (given by Parameter PSCALE) defaults to 1, and is in the same units as the read-in co-ordinates. The pixel index of a data value is calculated using the expression
where x is the supplied co-ordinate and
is the value
of the POFFSET parameter (which defaults to the minimum supplied
co-ordinate along an axis),
is the value of parameter PSCALE,
and FLOOR is a function that returns the largest integer that is
smaller (i.e. more negative) than its argument.
You are informed of the number of points found and the maximum and minimum co-ordinate values for each dimension. There is no limit imposed by the application on the number of points or the maximum output array size, though there may be external constraints. The derived array size is reported in case you have made a typing error in the text file. If you realise that this has indeed occurred just abort (!!) when prompted for the output NDF.
b) AUTO=TRUE If the text file contains no co-ordinates, the
format is quite flexible, however, the data are read into the data array
in Fortran order, i.e. the first dimension is the most rapidly
varying, followed by the second dimension and so on. The number
of data values that may appear on a line is variable; data values
are separated by at least a space, comma, tab or carriage return.
A line can have up to 255 characters. In addition a record may
have trailing comments designated by a hash or exclamation mark.
Here is an example file, though a more regular format would be
clearer for the human reader.
# test for the new TRANDAT
23 45.3 ! a comment
50.7,47.5 120. 46.67 47.89 42.4567
.1 23.3 45.2 43.2 56.0 30.9 29. 27. 26. 22.4 20. 18. -12. 8.
9.2 11.
<EOF>
Notice that the shape of the NDF is defined by a parameter rather than explicitly in the file.
The application obtains work space to store the position-value data before they can be copied into the output NDF so that the array bounds can be computed. Since the number of lines in the text file is unknown, the application obtains chunks of work space whose size is three times this parameter whenever it runs out of storage. (Three because the parameter specifies the number of lines in the file rather than the number of data items.) If you have a large number of points there are efficiency gains if you make this parameter either about 20-30 per cent or slightly greater than or equal to the number of lines your text file. A value slightly less than the number of lines is inefficient as it creates nearly 50 per cent unused space. A value that is too small can cause unnecessary unmapping, expansion and re-mapping of the work space. For most purposes the default should give acceptable performance. It must lie between 32 and 2097152. [2048]
KAPPA --- Kernel Application Package