bag3_testbenches.measurement.data.tran
Transient simulation related data processing methods.
Module Contents
Classes
Support for flags |
Functions
|
|
|
Convert discrete samples to PWL waveform. |
|
Find the first time where waveform crosses a given threshold. |
|
|
|
- bag3_testbenches.measurement.data.tran.interp1d_no_nan(tvec: numpy.ndarray, yvec: numpy.ndarray) Callable[[Union[float, numpy.ndarray]], numpy.ndarray] [source]
- bag3_testbenches.measurement.data.tran.bits_to_pwl_iter(values: Sequence[Any]) Iterable[Tuple[float, float, float, Any]] [source]
Convert discrete samples to PWL waveform.
This method yields coefficients to td, tbit and trf, so user can generate symbolic PWL waveform files. Note that td must be positive.
- Parameters:
values (List[float]) – list of values for each bit.
- Yields:
td_scale (float) – coefficient for td
tbit_scale (float) – coefficient for tbit
trf (float) – coefficient for trf
val (Any) – the value
- bag3_testbenches.measurement.data.tran.get_first_crossings(tvec: numpy.ndarray, yvec: numpy.ndarray, threshold: Union[float, numpy.ndarray], start: Union[float, numpy.ndarray] = 0, stop: Union[float, numpy.ndarray] = float('inf'), etype: EdgeType = EdgeType.CROSS, rtol: float = 1e-08, atol: float = 1e-22, shape: Optional[Tuple[int, Ellipsis]] = None) numpy.ndarray [source]
Find the first time where waveform crosses a given threshold.
tvec and yvec can be multi-dimensional, in which case the waveforms are stored in the last axis. The returned numpy array will have the same shape as yvec with the last axis removed. If the waveform never crosses the threshold, positive infinity will be returned.