I am an analyzer for simulating results with a Python callable, in those cases where there's no need for Ngspice simulation.

No constructor is used; your subclass is welcome to have one, e.g., lib.thermal.SeriesResistanceAnalyzer.__init__.

Before using me, you can define AV objects I use with a call to avDefine. It accepts as a single argument instance of av.AV_Maker, with the very useful f.av method. Then, also before using me, set me up with a call to setup.

The callable you override my func method with must accept as its arguments a Numpy array for each independent vector I produce for it, and as its keywords all current parameter values from the avList, determined from the values that are supplied to each call of my instance. It must return either a single SSE scalar or a tuple with one Numpy array for each vector represented by the names in vectorNames, excluding any independent vectors.

Instance Variable timeout Defines how long I will wait for a result from my (subclassed) evaluation func, run in a thread.
Instance Variable absVals Set to a sequence with the names of all vectors whose raw vector values are always treated as positive numbers. See VectorsBase.
Method V Undocumented
Method setup Call this before using me. Returns a Deferred that fires when I'm ready, with a reference to me if all went OK or None if not.
Method addName Call after setup to adds a vector with name to my Vectors_Python object V.
Method shutdown Undocumented
Method __repr__ Undocumented
Method __getstate__ Undocumented
Method __setstate__ Undocumented
Method avDefine Undocumented
Method func Undocumented
Method scheduleSweep Call this with the name of each independent vector and, during setup, I'll do a sweep for it based on the next three values in my stash of unused sweep args
Method __call__ No summary

Inherited from AV_ListHolder (via AnalyzerBase):

Method params Property: A list of the AV objects in my avList that are parameters.
Method avListSorted Property: A copy of my avList, sorted by each AV object's dmpLabel. If I have no avList for some reason, returns an empty list.
Method __len__ My length is the number of parameter AV objects in my avList.
Method getValuesIndexFor Returns the index in each values list supplied to my __call__ method at which the one and only parameter AV object is found having the same name as the supplied av.
Method checkValues Checks the supplied list of values to ensure that I have a parameter AV object for every one, and no parameter AV objects not accounted for.
Method alterations Performs component and device parameter alterations based on the supplied list of parameter values, using the two callables supplied as additional arguments.

Inherited from AV_ListHolder (via AnalyzerBase):

Method params Property: A list of the AV objects in my avList that are parameters.
Method avListSorted Property: A copy of my avList, sorted by each AV object's dmpLabel. If I have no avList for some reason, returns an empty list.
Method __len__ My length is the number of parameter AV objects in my avList.
Method getValuesIndexFor Returns the index in each values list supplied to my __call__ method at which the one and only parameter AV object is found having the same name as the supplied av.
Method checkValues Checks the supplied list of values to ensure that I have a parameter AV object for every one, and no parameter AV objects not accounted for.
Method alterations Performs component and device parameter alterations based on the supplied list of parameter values, using the two callables supplied as additional arguments.
timeout =
Defines how long I will wait for a result from my (subclassed) evaluation func, run in a thread.
absVals =
Set to a sequence with the names of all vectors whose raw vector values are always treated as positive numbers. See VectorsBase.
@property
def V(self):
Undocumented
@defer.inlineCallbacks
def setup(self, ID, vectorNames, avList, *sweeps):

Call this before using me. Returns a Deferred that fires when I'm ready, with a reference to me if all went OK or None if not.

ParametersIDAn integer ID for the analysis setup I am handling.
vectorNamesA list of the vector names I am handling.
avListA reference to a shared list of AV objects.
sweepsTriads of values (not tuples) defining DC-style sweeps of values for each independent vector: start, stop, increment.
def addName(self, name, k=None):

Call after setup to adds a vector with name to my Vectors_Python object V.

Returns a Deferred that fires immediately. (This is for consistency with sim.Analyzer.addName, which may have to talk with Ngspice when adding a vector name.)

ParameterskSet this to an integer to have the name inserted at a specific position in the names list of my Vectors_Python object's NameManager rather than appended. The order isn't usually important, but does affect the result of a call to VectorsBase.array.
def shutdown(self):
Undocumented
def __repr__(self):
Undocumented
def __getstate__(self):
def __setstate__(self, state):
def scheduleSweep(self, name):

Call this with the name of each independent vector and, during setup, I'll do a sweep for it based on the next three values in my stash of unused sweep args

@defer.inlineCallbacks
def __call__(self, *args, **kw):

Call my instance with a list of float values (or sub-lists of floats in the case of vector values) to populate my Vectors_Python object V with vectors from Python-only analysis.

The total number of items in the list must equal the total number of names supplied to those setup method calls. If no alterables have been defined, then an empty list is what's acceptable (the default if no arg is supplied).

After I alter these values and/or parameters and I do the analysis, the returned Deferred will fire with a reference to my Vectors_Python instance. It will contain the resulting Numpy vectors, unless the value is out of a defined range or produced a Numpy error.

Any keywords supplied are ignored.

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