pupil_get_max_duration#

pypillometry.signal.pupil_get_max_duration(npar, tmax, thr=1e-08, stepsize=1.0)[source]#

Get the time when the PRF with parameters \(n\) and \(t_{max}\) is decayed to thr. This gives an indication of how long the duration parameter in pupil_kernel() should be chosen.

Parameters:
  • npar (float) – PRF parameter \(n\), see pupil_kernel()

  • tmax (float) – PRF parameter \(t_{max}\) in ms, see pupil_kernel()

  • thr (float) – desired value to which the PRF is decayed (the lower thr, the longer the duration)

  • stepsize (float) – precision of the maximum duration in ms

Returns:

tdur (float) – first value of t (in ms, searched from tmax onwards in steps of stepsize) so that PRF(t) <= thr