Eyetracking events not saved in hdf5

I’m testing out the new eyetracking routines and had some questions about their usage. I’ve previously used ioHub code to record eyetracking data. Without adding any additional code and just using the Record and ROI routines.

In testing with the MouseGaze simulator I’m not seeing how the ROI fixations are being saved in the HDF. I looked in ‘/data_collection/events/experiment/MessageEvent’ and it is empty. I set up ROIs where my stimuli will appear and even though i used the trackpad to ‘fixate’ on different stimuli I only see one FixationStartEvent and 0 FixationEndEvent. When I look at MonocularEyeSampleEvent and plot gaze_x and gaze_y I get very sensible plots. Where should the ROI fixations be in the hdf? In the roi component properties I set the ROI to be a circle of equivalent size to my stimuli and at the same location. Data save is set to ‘every look’ and time relative to set to ‘roi onset’, with save onset/offset times selected.

If I want to save other event data like the trial conditions (which aren’t related to ROI), would I just use iohub code like I previously would, e.g., in a begin routine tab io.sendMessageEvent(text=f"start_TRIAL-{trialNum_cumul}_EVENT-stim_CONDITION-{stimCode}") # start of the trial and another in end routine to signal the end of the event?

trackpad to ‘fixate’ on different stimuli I only see one FixationStartEvent and 0 FixationEndEvent.

This is probably because of the default settings for MouseGaze. Try setting the Saccade Threshold to a lower value, like 0.1 or setting the “Move Button” to something other than Continuous, like RIGHT_BUTTON.

Where should the ROI fixations be in the hdf?

There is currently no integration between the ROI component and the hdf5 file; ROI data is saved to the standard psychopy results file. I think hdf5 file integration is something that will be improved in the next major release.

If I want to save other event data like the trial conditions (which aren’t related to ROI), would I just use iohub code like I previously would, e.g…

Yes, for now send your own experiment messages using custom code as you did before. The only difference is that the Builder generated code calls the iohub server connection ioServer, so you would use ioServer.sendMessageEvent(text="message text")

Thank you

1 Like