## POST: an interactive graphical math package for SPICE PWL waveforms

## What is it?

A post-processor for Ngspice, Berkeley Spice and HSPICE raw files.
Post() provides a shell interface with command line history, and a
yacc-based waveform math and measurement language.
It is a from-scratch implementation loosely modeled after HP's internal
post() tool for plotting and analyzing HPSPICE rawfiles.
Post() is in early development, so expect changes in the waveform processing
language with each release.
This version uses Gnuplot for the graphing engine.

## Why do I need it?

Most SPICE-like circuit simulators output their data in Piece-wise-linear
(PWL) format with uneven timesteps. These waveforms are awkward to handle
in most math packages without interpolation and resampling artifacts. POST
does all it's math directly on the unevenly spaced PWL data. Every point
in a POST graph is derived from a point that was actually simulated.
POST's math algorithms are able to do math on PWL's with different timesteps.
For example: "vdiff = v1 + delay(v2,100p)". The output PWL "vdiff"
will be evaluated at all of the timepoints defined by "v1" and also at all
of the timepoints defined by "v2". Because "v2" is delayed by 100 picoseconds, it is probably that "vdiff" is defined at twice the number of points as either
"v1" or "v2". The math functions do linear cross-interpolation when evaluating a waveform between defined points.

POST handles Ngspice, Berkeley Spice and HSPICE raw files. The basic
input reading functions have been lifted from gwave(), another SPICE plotting
package.

This current version lets you load a raw file with ci "rawfile".
The basic data type is the piece-wise-linear (PWL) complex waveform.
A waveform can be either loaded from a SPICE run, or defined with something
like "a={0,0 1,1 2,3+4*i}" You can do math on piece-wise-linear
waveforms such as "a=mag(v1+sqrt(5)*v2)" or "deriv=(v2-delay(v2,1u))/1u".
(yes, engineering suffix notation is supported in the parser).
There are waveform measurement verbs such as "t1=xcrossp(v1,5)", which
translates to finding the time of the fifth positive-going zerocrossing of a
waveform "v1".

Some interesting features: An RC low-pass filter can be created with
"lpf(p1,tau)". Of course a high-pass filter is just "1-lpf(p1,tau)".
Post() solves the differential equation for each segment of the
PWL and then outputs an anti-aliased uniform-sampled waveform
for subsequent processing.

You can graph several signals: a,b,c,d on on graph with
"gr a,b,c,d", or on two seperate y-axes with "gr a,b;c,d".
You can limit the x-axis range with "gr a,b;c,d xl 1 10". Each
graph can be similiarly scaled and limited in the yaxis by using
the "yl min max" command. Read the HELP file for a current list
of functions and commands.