Hi,
Im currently preparing an experiment which records the pupil diameter when the eyelink is recording. I store the pupil area in an array as the experiment proceeds. I take it from the sample structure returned from
sample = Eyelink('NewestFloatSample');
I also take the time from this sample structure.
I have a questions relating to timing in Psychtoolbox. I have a small script at the beginning of my experiment to find the baseline pupil diameter. Its a simple script that takes samples for five seconds and then plots the pupil diamter versus time.
Here is the loop i use
...
tic;
while(time <= 5)
%Draw the fixation cross
drawFixationCross(win,centrex,centrey);
[targetFlipstart,targetStimOnset]=Screen('Flip', win);
sample = Eyelink('NewestFloatSample');
t = sample.time;
pa= sample.pa;
trialPA=[trialPA,pa];
trialTimes=[trialTimes,t];
%Update the clock
time=toc;
end;
...
This code works fine but when i run it I seem to only get roughly 500 samples.
I use and Eyelink 2. Should it not give me more samples? Should i be using tic and toc to act as guards for the while loop?
Forgive if this question has been asked before.
Patrick
Im currently preparing an experiment which records the pupil diameter when the eyelink is recording. I store the pupil area in an array as the experiment proceeds. I take it from the sample structure returned from
sample = Eyelink('NewestFloatSample');
I also take the time from this sample structure.
I have a questions relating to timing in Psychtoolbox. I have a small script at the beginning of my experiment to find the baseline pupil diameter. Its a simple script that takes samples for five seconds and then plots the pupil diamter versus time.
Here is the loop i use
...
tic;
while(time <= 5)
%Draw the fixation cross
drawFixationCross(win,centrex,centrey);
[targetFlipstart,targetStimOnset]=Screen('Flip', win);
sample = Eyelink('NewestFloatSample');
t = sample.time;
pa= sample.pa;
trialPA=[trialPA,pa];
trialTimes=[trialTimes,t];
%Update the clock
time=toc;
end;
...
This code works fine but when i run it I seem to only get roughly 500 samples.
I use and Eyelink 2. Should it not give me more samples? Should i be using tic and toc to act as guards for the while loop?
Forgive if this question has been asked before.
Patrick