pingspice.circuit.wrappers.PWL(Wrapper)
class documentation
Part of pingspice.circuit.wrappers
(View In Hierarchy)
Known subclasses: pingspice.circuit.wrappers.TABLE
Piecewise Linear Function
Construct me with 2-3 arguments. Two arguments are sequences or Numpy 1-D array of X, Y values, dependent on TIME, the transient simulation time in seconds. No network variable dependency will be included. This is for PWL transient sources.
Three arguments are (1) an expression whose value will determine the output and the two arguments for the previous constructor pattern. They are: (2) a sequence or Numpy 1-D array of monotonically increasing X values, and (3) a sequence or Numpy 1-D array of Y values. Like this::
pwl = PWL(10, X, Y)
where:
X = np.array([0, 1.0, 1.5, 2.5]) Y = np.array([0, 0.5, 4.5, 5.0])
Passing this wrapper in an f call will result in this:
PWL(V(10), 0, 0, 1.0, 0.5, 1.5, 4.5, 2.5, 5.0)
Method | check_shapes | Raises an exception if the argument(s) is/are not a sequence or 1-D array. If multiple args, the lengths must be the same. |
Method | getXY | Checks my arguments for X and Y sequences or 1-D arrays, ensuring that everything is OK and then returning X and Y. |
Method | dependency | Converts my name (first constructor argument) to a legit network dependency source. |
Method | __call__ | Undocumented |
Inherited from Wrapper:
Method | __init__ | Undocumented |
Method | __iter__ | You can iterate me over my arguments. |
Method | __str__ | Undocumented |
Method | argsToString | Undocumented |
Method | kwToString | Undocumented |
Raises an exception if the argument(s) is/are not a sequence or 1-D array. If multiple args, the lengths must be the same.
Checks my arguments for X and Y sequences or 1-D arrays, ensuring that everything is OK and then returning X and Y.
Converts my name (first constructor argument) to a legit network dependency source.