2 Notes on the "rawfile" format generated by Berkeley spice3 and ng-spice.
3 Sadly, neither program documents the file format.
5 Top of an example file:
7 Title: * RC circuit driven by square wave
8 Date: Sun Oct 8 22:29:16 2000
9 Plotname: Transient Analysis
22 0 0.000000000000000e+00
28 1 5.000000000000002e-12
37 The header consists of lines with "name: value" parameter assignments.
39 Following a Variables: line, are "No. Variables" lines each containing
40 an index, name, and variable-type.
42 Following a "Values:" line is the data.
43 Each chunk of data represents a row, and contains "No. Variables" lines.
44 The first line of a chunk starts with an index or point number.
45 Indexes run 0 through "No. points" minus one.
48 If "Flags: complex" instead of "Flags: real", the each data point
49 is a complex pair seperated by a comma:
51 0 1.000000000000000e+00,7.227131787662363e-270
52 0.000000000000000e+00,0.000000000000000e+00
53 0.000000000000000e+00,0.000000000000000e+00
54 1.000000000000000e+00,0.000000000000000e+00
55 8.638022681143612e-01,-9.279561053152983e-08
58 Assumed to be "real,imaginary" but not confirmed.
59 "Complex" is an all-or-nothing situation.
61 Instead of a "Variables:" section there may be a "Binary:" section.
62 In this case, the data appears to be 64-bit double-precion floating point,
63 with "No. variables" * "No. points" doubles, following immediately after
64 the newline in "Binary:\n"
66 To get spice3 or ngspice to generate an ascii rawfile instead of binary,
67 set the environment variable SPICE_ASCIIRAWFILE
70 Some analysis types have no independent variable.
71 One is pole-zero analysis; its output consists only of
72 the complex values of the poles:
74 Title: spice file generated by ...
75 Date: Tue Oct 27 21:50:41 2009
76 Plotname: Pole-Zero Analysis
84 0 -2.221441543562163e+05,2.221441281761691e+05
85 -2.221441543562163e+05,-2.221441281761691e+05
87 (Binary version has exactly 32 bytes of output - 4 doubles.)