I am an abstract base class for Vectors that provides a convenient common interface for accessing both Python-only and Ngspice simulation results.

Vectors (1-D Numpy arrays) can be accessed as my attributes, so long as their names don't include characters like "-" or "(" that are forbidden to Python variables, or as mapping-style elements.

Method nm 0 Property: My NameManager, newly constructed if I did't have one yet.
Method nm 1 Undocumented
Method nm Undocumented
Method __contains__ Dict-like access to my values: Whether name is included.
Method __len__ Dict-like access to my values: The number of vectors and perhaps +1 for a None entry.
Method __iter__ Dict-like access to my values: Iterates over vector names plus perhaps None for a psim.Analyzer instance.
Method __getitem__ Dict-like access to my values, with scaling done from unity except for a None item, which is an SSE from a psim.Analyzer instance.
Method __setitem__ Replace the existing numpy vector specified by name with another.
Method __getattr__ A value can be accessed as an attribute if it has an attribute-friendly name.
Method avg Returns the time-weighted average value of my vector name, given my time vector.
Method error Call this with something to tell me that I've had an error, or with nothing to find out if I've had an error.
Method setValue Sets entry cname in my values dict to x, or to its absolute value if cname is an absolute value vector.
Method array Returns my data as a 2-D Numpy array, with each of my values (except a None entry) appearing as a column vector.
Method save Saves my current contents to a .npz file at the specified filePath, with any home directory symbol ("~") expanded.
Method copy Undocumented
Method trimmedCopy Returns a copy of me, trimmed to omit values from TIME < tMin and from TIME > tMax.
@property
def nm 0(self):

Property: My NameManager, newly constructed if I did't have one yet.

@nm.setter
def nm 1(self, x):
Undocumented
@nm.deleter
def nm(self):
Undocumented
def __contains__(self, name):

Dict-like access to my values: Whether name is included.

def __len__(self):

Dict-like access to my values: The number of vectors and perhaps +1 for a None entry.

def __iter__(self):

Dict-like access to my values: Iterates over vector names plus perhaps None for a psim.Analyzer instance.

def __getitem__(self, name):

Dict-like access to my values, with scaling done from unity except for a None item, which is an SSE from a psim.Analyzer instance.

def __setitem__(self, name, value):

Replace the existing numpy vector specified by name with another.

This is only for modifying my existing contents; raises an exception if you try to set a new vector with this mechanism.

def __getattr__(self, name):

A value can be accessed as an attribute if it has an attribute-friendly name.

def avg(self, name):

Returns the time-weighted average value of my vector name, given my time vector.

def error(self, *args):

Call this with something to tell me that I've had an error, or with nothing to find out if I've had an error.

The "something" to call with can be an informative string or a twisted.python.failure.Failure object.

def setValue(self, x, cname):

Sets entry cname in my values dict to x, or to its absolute value if cname is an absolute value vector.

Make sure cname is either None or a canonical name. Set it to None to record the SSE from a psim.Analyzer whose Python callable returns an SSE instead of computing and returning the values of one or more non-independent vectors.

def array(self, includeNames=False):

Returns my data as a 2-D Numpy array, with each of my values (except a None entry) appearing as a column vector.

The columns are in the same order as the vector names were added, as indicated by the list returned from calling NameManager.cnameList.

If I have no values, None is returned, followed by an empty list if includeNames is set True.

ParametersincludeNamesSet True to have the canonical name list included. The result will then be a 2-tuple, with the array and then the names list.
def save(self, filePath):

Saves my current contents to a .npz file at the specified filePath, with any home directory symbol ("~") expanded.

def trimmedCopy(self, tMin=None, tMax=None):

Returns a copy of me, trimmed to omit values from TIME < tMin and from TIME > tMax.

If I do not have a 'time' vector already loaded, an exception is raised.

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