File source providing piecewise-linear source voltage values vs. time.

Make your source waveform as complicated as you wish!

Instance Variable t A Numpy vector of increasing simulation time points.
Instance Variable X A Numpy vector with the same length as t of source voltages.
Instance Variable filePath The full path of a file to be (over)written with t and X data. Any home directory symbol ("~") will be expanded. If None (the default), a new, unique temporary file path will be used.
Instance Variable keep Set True to keep the file after Python shuts down. The default is to automatically delete it, but you may want to keep it for study.
Instance Variable gain A scalar for amplifying the signal (default is 1.0).
Method writeData Opens a new tempfile for writing and for Ngspice to read during this Python session. (Gets deleted when Python shuts down.)
Method setup Subcircuit definition.

Inherited from NodeStuff (via Subcircuit):

Instance Variable shunts A dict of current sensing V elements with the pairs of nodes they connect.
Class Variable debug A Bag that gets set True for all instances to log info about each setup call.
Class Method autoName Undocumented
Method setupResults Undocumented
Method fill Undocumented
Method nodeCheck Call with the circuit building tool f and a sequence of nodes provided to this Include or Subcircuit.
Method rawNetlist Get lines of a raw netlist from a search hierarchy of possible sources.
Method shunt Call to insert a current-measuring shunt and add an entry to my Elements baton's dict of shunts.
Method raw See Elements.raw.
Method iNode See Elements.iNode.
Method ground See Elements.ground.
Method sca See Elements.sca.
Method sca6 See Elements.sca6.
Class Method _libDir Undocumented
Method _strippedLines Undocumented
Method _call_setup Calls my setup method (almost always your override of that method, actually) and processes any return value.

Inherited from NodeStuff (via Subcircuit):

Instance Variable shunts A dict of current sensing V elements with the pairs of nodes they connect.
Class Variable debug A Bag that gets set True for all instances to log info about each setup call.
Class Method autoName Undocumented
Method setupResults Undocumented
Method fill Undocumented
Method nodeCheck Call with the circuit building tool f and a sequence of nodes provided to this Include or Subcircuit.
Method rawNetlist Get lines of a raw netlist from a search hierarchy of possible sources.
Method shunt Call to insert a current-measuring shunt and add an entry to my Elements baton's dict of shunts.
Method raw See Elements.raw.
Method iNode See Elements.iNode.
Method ground See Elements.ground.
Method sca See Elements.sca.
Method sca6 See Elements.sca6.
Class Method _libDir Undocumented
Method _strippedLines Undocumented
Method _call_setup Calls my setup method (almost always your override of that method, actually) and processes any return value.
t =
A Numpy vector of increasing simulation time points.
X =
A Numpy vector with the same length as t of source voltages.
filePath =
The full path of a file to be (over)written with t and X data. Any home directory symbol ("~") will be expanded. If None (the default), a new, unique temporary file path will be used.
keep =
Set True to keep the file after Python shuts down. The default is to automatically delete it, but you may want to keep it for study.
gain =
A scalar for amplifying the signal (default is 1.0).
def writeData(self, filePath, t, X):

Opens a new tempfile for writing and for Ngspice to read during this Python session. (Gets deleted when Python shuts down.)

def setup(self, f):

Subcircuit definition.

Why use f? Because it's short and a conveniently typed letter on the keyboard.

Override this if your subclass does not reference a param.ParameterFinder subclass via the Finder class attribute. As with Include.setup, your override method can return a dict of attribute names and values to set in my instance.

API Documentation for pingspice, generated by pydoctor at 2021-09-18 08:41:11.