# How to use EyeLink on binocular mode

**URL:** <https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337>\
**Category:** Support\
**Created:** [April 27, 2018, 5:47pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337 "2018-04-27T17:47:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 27, 2018, 5:47pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/1 "2018-04-27T17:47:01Z")

</div>

Hi Chris,

We are trying to do some experiments using fixation with either eye or both open. EyeLink gives us the ability to record both eyes at the same time. I was trying to setup an experiment in which the signals from the left eye or the right eye is being used. But it becoming more challenging than expected. I ended up trying to define 2 sets of calibrations and protocols, but not working. I’ve attached the script where I was trying this. Do you think you could give us some suggestions?

Thank you in advance!  
mariana

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 27, 2018, 6:39pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/2 "2018-04-27T18:39:24Z")

</div>

Hi Mariana,

Can you be more specific about how it’s “not working”?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 27, 2018, 7:29pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/3 "2018-04-27T19:29:27Z")

</div>

Hi Chris,

Thank you for your prompt reply (I’ve now included Julia on the loop as she  
is also interested part).

I can use one of the eye signals (being left of right) if I start with the  
appropriate settings (right eye on EyeLink selected, calibration for right  
eye, grating experiment for right eye). But if I stop the recoding, set all  
up to record with the left nothing is displayed, I don’t think it is giving  
me appropriate eye signals (nothing on the display).

Thanks,  
mariana

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 27, 2018, 8:01pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/4 "2018-04-27T20:01:37Z")

</div>

Hi Mariana,

Thanks for the additional details.

> But if I stop the recoding, set all up to record with the left nothing is displayed, I don’t think it is giving me appropriate eye signals (nothing on the display).

A few questions:

- When a left-eye protocol is running, do you see the values of `eye_lh_raw` and `eye_lv_raw` changing in MWClient’s variables window? If yes, then you are receiving data from the EyeLink.

- Have you performed a calibration for the left eye?

- What do you mean by “stop the recording”? Are you stopping your MWorks experiment, or are you manually stopping tracking on the EyeLink PC? If you’re stopping something on the EyeLink, then that might break MWorks’ connection to the device. You should just let MWorks start and stop eye tracking.

- Have you tried leaving both left and right eye tracking enabled at all times? If you did, then you wouldn’t have to change any settings on the EyeLink when you switched from the left to the right eye.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 27, 2018, 9:54pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/5 "2018-04-27T21:54:06Z")

</div>

Hi Chris,

Apologies. I didn’t explain it well (again).

> When a left-eye protocol is running, do you see the values of eye\_lh\_raw and eye\_lv\_raw changing in MWClient’s variables window? If yes, then you are receiving data from the EyeLink.

YES, I get those signals, I also have numbers for eye\_v\_L and eye\_h\_L

> Have you performed a calibration for the left eye?

Maybe this is my problem. I’m using the mouse simulation from EyeLink, which I never have a problem with (I have a set of parameters that bring me close to a solution in general). I have a calibration done for the left eye (for example) from other protocol, but when I load those params to start a new calibration it is does not give anything reasonable…

> What do you mean by “stop the recording”? Are you stopping your MWorks experiment, or are you manually stopping tracking on the EyeLink PC? If you’re stopping something on the EyeLink, then that might break MWorks’ connection to the device. You should just let MWorks start and stop eye tracking.

Sorry, when I press your button that looks like a ‘stop sign’, on MWClient to load a new protocol.

> Have you tried leaving both left and right eye tracking enabled at all times? If you did, then you wouldn’t have to change any settings on the EyeLink when you switched from the left to the right eye.

So, in any other file (that does not have the use of the 2 eyes) it works, here still having the same issues at least in what relates to calibration.

Thank you once more!

mariana

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 30, 2018, 2:37pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/6 "2018-04-30T14:37:15Z")

</div>

Hi Mariana,

OK, it sounds like the problem is that you don’t have appropriate calibration parameters for the left eye.

> I have a calibration done for the left eye (for example) from other protocol, but when I load those params to start a new calibration it is does not give anything reasonable…

You have to be a little careful here. Each calibrator stores its parameters in a variable named `#privateCalibrator<tag>`, where `<tag>` is the tag of the calibrator in your experiment. The experiment you shared will have two of these:

- `#privateCalibratoreyeCalibrator1` (left eye)
- `#privateCalibratoreyeCalibrator2` (right eye)

When you save or restore calibrator parameters by saving or loading a variable set, the parameters are associated with these variable names.

It seems like the right-eye calibration should be a good starting point for the left eye, so maybe you should try copying those parameters. Here’s a relatively easy way to do this:

1. Load your experiment.
2. Load a variable set containing a good calibration for the right eye.
3. In MWClient’s variables window, find the entry for `#privateCalibratoreyeCalibrator2`. Double click its value to select it, then copy it (Command-C).
4. Still in the variables window, find the entry for `#privateCalibratoreyeCalibrator1`. Double click its value to select it, then paste (Command-V) and press Return.
5. Save the variable set (either overwriting the current one or creating a new one).
6. Close the experiment.
7. Reload the experiment.
8. Load the variable set you created in step 5.

(Steps 6-8 probably aren’t necessary, but they can’t hurt.)

Can you try that and see if it at least gets the left-eye coordinates in the ballpark? If it does, then you may want to do a new left-eye calibration to fine tune the parameters.

A couple more comments:

- Since you’re doing the eye calibration within MWorks, you should probably be using the EyeLink device’s `pupil_*` parameters instead of the `eye_*` ones. (See [this comment](https://mworks.discourse.group/discussions/questions/788#comment_44464027) for more information.) Note, however, that if you do make this change, any previous MWorks-side calibration parameters will no longer be valid.

- The [linear eye calibrator](https://mworks.github.io/documentation/latest/components/linear_eye_calibrator.html) may be a better choice than the [standard one](https://mworks.github.io/documentation/latest/components/eye_calibrator.html). (At least, it has been for [other EyeLink users](https://mworks.discourse.group/discussions/problems/301)).

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [May 1, 2018, 5:52pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/7 "2018-05-01T17:52:36Z")

</div>

Hi Chris,

Thank you very much for your input and insight into this problem. I still  
have a few questions.

Thank you for the note regarding: “Since you’re doing the eye calibration  
within MWorks, you should probably be using the EyeLink device’s  
pupil\_\* parameters  
instead of the eye\_\* ones. (See this comment  
[http://discussions/questions/788#comment\_44464027](http://discussions/questions/788#comment_44464027) for more information.)  
Note, however, that if you do make this change, any previous MWorks-side  
calibration parameters will no longer be valid.”- I’m doing this now.

Also, I’m now using a linear calibrator as suggested (I much prefer it, I  
had not noticed it existed).

If I use a script that has only 1 calibrator (also the reason I was trying  
to use two calibrators was because I could not use an if condition on the  
calibrator definition), the independently if I have incoming data from 1 or  
2 eyes the range of values produced is the same for let’s say the right  
eye. Now, it I switch to the task with 2 calibrators (still using just the  
right eye, let’s say) the range of values that I see displayed changed  
(independently of being monocular or binocular). And this change is on the  
‘raw’ values, before applying the ‘eyeCalibrator’. Any suggestion of why  
I’m getting this behavior? (From Eyelink, I’m only setting it to collect  
data from 1 of the eyes.)

Thank you!  
mariana

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [May 1, 2018, 7:39pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/8 "2018-05-01T19:39:26Z")

</div>

Hi Mariana,

> Now, it I switch to the task with 2 calibrators (still using just the right eye, let’s say) the range of values that I see displayed changed (independently of being monocular or binocular). And this change is on the ‘raw’ values, before applying the ‘eyeCalibrator’. Any suggestion of why I’m getting this behavior?

If the raw values change, then it seems like the EyeLink must be configured differently. Maybe you’re reading eye\_rx/eye\_ry in one experiment, and some other parameters in the other?

If you send me the XML for the experiment with one calibrator, I can take a look and see if I spot anything.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 9:47pm UTC](https://mworks.discourse.group/t/how-to-use-eyelink-on-binocular-mode/337/9 "2022-07-19T21:47:25Z")

</div>


