pingspice.analysis.vectors.Vectors_Python(VectorsBase)
class documentation
Part of pingspice.analysis.vectors
(View In Hierarchy)
I hold results of a Python-only simulatation as Numpy vectors, accessible (read-only) as my attributes or as named items, dict-style.
Construct me with a callable for generating non-independent vectors and a list of vector names I am supposed to provide access to.
Method | __init__ | Undocumented |
Method | doSweep | Undocumented |
Method | addName | Adds a name to my NameManager
nm. |
Method | addVector | Adds 1-D Numpy array X as a vector with name. |
Method | copy | Returns a copy of me with its own copies of my analyzer object, swept set, and values dict as they stand right now. |
Method | __call__ | Obtains the result vectors and set my read-only attributes (or pseudo-items) with them. |
Inherited from VectorsBase:
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 | trimmedCopy | Returns a copy of me, trimmed to omit values from TIME < tMin and from TIME > tMax. |
Adds a name to my NameManager
nm.
Parameters | k | Set this to an integer to have the name inserted at a specific position in
the names list of my NameManager
object nm rather than appended. The order isn't usually important,
but does affect the result of a call to array . |
Returns a copy of me with its own copies of my analyzer object, swept set, and values dict as they stand right now.
This allows somebody like the Plotter
to leisurely access
my vectors without concern that my analyzer will call me again and
overwrite them.
Obtains the result vectors and set my read-only attributes (or pseudo-items) with them.
Returns a Deferred
that fires (with None
) when
I've attempted to set all the attributes. If I fail to set any, my error
state gets set, checkable with a call to error
.