FirstOrderVolterraHRFKernel#

class brainmass.FirstOrderVolterraHRFKernel(tau_s=0.8, tau_f=0.4, scaling=0.3333333333333333, duration=Quantity(20., 's'))#

First-order Volterra kernel of the hemodynamic system (TVB canonical).

The canonical damped-oscillator HRF – the first-order Volterra kernel of the Balloon/Windkessel hemodynamics (Friston et al. 2000) [1], ported from TVB’s FirstOrderVolterra equation:

\[h(t) = s \, e^{-t / (2\tau_s)} \, \frac{\sin(\omega t)}{\omega}, \qquad \omega = \sqrt{\frac{1}{\tau_f} - \frac{1}{4\tau_s^2}},\]

where \(t\) is in seconds, \(\tau_s\) is the signal-decay time constant, \(\tau_f\) the feedback time constant and \(s\) an amplitude scaling. This is the underdamped solution: \(\omega\) is real only when \(4\tau_s^2 > \tau_f\) (the defaults satisfy this); violating it makes \(\omega\) – and the whole kernel – NaN.

Despite the shared name of the mathematician Vito Volterra, this is unrelated to Lotka-Volterra (predator-prey) dynamics.

Parameters:
  • tau_s (float) – Signal decay time constant in seconds (default 0.8).

  • tau_f (float) – Feedback time constant in seconds (default 0.4).

  • scaling (float) – Kernel amplitude scaling factor (default 1 / 3).

  • duration (brainunit.Quantity) – Kernel support (default 20 * u.second).

References

Examples

>>> import brainmass
>>> import brainunit as u
>>> import jax.numpy as jnp
>>> k = brainmass.FirstOrderVolterraHRFKernel()
>>> t = jnp.linspace(0., 20000., 5) * u.ms
>>> h = k(t)
>>> h.shape
(5,)
>>> float(h[0])
0.0
__init__(tau_s=0.8, tau_f=0.4, scaling=0.3333333333333333, duration=Quantity(20., 's'))[source]#