.CSV file format

This topic details the file format used when exporting grapher data (simulation results) to a .csv file. 

Notes 

  • The waveform data is not uniform, that is the time step varies because the simulator adjusts the time step during simulation.
  • All data channels contain both x and y points.
  • The first line is a header line containing the name of the trace/channel.
  • The header line is OPTIONAL, the user may choose to omit it (desktop only).
  • When there is more than one trace/channel, there is an empty column between the traces/channels
  • There is no restriction on the trace names (contained within the square brackets). They are Unicode characters and may contain punctuation such as the following: !@#$%^&*()_+{}~`[]\|;:"-',.<>

Time Domain Data  

This includes transient and interactive simulation.

Header Information

There is one header row, containing 3 columns per channel/trace: X, Y, blank column.

Format:

"X--Trace ::, Y--Trace ::,, X--Trace ::, Y--Trace ::"...

where

id = trace number, starting at 1 (user cannot change)

label = trace name, default is the net name, but user can change

The remaining lines in the file are all data, for example:

trace1_x0, trace1_y0, , trace2_x0, trace2_y0
trace1_x1, trace1_y1, , trace2_x1, trace2_y1
trace1_x2, trace1_y2, , trace2_x2, trace2_y2

Transient Simulation Example

The three trace names in this example are the net names in this example, V(2), V(3), V(4):

X--Trace 1::[V(2)],Y--Trace 1::[V(2)],,X--Trace 2::[V(3)],Y--Trace 2::[V(3)],,X--Trace 3::[V(4)],Y--Trace 3::[V(4)]
0,0,,0,-0.00100004,,0,0.008899952e-007,-1.92397e-007,,2e-007,-0.00100024,,2e-007,0.00889959
4e-007,-1.63675e-007,,4e-007,-0.00100021,,4e-007,0.00889928
8e-007,-6.13912e-007,,8e-007,-0.00100066,,8e-007,0.00889781
1.6e-006,-4.01248e-007,,1.6e-006,-0.00100045,,1.6e-006,0.00889398
3.2e-006,-1.93403e-006,,3.2e-006,-0.00100199,,3.2e-006,0.00887623
6.4e-006,-2.24215e-006,,6.4e-006,-0.00100241,,6.4e-006,0.00881118
1.28e-005,-5.34771e-006,,1.28e-005,-0.00100635,,1.28e-005,0.00854969
2.56e-005,-3.09192e-006,,2.56e-005,-0.00101071,,2.56e-005,0.007525
4.56e-005,2.15245e-005,,4.56e-005,-0.0010202,,4.56e-005,0.0046154

Frequency Domain Data 

This includes AC Sweep simulation. 

Header Information 

There is one header row, containing 4 columns per channel/trace: Frequency, Magnitude, Phase, blank column.

Format:

"FREQUENCY, Mag: <label1>, Phase: <label1>,, FREQUENCY, Mag: <label2>, Phase: <label2>"...

where

label = trace name, default is the net name, but user can change

The remaining lines in the file are all data, for example:

trace1_freq0, trace1_mag0, trace1_phase0, , trace2_freq0, trace2_mag0, trace2_phase0
trace1_freq1, trace1_mag1, trace1_phase1, , trace2_freq1, trace2_mag1, trace2_phase1
trace1_freq2, trace1_mag2, trace1_phase2, , trace2_freq2, trace2_mag2, trace2_phase2

Example 

FREQUENCY,Mag: PR1:V(3),Phase: PR1:V(3),,FREQUENCY,Mag: PR1:I(R2),Phase: PR1:I(R2),,FREQUENCY,Mag: PR2:V(1),Phase: PR2:V(1)
1.0000,0.3333,0.0000,,1.0000,0.0003,0.0,,1.0000,1.0000,0.0
1.2589,0.3333,0.0000,,1.2589,0.0003,0.0,,1.2589,1.0000,0.0
1.5849,0.3333,0.0000,,1.5849,0.0003,0.0,,1.5849,1.0000,0.0
1.9953,0.3333,0.0000,,1.9953,0.0003,0.0,,1.9953,1.0000,0.0
2.5119,0.3333,0.0000,,2.5119,0.0003,0.0,,2.5119,1.0000,0.0
3.1623,0.3333,0.0000,,3.1623,0.0003,0.0,,3.1623,1.0000,0.0
3.9811,0.3333,0.0000,,3.9811,0.0003,0.0,,3.9811,1.0000,0.0
5.0119,0.3333,0.0000,,5.0119,0.0003,0.0,,5.0119,1.0000,0.0
6.3096,0.3333,0.0000,,6.3096,0.0003,0.0,,6.3096,1.0000,0.0
7.9433,0.3333,0.0000,,7.9433,0.0003,0.0,,7.9433,1.0000,0.0