pupil_kernel_t#

pypillometry.signal.pupil_kernel_t(t, npar, tmax)[source]#

According to Hoeks and Levelt (1993, https://link.springer.com/content/pdf/10.3758%2FBF03204445.pdf), the PRF can be described by the so-called Erlang gamma function

\[h_{HL}(t) = t^n e^{-nt/t_{max}}\]
which we normalize to
\[h(t)=\frac{1}{h_{max}} h_{HL}(t)\]
where
\[h_{max} = \max_t{\left(h_{HL}(t)\right)} = e^{-n}t_{max}^{n}\]
which yields a maximum value of 1 for this function. The function \(h(t)\) is implemented in pupil_kernel().

This version of the function evaluates the PRF at inputs t.

Parameters:
  • t (float or np.ndarray) – time(s) at which to evaluate the PRF, in ms

  • npar (float) – n in the equation above

  • tmax (float) – \(t_{max}\) in the equation above (time of the peak), in ms

Returns:

h (np.ndarray) – PRF evaluated at t