Next, the 1000- and 60-Hz recordings each underwent a separate filtering procedure
(Figs. 1B 1C) . For the 1000-Hz recording, a moving Gaussian filter with a 9-number base (4-ms width on each side of the center-weighted time point) was applied once, resulting in a minimal smoothing of the tracing, as shown in
Figure 1B . The frequency response curve of the 9-point Gaussian filter showed that this filter allowed 90% of a 50-Hz signal, 60% of a 107-Hz signal, and 30% of a 165-Hz signal to pass at the 1000-Hz sampling rate. For the 60-Hz video recording, a 5-point second-order polynomial moving Savitzky-Golay filter
39 was used (Matlab, ver. 5.3, function SAVGOL3.m, ver. 2.3, programmed by Thomas Haslwanter, Zurich, Switzerland; the MathWorks, Inc., Natick, MA), as shown in
Figure 1C . The Savitzky-Golay filter allowed 90% of a 10.5-Hz signal, 60% of a 15.8-Hz signal, and 30% of a 19.2-Hz signal to pass in the 60-Hz sampling rate. Therefore, both filters are more effective in gradually reducing higher-frequency components. A digital filter with a sharp cutoff that provides an accurate measure of frequency bandwidth was not used, because such an arbitrary determination would have needed further justification. A 4-point 60- to 300-Hz interpolation was also applied to the 60-Hz data, by applying a cubic spline function to the 60-Hz position and velocity tracings. The resultant 300-Hz data served as an additional sampling rate to be analyzed. We also reduced the 1000-Hz data as close as possible to the 60-Hz data for direct comparison. Every 17th time point was preserved from the smoothed and filtered 1000-Hz position data, resulting in a measurement frequency of 58.8 Hz. To deduce the onset of the pupil contraction, the second derivative (acceleration) of the position tracing was calculated by taking the derivative of the velocity tracing after the tracing was filtered (described later).
Figure 2 shows the contraction portion of a pupil light reflex including the position, velocity, and acceleration of the right pupil from a single subject (SA), before and after filtering the velocity data only. The characteristic of the Gaussian filter that was applied (function filtfilt.m; Matlab, ver. 5.3; The MathWorks, Inc.) varied, depending on the data sampling. Details of the exact filtering procedure used will be presented in the Results section. The time of onset of pupil contraction is shown and corresponded to when the pupil acceleration was maximally negative. The time segment when the maximum change or slope in velocity occurred (greatest absolute acceleration) was quite symmetric (almost linear), allowing this time point to be resistant to distortion and shifting by Gaussian filtering. Note that the trough in the acceleration tracing could be correctly identified only after filtering of the velocity tracing.