This is a convenience function to resample and filter head movement or eye tracker data frames for further gaze processing.

prepare_gaze_data(df, samplingrate = NULL)

Arguments

df

A movement or eyetracker data frame. Expected columns are either rot_x, rot_y, rot_z, or gaze_direction_x, gaze_direction_y, gaze_direction_z

samplingrate

resampling rate

Value

Resampled data frame with filtered columns.

Details

To be used with extract_... functions that extract movement features between time points. To avoid edge effects, the filtering is done on the entire data frame.

NOTE: to avoid an impact of tracker glitches, data are resampled at default rate of 10 Hz (movement) or 100 Hz (gaze) and median-smoothed over 3 data points (300 or 30 ms).