PDA

View Full Version : Write Eye-tracking data to file


Vishav
10-17-2018, 05:50 AM
I want to write real-time eye-tracking data in file while vizard is running. I want my data values to get store upto 5 decimal places as tobii eyetracker is giving values upto 16 decimal places, If i use %s for writing but not working for %f. My code is:
data = '\t%f\t%f\t\t%f\n'%(st,gaze_left_eye1,gaze_right_e ye1)
f1.write(data)

Why this code not working?

Jeff
10-24-2018, 09:17 PM
The string formatting (https://docs.worldviz.com/vizard/latest/#String_Formatting.htm) page has different examples of formatting data including the number of digits after the decimal point.

Vishav
11-05-2018, 10:20 PM
Thanks Jeff