snap,slice - write to the screen an array (through Grey etc)
int snap(name,n1,n2,matrix)
tag of desired output file
size of slice in fast dimension
size of slice along slow axess
matrix value of slice
0 = if successful
Slice, and snap provide a convenient method of output for snapshots of intermediate computations or iterations in a form suitable for processing by other seplib functions (such as Window, Movie, etc.) None of the inputs is modified.
The input tag name is used to locate and update an associated auxiliary history file. The name of the output header is ``name''. This may be modified by specifying `name=newtag' on the command line when a program is invoked. Input is an n1 by n2 matrix of floating point values containing the snapshot.
If more than one call to these subroutines is made, the snapshot is appended to the file and n3 is updated in the history file. (This frees the user from the chore of counting the number of output frames, a special convenience while debugging.)
The subroutine datapath()
is used to generate a name for an output
data file.
slice()
only: esize is the element size, typically 1 or 4.
snap()
only: If the output header does not exist no snapshots are written.
This allows the user to decide whether or not to create snapshots
on a given run.
name auxiliary header
seplib, datapath, srite
Program execution is terminated with an appropriate error message if the program attempts to change the snapshot size along the way. Also for appropriate I/O related errors.
Prexisting snapshot files with the same name are overwritten without qualms.
snapshot slice output
sep