neurodsp.sim.transients.sim_synaptic_kernel

neurodsp.sim.transients.sim_synaptic_kernel(n_seconds, fs, tau_r, tau_d)[source]

Simulate a synaptic kernel with specified time constants.

Parameters
n_secondsfloat

Length of simulated kernel in seconds.

fsfloat

Sampling rate of simulated signal, in Hz.

tau_rfloat

Rise time of synaptic kernel, in seconds.

tau_dfloat

Decay time of synaptic kernel, in seconds.

Returns
kernel1d array

Simulated synaptic kernel.

Notes

Three types of kernels are available, based on combinations of time constants:

  • tau_r == tau_d : alpha synapse

  • tau_r = 0 : instantaneous rise, with single exponential decay

  • tau_r != tau_d != 0 : double-exponential, with exponential rise and decay

Examples

Simulate an alpha synaptic kernel:

>>> kernel = sim_synaptic_kernel(n_seconds=1, fs=500, tau_r=0.25, tau_d=0.25)

Simulate a double exponential synaptic kernel:

>>> kernel = sim_synaptic_kernel(n_seconds=1, fs=500, tau_r=0.1, tau_d=0.3)