1SCONVERT(1)                 General Commands Manual                SCONVERT(1)
2
3
4

NAME

6       sconvert - convert spice formats
7

SYNOPSIS

9       sconvert fromtype fromfile totype tofile
10       sconvert fromtype totype
11       sconvert
12

DESCRIPTION

14       Sconvert  translates  spice  output  files among three formats: the old
15       binary format, a new binary format, and a new ascii format.   The  for‐
16       mats  are  specified  by the fromtype and totype arguments: `o' for the
17       old format, `b' for the new binary format, and `a' for  the  new  ascii
18       format.  Fromtype specifies the format to be read, and totype specifies
19       the format to be written.  If fromfile and tofile are given, then  they
20       are  used  as the input and output, otherwise standard input and output
21       are used.  (Note that this second option is only available on UNIX sys‐
22       tems  - on VMS and other systems you must supply the filenames.)  If no
23       arguments are given, the parameters are prompted for.
24
25       Binary format is the preferred format for general use,  as  it  is  the
26       most  economical  in  terms  of space and speed of access, and ascii is
27       provided to make it easy to modify data files and transfer them between
28       machines with different floating-point formats.  The old format is pro‐
29       vided only for backward compatibility. The three formats  are  as  fol‐
30       lows:
31
32       Old:
33
34                What          Size in Bytes
35
36            title                    80
37            date                8
38            time                8
39            numoutputs               2
40            the integer 4            2
41            variable names --
42                 char[numoutputs][8] numoutputs * 8
43            types of output               numoutputs * 2
44            node index               numoutputs * 2
45            plot title               numoutputs * 24
46            the actual data               numpoints * numoutputs * 8
47
48       Ascii:
49
50            Title: Title Card String
51            Date: Date
52            [ Plotname: Plot Name
53              Flags: complex or real
54              No. Variables: numoutputs
55              No. Points: numpoints
56              Command: nutmeg command
57              Variables:   0 varname1 typename1
58                      1 varname2 typename2
59                      etc...
60              Values:
61                0     n    n    n    n    ...
62                1     n    n    n    n    ...
63                And so forth...
64            ] repeated one or more times
65
66
67       If one of the flags is complex, the points look like r,i where r and i
68       are floating point (in %e format). Otherwise they are in %e format.
69       Only one of real and complex should appear.
70
71       The lines are guaranteed to be less than 80 columns wide (unless the
72       plot title or variable names are very long), so this format is safe
73       to mail between systems like CMS.
74
75       Any number of Command: lines may appear between the No. Points:
76       and the Variables: lines, and whenever the plot is loaded into
77       nutmeg they will be executed.
78
79       Binary:
80
81            Title Card            (a NULL terminated string)
82            Date, Time            (a NULL terminated string)
83            [
84              Plot title          (a NULL terminated string)
85              Number of variables   (an int)
86              Number of data points (an int)
87              flags          (a short)
88              variable header struct (repeated numoutputs times)
89                 variable name    (a NULL terminated string)
90                 variable type    (an int)
91              set of outputs      (repeated numpoints times)
92            ] repeated one or more times.
93
94
95       A set of outputs is a vector of doubles of length numoutputs, or
96       a vector of real-imaginary pairs of doubles if the data is complex.
97

SEE ALSO

99       nutmeg(1), spice(1), writedata(3)
100

AUTHOR

102       Wayne Christopher (faustus@cad.berkeley.edu)
103

BUGS

105       If  variable  names  and  the  title and plotname strings have trailing
106       blanks in them they will be stripped off when the file is read,  if  it
107       is in ascii format.
108
109       If  a plot title begins with "Title:" nutmeg will be fooled into think‐
110       ing that this is an ascii format file.  Sconvert  always  requires  the
111       type to be specified, however.
112
113
114
115
1164th Berkeley Distribution        20 March 1986                     SCONVERT(1)
Impressum