(int) ReadSPtable(filename)
This function reads a specification file for a spatial parameter
table. A spatial parameter table is a two dimensional array of
floating point values, which can be accessed via x-y coordinate pairs.
The user can define any number of such tables, each of which is given
a unique identifying keyword. Tables remain defined until explicitly
destroyed, or until ClearAll is called.
The tables are input through a file, which uses the following format:
keyword X DX NX Y DY NY
X Y value
...
Blank lines and lines that begin with punctuation are ignored.
There is one ``header'' line with the following entries:
- keyword
Arbitrary word for identification. An existing database with the same
identifier will be replaced.
- X
Reference coordinate in microns.
- DX
Grid spacing in X direction, in microns, must be > 0.
- NX
Number of grid cells in X direction, must be > 0.
- Y
Reference coordinate in microns.
- DY
Grid spacing in Y direction, in microns, must be > 0.
- NY
Number of grid cells in Y direction, must be > 0.
The header line is followed by data lines that supply a value to the
cells. The X,Y given in microns specifies the cell. A
second access to a cell will simply overwrite the data value for that
cell. Unwritten cells will have a zero value.
The function returns 1 on success, 0 otherwise with an error message
available from the GetError function.