PRF convolution sandbox

Use this tool to explore how different timings and weightings between stimulus impulse events affect the resulting pupil trace.

This tool can be useful for making sure you design experiments with enough time between events for the pupil to completely return to baseline (if that is important to you).

The impulses are convolved with a pupillary response function (PRF).

You can choose to use a PRF that mimics the effect of participants being asked to press a button (motor) or not, by ticking the box below.

Set the parameters below and then click the button to generate plots.




Impulse train

PRF

Predicted pupil data

Play around

Adjust the controls above to build an intuition for convolution.

For example, try the following:

Set the impulse IOI to 1000 and the weight to 2 and motor to 0 (unchecked).

In the resulting predicted pupil data, you can see a clean pupillary response to all input impulses.

Now tick the motor box. What happened to the predicted pupil trace?

Because the motor PRF takes longer to reach its maximum and return to baseline, the resulting prediction of the pupil data we would record, given this input sequence, is now somewhat smeared across events.

Now change the impulse IOI to 600. What do you see?

The pupil response to every second event is almost completely overshadowed by the response to the first. There is not enough time between events to measure separate responses.

Learn more

Check out this paper to learn more about convolution (see section "Pupillary response function"):

Fink, L., Simola, J., Tavano, A., Lange, E., Wallot, S., & Laeng, B. (2023). From pre-processing to advanced dynamic modeling of pupil data. Behavior Research Methods, 1-37.