Update Eyetracker Scripts HowTo authored by Jonathan Jones's avatar Jonathan Jones
...@@ -14,35 +14,35 @@ To use the script: ...@@ -14,35 +14,35 @@ To use the script:
New files will be saved that included the imputed 1s without changing the original data export file. 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 # Aligning the Timestamps in the Annotated Labels Files with the Timestamps from the Tobii Pro Lab Software
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. 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: 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 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 '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: * Open the terminal. Navigate to the blocks source directory and run the script:
``` bash ``` bash
user@host:~$ cd repo/blocks/src user@host:~$ cd repo/blocks/src
user@host:~/repo/blocks/src$ python eyetracker_calculate_visit_counts.py user@host:~/repo/blocks/src$ python convert_annotated_label_frames_to_eyetracker_data_indices.py
``` ```
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. * 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.
# Aligning the Timestamps in the Annotated Labels Files with the Timestamps from the Tobii Pro Lab Software # Calculating the Visits to Each Area of Interest from the Tobii Pro Lab Data Export
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. 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: 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 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: * Open the terminal. Navigate to the blocks source directory and run the script:
``` bash ``` bash
user@host:~$ cd repo/blocks/src user@host:~$ cd repo/blocks/src
user@host:~/repo/blocks/src$ python convert_annotated_label_frames_to_eyetracker_data_indices.py user@host:~/repo/blocks/src$ python eyetracker_calculate_visit_counts.py
``` ```
* 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. 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.
\ No newline at end of file