Welcome! Log In Create A New Profile

Advanced

Ethernet connected Eyelink results in repeated sampling

Posted by curiousgeorge 
Ethernet connected Eyelink results in repeated sampling
August 04, 2023 05:44PM
Hi Jaewon,

I'm having some trouble with the eye data that i'm getting in monkeylogic. I'm using the following system.

Eyelink 1000 plus
Monkeylogic 2.2.34
Ethernet connection between Eyelink and Monkeylogic


Problem:
The eye data that I acquire in monkeylogic seems to have repeated samples. The repeated samples are typically consecutive samples, and don't seem to be repeated a consistent number of times.

I recall hearing about issues of "repeated sampling" of consecutive eye samples for Eyelink on a 1000hz sampling rate, so I tried diagnosing this problem both with the sampling rate of Eyelink set to 500hz and 1000hz.

I'm attaching a figure of single trial horizontal eye traces acquired in monkeylogic, one trial using 1000hz and the other using 500z eyelink sampling rate (first and second picture respectively). The 500hz case is plotting only every other sample (since monkeylogic samples at 1000kz).

The eye trace is in blue, and in red i'm plotting timepoints at which identical consecutive values are found ("repeated sampling").

The code looks like this:

plot(data(1).AnalogData.Eye(:,1),'blue');
idx = find(diff(data(1).AnalogData.Eye(:,1))==0)
hold on
scatter(idx,data(1).AnalogData.Eye(idx,1),'red')

How can I get started in diagnosing this? Is this behaviour you have seen before?

Any help would be much appreciated,
Thanks
Attachments:
open | download - Eyelink_1000hz_everySample.png (31.6 KB)
open | download - Eyelink_500hz_everysecondSample.png (22.2 KB)
Re: Ethernet connected Eyelink results in repeated sampling
August 04, 2023 07:15PM
I fail to see why this is a problem. Can you elaborate?

Did you disable Nagle's algorithm?
https://monkeylogic.nimh.nih.gov/docs_TCPIPEyeTracker.html
Re: Ethernet connected Eyelink results in repeated sampling
August 07, 2023 09:47PM
Hi Jaewon,

The inherent noise in the eyelink eye tracking process results in a non-perfect spatial resolution/precision, and so the same eye position on the screen should not give the exact same measurement. The specifications that they give (< 0.1° RMS for 1khz sampling rate) is with an artificial eye as well, therefore real eye data is likely noisier.

This makes me believe that what I see in the data is the repetition of the previous samples as opposed to the acquired new samples. The repeated sampling is also seen during saccades when it is unlikely that there is repeated eye position with 1khz sampling.

I have also disabled Nagle's algorithm yes.

Any help would be appreciated. Is this behaviour that anyone else has previously reported?

Thanks
Re: Ethernet connected Eyelink results in repeated sampling
August 08, 2023 03:05AM
Although the specification is 1 kHz, the sample interval here is not exactly 1 ms on both sides. TCP/IP transmission is asynchronous and NIMH ML's reading is also based on a software timer, which is affected by the system performance. If NIMH ML reads again after 0.9 ms but the next sample from EyeLink arrives in 1.1 ms, for example, you get a repeated sample.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.