Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eyeTracker improvements #68

Open
1 of 2 tasks
marcobarilari opened this issue Aug 14, 2020 · 2 comments
Open
1 of 2 tasks

eyeTracker improvements #68

marcobarilari opened this issue Aug 14, 2020 · 2 comments

Comments

@marcobarilari
Copy link
Collaborator

marcobarilari commented Aug 14, 2020

  • Refactor eyetracking script.
  • Clean up should involve closing the eyeTracker
@marcobarilari marcobarilari added the priority 1 High priority label Aug 14, 2020
@marcobarilari marcobarilari self-assigned this Aug 14, 2020
@Remi-Gau
Copy link
Contributor

Remi-Gau commented Aug 15, 2020

Other to do

  • make the miss_hit linter happy by avoiding lines of more than 100 characters

@marcobarilari
Copy link
Collaborator Author

marcobarilari commented Aug 15, 2020

Optional useful functions to implement in the future:

  • Set level of verbosity for error/warning/status messages. ‘level’ optional, new level of verbosity. ‘oldlevel’ is the old level of verbosity. The following levels are supported: 0 = Shut up. 1 = Print errors, 2 = Print also warnings, 3 = Print also some info, 4 = Print more useful info (default), >5 = Be very verbose (mostly for debugging the driver itself).

oldlevel = Eyelink(‘Verbosity’ [,level]);

  • Sanity check that ET is set a specific eye that we want, we might forget to check :)
eye_used = Eyelink('EyeAvailable');
switch eye_used
    case el.BINOCULAR
        error('tracker indicates binocular')
    case el.LEFT_EYE
        error('tracker indicates left eye')
    case el.RIGHT_EYE
        disp('tracker indicates right eye')
    case -1
        error('eyeavailable returned -1')
    otherwise
        eye_used
        error('unexpected result from eyeavailable')
end
  • Tag the ET data output

Eyelink('command', 'add_file_preamble_text', 'Recorded by EyelinkToolbox demo-experiment');

  • Set parser (conservative saccade thresholds)
Eyelink('command', 'saccade_velocity_threshold = 35');
Eyelink('command', 'saccade_acceleration_threshold = 9500');
  • Drift correction, do a final check of calibration using drift correction. You have to hit ESC before return.
EyelinkDoDriftCorrection(el);
success = EyelinkDoDriftCorrection(el);
if success~=1
    Eyelink('shutdown');
    cleanUp()
    return;
end

or use [status = ] Eyelink(‘DriftCorrStart’, x, y [,dtype=0][, dodraw=1][, allow_setup=0]); e.g.:

% Perform drift correction: The special flags 1,1,1 request interactive correction with video display:  
result = Eyelink('DriftCorrStart',30,30,1,1,1);
  • Tag the recording, in the past caused delays during the presentation so I avoided to use it

Eyelink('message', 'Trial_1');

  • EyelinkGazeContingentDemo.m is a nice example on how reading online data from ET and change your stimulaiton accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants