Actions

Eye tracker

From SpinozaWiki

3T setup

For the 3T we have the Cambridge Research Systems LiveTrack monocular system available

Powering up and starting LiveTrack AV (3T)

Replace the standard headcoil mirror with the white mount from the cabinet in the MR room. Tighten the two screws a bit so the mount is connected to the top half of the headcoil, but still allow for sliding movement for fine adjustments. Be careful when disconnecting and connecting the top half, make sure the camera/mirror mount doesn't fall of. Connect the cable to the one coming from the front penetration panel. When plugging it in, make sure ther two red dots are aligned on each side of the connector. It should slide in smoothly and click, don't force it.
Make sure both monitors are connected to the 3t-stim computer and enabled. If one is not enabled (typically the left one), rightclick in the desktop and open NVidia control panel. Find the tab that shows all connected monitors and enable all three. Monitor 1 (the left display) should be set to primary, monitor two (right) and three (BOLD screen) should be clones and secondary. This arrangement is essential to being able to work with the system, other arrangements will not work.
Start the LiveTrack AV software (link is on the desktop) on put it on the secondary screen so it is also visible on the cloned BOLD screen in side the MR room. You should see input from the camera

Participant preparation and placement

Prepare the participant by removing mascara and replacing glasses for MRI glasses. Soft contact lenses can be worn during an eye tracking experiment, but rigid contact lenses may interfere with the corneal reflection (CR) and thus need to be switched for MRI glasses.

When the participant is placed inside the scanner, make sure that the eyes and eyebrows of the participant are not covered by the head coil, as the head coil may cast a shadow over the eyes and that interferes with the experiment. When you slide the participant in the scanner make sure you align on the eyebrows (to make sure every participant is more or less in the same position).

Focus and adjust

After the participant is placed in the bore and the camera is setup correctly, look at the BOLD screen to see if the participant’s eyes are in the centre of the camera FOV. If this is not the case, adjust the camera. Ask the participants if he or she can see all corners of the screen. Under most circumstances, the LiveTrackAV camera and illuminator should be more or less set up correctly and you should see the participant’s eye in the camera's FOV. If the eye is not (properly) visible or illuminated, gently move the camera to get the eye in the middel of the camera's FOV. Carefully adjust the focus of the camera so that the size of the CR becomes as small as possible and the aye and eyelashes are in focus. If you are unsure how to do this, please contact the staff of the Spinoza Centre.

Calibrate

Calibrating direction of gaze coordinates is easy and takes less than a minute with the LiveTrack Viewer software utility. The geometry of your setup is inferred by having the participant fixate on a sequence of nine dots presented at known locations on the stimulus display. Just input the viewing distance between the participant's eyes and the stimulus display, then instruct them to locate the targets as they appear one at a time. When the eye rotations to all nine locations have been measured, the utility calculates a calibration matrix which determines the relationship between eye rotation in camera coordinate space and screen position in degrees for all subsequent measurements. The matrix is uploaded to the LiveTrack AV signal processing unit and automatically applied to the tracking data that is generated by the unit. After the initial calibration has been performed, a very simple drift correction can be performed between each trial using a single, one-dot calibration that takes just a few seconds to complete.
Must I use the LiveTrack Viewer for calibration? Absolutely not! You are free to implement your own custom calibration. We supply template scripts below that use Psychtoolbox-3 and/or MATLAB to explain how to create a custom calibration.

Capture raw video feed

It is possible to capture the raw analog video feed (unprocessed by the LiveTrack AV hardware). A USB video capture device sends the analog (NTSC) video signal to the 3t-physio computer (in the back corner furthest from the scanner). The video can be recorded using honestech TVR 2.5 (shortcut on the desktop). As of yet, no solution is available to record the video feed along with the scanner triggers. Matlab seems an obvious candidate to implement this in.

Shutting down

Quit the LiveTrack AV software on the stimulus computer. Disconnect the LiveTrack AV camera, unscrew the mount from the headcoil and place it back in the cabinet. Put the lens cap back on the camera.

User guide, code library and demo Matlab/Psychtoolbox scripts

CRS LiveTrack User Guide

CRS LiveTrack Library Guide

CRS LiveTrack Matlab/Psychtoolbox demo scripts

Matlab example script from Joris Coppens (NIN)

7T setup

For the 7T we have the SR Research Eyelink 1000 Plus system available. It has been mounted onto a hot-mirror system, which greatly improves the fidelity and stability of the recordings.

Components

close-up of eye tracker mirror setup
eye tracker mirror setup overview
  1. Cradle: to be placed on bed rail
  2. Eye-tracking system: stand with eye-tracker, illuminator, and hotmirror. To be placed on the cradle.
  3. Front-silvered mirror
  4. Battery + 2 power connection cables

Important:

  • Never touch the lens/eye-tracker!
  • Never touch the illuminator!
  • Never touch the glass/hotmirror!

These components are fragile, expensive, and touching them will degrade signal quality. When moving the eye-tracking system, only grab the black side bars that hold the hotmirror.

Placement

  • First, make sure the optic fiber-cable in the scanner bore (between the rails) is free to move. This will be connected to the eye-tracker.
  • Then, place the cradle on the bed rails, just behind the white plastic block (the one underneath the transmit and receiver amplifiers). The two red rods on the cradle should be parallel to the bore.
  • Place the eye-track system. Do this from the right side of the bed (when facing the bore). The eye-tracking system is placed pretty deep into the bore (i.e., on top of the cradle), so if you’re not tall enough to reach over the amplifiers, use the plastic stairs.
    • hold the stand at the black side bars that fix the mirror (!!). Make sure not to touch the hotmirror, illuminator, or lens/tracker itself!
    • tilt the system towards you (90º), so that the bottom of the eye-tracking system faces the BOLD-screen, and the hotmirror is on your side / the bed-side. [we should make a picture of this]. Carefully lead the system over the amplifiers towards the cradle. (Watch out! Make sure the glass/hotmirror does not touch the bore!!).
  • Note that tilting the system towards you is the only way you can place it in the bore without breaking the hotmirror, so do not try any other way.
  • Take the battery into the scanner room, and connect the two battery cables. If the battery is not fully charged it probably will not last a full hour. If it is less than 2-3 hours, the illuminator will perform flickery. This results in large short-lasting spikes in the traces. Make sure to use the upper left two plugs. There are two pins in each power cable, which will break if you don’t rotate the cables properly/apply force.

Connect the wires:

  • The connector between the eye-tracker for data transfer (use the fibre optic cable in the bore). Note that there is an interface/connector between the fibre-cables of the eye-tracker and the scanner. Always leave this connector on the eye-tracker cable! It is slightly ferromagnetic, so should not be left in the bore.
  • Two power cables: one for the illuminator, one for the eye-tracker, in one sheath. Place the battery at the basis of the scanner. Leave the cables on the right side of the bed.
  • Get some Gaffer-tape to put the cables together and stick them on the cables of the amplifiers, to make sure it doesn’t get twisted with other cables or the rails when moving the bed. The cables should have a little leeway between the eye-tracking system and the cables of the amplifiers, but not so much that they could get stuck somewhere when moving the bed.
  • Place the coil mirror. Don’t touch the glasses!
    • unscrew the original mirror from the small plastic mount. Place the mount on the advanced mirror using the screws.
    • make sure there is enough space on top of the receive coil: move the outer transmit coil all the way to the back. The transmit coil can sometimes get stuck. If this is the case, the black cables underneath the coil are probably jammed in a hole; you can wiggle these cables a bit to free them and move the transmit coil fully back. Make sure the plastic screw is free, so that there is enough space to place the mirror.
    • place the mirror mount over the screw, with the mirror side inside (duh). Tighten the screw.

Powering up and starting EyeLink (7T)

Find the top battery, check whether the battery is sufficiently charged (press test button). If the battery is not fully charged it will probably not last a full hour. Bring the battery into the MR system room. Plug in the two power cables and turn the battery on. The EyeLink software will give an error message during start-up if the battery is not connected and turned on. After placing the battery, remove the lens cap from the EyeLink camera. Don’t forget to turn on the BOLD screen.

Turn on the EyeLink monitor and select DVI as input (by default it is on Display Port, which is for the stimulus computer). Then turn on the EyeLink computer and choose EyeLink mode. You should now see the EyeLink graphical user interface (GUI).

Also turn on the stimulus computer and start up the Track software from the desktop shortcut. Keep the standard EDF filename (SDEMO), and hit enter twice so that the camera image is visible on the BOLD screen. Make sure that you are viewing the overview (zoomed-out) image by pressing the arrow-keys on the stimulus computer.

Important: the EyeLink setup does not return to defaults after shutting down the EyeLink. Make sure that all settings are correct before starting your experiment. For some default settings, see EyeLink Settings

Participant preparation and placement

Prepare the participant by removing mascara and replacing glasses for MRI glasses. Soft contact lenses can be worn during an eye tracking experiment, but rigid contact lenses may interfere with the corneal reflection (CR) and thus need to be switched for MRI glasses.

When the participant is placed inside the scanner, make sure that the eyes and eyebrows of the participant are not covered by the head coil, as the head coil may cast a shadow over the eyes and that interferes with the experiment. When you slide the participant in the scanner make sure you align on the eyebrows (to make sure every participant is more or less in the same position). Don’t forget to exchange the regular mirror (grey backside) for the first surface mirror (mirroring backside). Important: do not touch the first surface mirror with your bare hands, as this irreversibly damages the mirror.

After the participant is placed in the bore and the camera is setup correctly, look past the camera to see if the participant’s eyes are in the centre of the mirror. If this is not the case, adjust the mirror. Ask the participants if he or she can see all corners of the screen. Under normal circumstances, the EyeLink camera and illuminator have already been set up correctly and you should see the participant’s eye in approximately the centre of the overview image, after which you can move on to step 3. If the eye is not (properly) visible or illuminated, first check whether the feet of the BOLD screen tripod are on the marked locations. If they are and the eye is still not in the image, please contact the staff of the Spinoza Centre so that they may realign the EyeLink camera and illuminator.

Focus and adjust

Make sure that the ‘threshold coloring’ option is turned on. Click on the pupil on the EyeLink computer and switch to the zoomed-in view on the stimulus computer by pressing the arrow-keys. Carefully adjust the focus of the camera so that the size of the CR becomes as small as possible. This means that the pupil is in focus. Press A (or auto threshold) on the EyeLink computer to adjust the thresholds, and inspect the values under the image. The entire pupil should be coloured dark blue, and the pupil value (P) should be above 70. The CR value should be as small as possible. If too much light enters the pupil, part of the pupil may not be dark blue anymore, and you will see question marks behind the P value. If this is the case, adjust the lens of the illuminator slightly (see 7.2). A red P or CR value means the software cannot determine the position of the pupil and/or CR, which may often be solved by adjusting the position of the mirror. Another cause may be that the participant is wearing mascara. If neither are the case, the illuminator alignment needs to be adjusted. If you are unsure how to do this, please contact the staff of the Spinoza Centre.

Calibrate and validate

Check your sample rate
At the MRI scanner, lowering the sample rate to less than 2K can help with the stability of the eyetracker.

Set the desired calibration and validation settings. It is recommended to perform calibration in randomized order. Instruct the participant to focus on the centre of the calibration points and not to change their gaze until the calibration point disappears. Note that even when you’re not doing an eye tracking experiment, but are only monitoring pupil size, it is still recommended to do at least a three-point calibration.

Calibrate

Start calibration by pressing the C button or clicking the calibrate button. The first calibration point needs to be manually accepted by the researcher by pressing the spacebar. On the screen you will see a small green triangle, which moves if the participant moves their eyes. Wait for the triangle to be completely still and then press the spacebar to start calibration. Whenever the participants gaze reaches a calibration point, a green cross will appear on the EyeLink image. For a 9-point calibration you want these crosses to form a perfect grid. 9-point calibration is standard, but more difficult subjects can be given a 6-point or 3-point calibration. Turn off ‘Manual Accept Fixation’ if you want the fixation point to move automatically once the position is registered. Either accept the calibration by pressing enter or clicking accept, or move on to validation.

Calibration improves when:
1. Tell the subjects to look at the middle of the cross in the fixation square
2. Tell the subjects not move your eyes until the fixation square moves.

Validate

After calibrating, start validation by pressing V or clicking the validate button. The first validation point needs to be manually accepted by the researcher by pressing the spacebar. Every time the participant’s gaze reaches a validation point, a value (degrees of deviation) appears on screen. You want these values to all be below 1; if this is not the case, recalibrate.

NOTE:

EDF file names cannot exceed 8 characters,
Which means that your SUBJECT NAME cannot exceed 8 characters!
If it does, you will get an error when the EDF file is transferred to the Presentation computer


Shutting down

Quit the Track software on the stimulus computer by repeatedly hitting the escape button. Quit the EyeLink software by clicking ‘Exit EyeLink’ which returns you to MS-DOS, after which you can turn of the EyeLink computer by pressing the power button.

Remove the eye-tracker

  • remove the gaffer tape.
  • disconnect the cables (leave the connector on the eye-tracker cable; so take it out of the scanner room with you)
  • remove the cables and battery from the scanner room. Put the battery on the charger for about 1-2 hours. Make sure to leave it fully charged for the next user. Do not leave it on the charger longer than necessary (do not leave it overnight!), because this will hurt the performance of the battery. If performance goes down, ask Joris from the NIN to replace the accu, [email protected].
  • now carefully take the eye-tracking system out, the same way it went in! (so, grab it by the side-bars, tilt it towards you and lead it over the amplifiers, without touching the top of the bore!!)
  • get the cradle out of the bore.
  • replace the coil-mirror
  • put the lens cap back on the EyeLink camera

EyeLink Settings

For a full overview of possible EyeLink settings, please refer to the EyeLink 1000 manual, which may be found on the leftmost red shelve. The settings discussed here are settings that should generally not be adjusted.

Camera setup

  • Sample rate should only exceed 250 Hz for microsaccade experiments; increasing the sample rate may increase noise;
  • Eye should be set to left;
  • Image Display: ellipse;
  • Crosshairs: on;
  • Threshold coloring: on.

Set Options

  • Pacing interval is the interval between calibration stimuli. This should be at 1000 (ms). Randomize order and repeat first point should also be turned on;
  • Configuration should be set to Long Range Mount.


Realigning the EyeLink camera and illuminator

Alignment of the EyeLink camera and illuminator should only be performed by experienced EyeLink user or the Spinoza Centre staff. The hot-mirror setup should make it unnecessary to do anything other than refocusing of the camera lens.

Further adjustments to camera or illuminator should only be made under guidance of an experienced user of the eyetracking system. In case of doubt, contact (Tomas Knapen) or a member of the Knapen lab.

Hotkeys

  • ENTER - show eye on monitor
  • Left/Right – switch between zoomed in/zoomed out image
  • C - calibration
  • SPACE - start calibration
  • ENTER - accept calibration
  • V - validation
  • SPACE - start validation
  • ENTER - accept validation
  • Within Presentation (stimulus computer):
  • F4 ->either back to eye screen, or start of experiment
  • ENTER -> accept drift check (when you see fixation point in center of screen)
  • F4 -> start experiment
  • D - Drift check (correct for eye movement on one central fixation point)
  • Enter - accept drift correction

Abbreviations

  • CR - Corneal Reflex
  • GUI - Graphical User Interface
  • P - Pupil value

Converting EDF files to ASC

The EDF files are not in a readable format. In order to use them, you must convert them to ASC. This must be done from the command line on a computer with EyeLink installed.

The code for this conversion is in the Examples folder of the EDF Access API folder.
C:\Program Files (x86)\SR Research\EyeLink\EDF_Access_API\Example

Start-> RUN -> CMD -> set CD to EDF Acces API folder (copy paste directory), which contains edf2asc.exe.

To get a list of all arguments for this function, just type edf2asc
edf2asc –s locationofedffile\filename.edf (-s gives all samples)
edf2asc –e locationofedffile\filename.edf (-e gives all events)
In between these two command lines make sure to rename the .asc file (eg. filename_s.asc for sample file and nameoffile_e.asc for event file) before converting the next one, otherwise the .asc file will be overwritten.

Easier option

The Knapen lab have created a python-based package which wraps the edf2asc utility and preprocesses gaze and pupil data, producing cleaned and parsed hdf5-based outputs. hedfpy

Programming in Presentation with EyeLink Scenario Files with EyeLink code

Check out the example file “track.sce” for an example of using Presentation scripts with EyeLink.

A copy of this code is in the PresLink user guide.

Most of the code can remain, but you must make sure to specify when you want to send a message to the eyetracker EDF file. For example, at the start and end of a trial.

tracker.send_message(“some string”);

Note: EDF file names cannot exceed 8 characters.