vivyd.excitation.Excitation#
- class Excitation(x, dt)[source]#
Bases:
TaichiCompatibleA class for representing any signal that can be interpolated and used to affect models.
- Parameters:
x (arrf64) – A 1D array containing the signal values at discrete time points.
dt (float) – The time step between the discrete time points corresponding to the signal values in
x.Important:: (..) – To benefit from Taichi acceleration, ensure that the
Excitationclass is instantiated within a Taichi context.
Attributes#
- property Excitation.x#
Methods#
- Excitation.interpolate(t)[source]#
Interpolate the signal at a given time point.
- Parameters:
t (float) – A time point at which to interpolate the signal.
- Returns:
The interpolated signal value at the specified time point. specified time points.
- Return type:
float
- Raises:
ValueError – If any time point in
tis outside the range [0, (n-1)*dt], wherenis the number of discrete time points inx.
- Excitation.__call__(t)[source]#
Shorthand for
interpolate().- Parameters:
t (float)
- Return type:
float