This program takes the exported data file from the Tobii Pro Lab software for a particular video and returns a processed version of the file. This data file contains the 'hit values' for the areas of interest for a particular task, eye movement type, and timestamp for each data point. Wherever there is a 'missing' hit value, this script will change the '0' into a '1'. The missing hit values classified as anywhere a string of '1's is disrupted by 0s, but there are no other fixations during that time window. This script will work for one task at a time
To use the script:
* Go to the 'src' file within the 'Blocks' folder. Open the script 'eyetracker_data_imputation.py' with a text editor. In file_list, write the names (and paths if need be) to the data export files to be processed. These files should be for the same task. Next to 'set_name', write the name of the task completed in the videos as it is defined in the Tobii Pro Lab software. Save the file.
* Open the terminal. Navigate to the blocks source directory and run the script:
New files will be saved that included the imputed 1s without changing the original data export file.
# Calculating the Visits to Each Area of Interest from the Tobii Pro Lab Data Export
This program will take the Microsoft Excel file that contains the processed data export and return the visits to each area of interest for the time intervals (end time to end time of each state) defined by the state data calculated from the compute-stats program.
To use the script:
* Open the file 'eyetracker_calculate_visit_counts.py' from the src file in the Blocks folder with a text editor. Fill in the name of the data export file you would like to calculate the visits from, the name of the file that contains the state data, and the name of the task that the data corresponds as defined in Tobii Pro Lab. Save the file.
* Open the terminal. Navigate to the blocks source directory and run the script:
This program will output a new data file that is identical to the state data file with added columns that include the visit counts for each area of interest. The original files will not be changed.
# Aligning the Timestamps in the Annotated Labels Files with the Timestamps from the Tobii Pro Lab Software
This program takes the annotated labels file that comes from the data annotation platform then changes the timestamps to match the indices of the closest timestamp in the data export.
To use the script:
* Open 'convert_annotated_label_frames_to_eyetracker_data_indices.py' from the 'src' file in the Blocks folder with a text editor. Write the name of your preferred annotator, the name of the study, the path to the eye-tracking exported metrics file, and the name of the blocks_file_index file. Save the file.
* Open the 'config' folder in Blocks folder with a text editor. Write the video numbers you would like to align in the file 'align_data.txt'.
* Open the terminal. Navigate to the blocks source directory and run the script:
* New files identical to the annotated labels files but with indices that reference the eye-tracking data rather than the overhead camera frames will be saved. The original file will be untouched.