Functions for analyzing pupil dilation data