MixtureOfGammasHRFKernel#
- class brainmass.MixtureOfGammasHRFKernel(a_1=6.0, a_2=13.0, l=1.0, c=0.4, duration=Quantity(20., 's'))#
Mixture-of-gammas HRF kernel (Glover 1999).
A difference of two gamma densities – the canonical SPM-style HRF [1]:
\[h(t) = \frac{(\lambda t)^{a_1 - 1} e^{-\lambda t}}{\Gamma(a_1)} - c\,\frac{(\lambda t)^{a_2 - 1} e^{-\lambda t}}{\Gamma(a_2)},\]with \(t\) in seconds. The first gamma models the positive BOLD peak; the second, scaled by \(c\), the post-stimulus undershoot.
- Parameters:
a_1 (float) – Shape parameter of the first (peak) gamma (default
6.0).a_2 (float) – Shape parameter of the second (undershoot) gamma (default
13.0).l (float) – Rate / inverse-scale parameter \(\lambda\) (default
1.0).c (float) – Relative amplitude of the undershoot gamma (default
0.4).duration (brainunit.Quantity) – Kernel support (default
20 * u.second).
References
Examples
>>> import brainmass >>> import brainunit as u >>> import jax.numpy as jnp >>> k = brainmass.MixtureOfGammasHRFKernel() >>> h = k(jnp.linspace(0., 20000., 256) * u.ms) >>> h.shape (256,)