.. -*- Mode: rst -*-

.. include:: abbreviation.txt

PySpice is a |Python|_ 3 library which interplay with Berkeley SPICE, the industrial circuit
simulator reference.

SPICE (Simulation Program with Integrated Circuit Emphasis) was developed at the Electronics
Research Laboratory of the University of California, Berkeley in 1973 by Laurence Nagel with
direction from his research advisor, Prof. Donald Pederson. Then Spice emerged as an industrial
standard through its descendants and is still the reference 40 years later.

PySpice is born as a personal project to relearn electronics where circuit simulation is a part of
this goal. Since I use the Python language every day, I quickly feel the need to plug SPICE and Python.

The aim of PySpice is to address several needs:

 * SPICE language is fine to describe circuits, but it lacks a real language for circuit
   steering. By contrast Python is a powerful high level, oriented object and dynamic language which
   is perfectly suited for steering and reusing circuit. But it comes at the price its more general
   syntax is less fluent than SPICE for circuit description.

 * Ngspice provides some extension to Berkeley SPICE for data analysis, but its interactive
   environment or TCL module are now outdated. By contrast Python has scientific framework like
   |Numpy|_ and |Matplotlib|_ that compete with Matlab.

 * Ngspice source code is derived from Berkeley SPICE and thus has a very old basis. Moreover the
   sources are poorly documented. So it is really difficult to understand how it works and modify
   it. PySpice could serve to easily experiment extension.

As opposite to other SPICE derivatives, PySpice focus on programming and not on graphical user
interface. Thus it doesn't feature a schematic capture editor and we cannot pickup a node or an
element and plot the associated waveform.  Moreover we can notice the |Modelica|_ language treats
diagrams as annotations.  A choice which I consider judicious.  Thus we can imagine to follow the
same principle and extend PySpice later.

==========
 Features
==========

.. include:: features.txt

==================
 Planned Features
==================

These features are planned in the future:

 * implement a basic simulator featuring passive element like resistor, capacitor and inductor.
 * implement a Modelica backend. |Modelica|_ is a very interesting solution for transient analysis.

================
 Advertisements
================

Users should be aware of these advertisements.

.. .. Warning:: The API is quite unstable until now. Some efforts is made to have a smooth API.

.. Warning:: Ngspice and PySpice are provided without any warranty. Thus you must use it with care
	     for real design. Best is to cross check the simulation using an industrial grade
	     simulator.

.. Warning:: Simulation is a design tool and not a perfect description of the real world.

.. End
