Sconvert translates spice output files among three formats: the old
binary format, a new binary format, and a new ascii format.
The formats are specified by the
totype arguments: o for the old format, b for the new binary format,
and a for the new ascii format.
Fromtype specifies the format to be read, and
totype specifies the format to be written.
tofile are given, then they are used as the input and output, otherwise
standard input and output are used. (Note that this second option is
only available on UNIX systems - on VMS and other systems you must
supply the filenames.)
If no arguments are given, the parameters are prompted for.
Binary format is the preferred format for general use, as it is
the most economical in terms of space and speed of access, and ascii is
provided to make it easy to modify data files and transfer them
between machines with different floating-point formats.
The old format is provided only
for backward compatibility. The three formats are as follows:
What Size in Bytes
the integer 4 2
variable names --
char[numoutputs] numoutputs * 8
types of output numoutputs * 2
node index numoutputs * 2
plot title numoutputs * 24
the actual data numpoints * numoutputs * 8
Title: Title Card String
[ Plotname: Plot Name
Flags: complex or real
No. Variables: numoutputs
No. Points: numpoints
Command: nutmeg command
Variables: 0 varname1 typename1
1 varname2 typename2
0 n n n n ...
1 n n n n ...
And so forth...
] repeated one or more times
If one of the flags is complex, the points look like r,i where r and i
are floating point (in %e format). Otherwise they are in %e format.
Only one of real and complex should appear.
The lines are guaranteed to be less than 80 columns wide (unless the
plot title or variable names are very long), so this format is safe
to mail between systems like CMS.
Any number of Command: lines may appear between the No. Points:
and the Variables: lines, and whenever the plot is loaded into
nutmeg they will be executed.
Title Card (a NULL terminated string)
Date, Time (a NULL terminated string)
Plot title (a NULL terminated string)
Number of variables (an int)
Number of data points (an int)
flags (a short)
variable header struct (repeated numoutputs times)
variable name (a NULL terminated string)
variable type (an int)
set of outputs (repeated numpoints times)
] repeated one or more times.
A set of outputs is a vector of doubles of length numoutputs, or
a vector of real-imaginary pairs of doubles if the data is complex.