pupil-helpers icon indicating copy to clipboard operation
pupil-helpers copied to clipboard

Online Fixation data acquisition

Open lilijiazhen opened this issue 3 years ago • 10 comments

Hello, I would like to use Matlab to get Online Fixation data in the Pupil Capture, what parts should I modify in the code.

I tried to change gaze in filter_messages.m to fixation, but I failed

lilijiazhen avatar Dec 08 '21 13:12 lilijiazhen

Changing the subscription topic is the correct approach. What type of error did you receive?

papr avatar Dec 08 '21 13:12 papr

We changed the topic, but we got no results and no errors in MATLAB.

lilijiazhen avatar Dec 08 '21 14:12 lilijiazhen

Make sure that 1.) you have calibrated (in this case you should be receiving gaze after subscribing to gaze), and that 2.) the online fixation detector is running. Go to the Pupil Capture Plugin Manager menu to enable the plugin.

Please also try increasing the buffer size here https://github.com/pupil-labs/pupil-helpers/blob/master/matlab/filter_messages.m#L68

papr avatar Dec 08 '21 14:12 papr

Thank you very much. Let's try it first.

lilijiazhen avatar Dec 08 '21 14:12 lilijiazhen

Hello, we have increased the buffer size and also made sure that the online fixation detector is running. But we still didn't succeed.We can only get the gaze data without fixation data. Attach our code for you to view. fixation problem.txt

lilijiazhen avatar Dec 12 '21 10:12 lilijiazhen

Hi, please change the subscription prefix from fixation. to fixations. The fixation topic does not follow the same naming convention as the gaze data.

papr avatar Dec 13 '21 09:12 papr

Also, you should not subscribe to gaze if you only process 20 messages. Since gaze is estimated at a high frequency, it is unlikely that you will receive a fixation within these 20 messages if you are also subscribed to gaze.

papr avatar Dec 13 '21 09:12 papr

I don't need gaze data, I just want to get the fixation data. So I just need to change fixation to fixations, right?

lilijiazhen avatar Dec 13 '21 10:12 lilijiazhen

These are the recommended changes:

- zmq.core.setsockopt(sub_socket, 'ZMQ_SUBSCRIBE', 'gaze.');
- zmq.core.setsockopt(sub_socket, 'ZMQ_SUBSCRIBE', 'fixation.');%added myself,have a problem, no data
+ zmq.core.setsockopt(sub_socket, 'ZMQ_SUBSCRIBE', 'fixations');%added myself,have a problem, no data

Be aware of the removal of the trailing .. Subscriptions are prefix-based. In other words, you will receive all messages whose topics start with the subscription string. Since the fixation topics do not contain a ., you were not able to receive any fixations.

papr avatar Dec 13 '21 10:12 papr

Ok, thank you very much! Let's try it first.

lilijiazhen avatar Dec 13 '21 10:12 lilijiazhen