create_sinusoidal_current#
- myogen.utils.currents.create_sinusoidal_current(n_pools, t_points, timestep__ms, amplitudes__muV, frequencies__Hz, offsets__muV, phases__rad=0.0)[source]#
Create a matrix of sinusoidal currents for multiple pools.
- Parameters:
n_pools (
int
) – Number of current pools to generatet_points (
int
) – Number of time pointstimestep__ms (
float
) – Time step in millisecondsamplitudes__muV (
float
|list
[float
]) –Amplitude(s) of the sinusoidal current(s) in microvolts.
- Must be:
Single float: used for all pools
List of floats: must match n_pools
frequencies__Hz (
float
|list
[float
]) –Frequency(s) of the sinusoidal current(s) in Hertz.
- Must be:
Single float: used for all pools
List of floats: must match n_pools
offsets__muV (
float
|list
[float
]) –DC offset(s) to add to the sinusoidal current(s) in microvolts.
- Must be:
Single float: used for all pools
List of floats: must match n_pools
phases__rad (
float
|list
[float
]) –Phase(s) of the sinusoidal current(s) in radians.
- Must be:
Single float: used for all pools
List of floats: must match n_pools
- Raises:
ValueError – If the amplitudes, frequencies, offsets, or phases are lists and the length of the parameters does not match n_pools
- Returns:
Matrix of shape (n_pools, t_points) containing sinusoidal currents
- Return type: