pupil_kernel#

pypillometry.signal.pupil_kernel(duration=4000, fs=1000, npar=10.1, tmax=930.0)[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 pp.signal.pupil_kernel().

Parameters:
  • duration (float) – in ms; maximum of the time window for which to calculate the PRF [0,duration]

  • fs (float) – sampling rate in Hz for resolving the PRF

  • npar (float) – n in the equation above

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

Returns:

h (np.ndarray) – sampled version of h(t) at sampling rate fs, starting at t=0, with int(duration/1000*fs) samples