I am working on an eye-tracking project and need to plot real-time gaze data from the pupil core system. I am currently reading in live values through a network API to python, and I get hundreds of data points every second. The data comes as a large string of values, but I need to isolate only a few of these in order to plot them. Here is a picture of what the string of data looks like. I only need the x-coordinate of the gaze_point_3d [] and the timestamp.
I am not really sure where to start since the formmatting for pupil labs data is a bit different. So far I am just trying to print the x-coordinate and timestamp of the gaze_point, then I can plot it easily after that.
x_norm = gaze.3d.0.gaze_point_3d(1)
time= gaze.3d.0.timestamp()
while True:
topic, payload = subscriber.recv_multipart()
message = msgpack.loads(payload)
print(f"{topic}: {message}")
print(f"{x_norm},{time}")
I am struggling to call these values, and any help would be appreciated. THANK YOU!