# Eyelink calibration on two screens?

**URL:** <https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335>\
**Category:** Programming Help\
**Created:** [April 5, 2022, 7:26am UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335 "2022-04-05T07:26:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jeff](https://psychtoolbox.discourse.group/u/jeff)\
**Post date:** [April 5, 2022, 7:26am UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335/1 "2022-04-05T07:26:32Z")

</div>

Hi, I’m using PTB 3.0.11 on a Mac.

I’m using a stereostopic display like the one in the diagram (if it uploaded correctly) to display binocular rivalry stimuli with eye-tracking.

 ![Setup-for-dichoptic-stimulation-and-eye-position-recording-Observers-are-immobilized-by](https://global.discourse-cdn.com/free1/uploads/psychtoolbox/original/1X/6c627b9dfb212e4a86740221f8d805dc83ac9fe7.jpeg)

I was wondering how I should approach calibrating my eye-tracker. By default, the calibration screen appears only on one monitor or the other. The first issue is that because of the size of the mirrors, each monitor is not in full view of the participant, so some of the dots are not visible. The second is that because the monitors are viewed through a mirror, the eye-tracker expects you to look to the right when the calibration target is in the left part of your field of view.

Is there a way to customize the Eyelink’s calibration in the following ways:  
Present calibration display on two screens at once?  
Reduce the size of the calibration display, bringing the calibration targets closer to the center?  
Change the location of individual calibration targets, e.g. switching the left-right correspondence?

Thanks so much  
Jeff

---

<div class="post-metadata">

**Author:** ![Ian-Max-Andolina](https://yyz2.discourse-cdn.com/free1/user_avatar/psychtoolbox.discourse.group/ian-max-andolina/32/4_2.png) [@Ian-Max-Andolina](https://psychtoolbox.discourse.group/u/Ian-Max-Andolina)\
**Post date:** [April 6, 2022, 9:11am UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335/2 "2022-04-06T09:11:14Z")

</div>

1. You are responsible for opening the PTB Screen, and this is used by the eyelink routines, so for example I use high-bitdepth Display++ modes, open the screen and this window pointer is passed to the eyelink to use using `EyelinkInitDefaults`. What screen mode or display setup (e.g. a display splitter) are you using?
2. There is a scaling option for both calibration and validation, `calibration_area_proportion` and `validation_area_proportion` which you pass a scale like `0.3 0.3` to bring the calibration/validation points closer to the center; see [opticka/eyelinkManager.m at master · iandol/opticka · GitHub](https://github.com/iandol/opticka/blob/master/communication/eyelinkManager.m#L459) for an example of how to use it during eyelink setup. The default is IIRC `0.8 0.8` — but be aware the calibration is then only accurate for that portion of the screen…
3. There is a way to specify position, but how this would switch for binocular/monocular calibration is unclear to me; probably best to ask on the eyelink forums (they normally respond quickly)…

---

<div class="post-metadata">

**Author:** ![jeff](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jeff](https://psychtoolbox.discourse.group/u/jeff)\
**Post date:** [April 6, 2022, 4:16pm UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335/3 "2022-04-06T16:16:27Z")

</div>

Thank you for the reply!  
I think I figured out how to do 2 and 3. This page [SR Support Forum](https://www.sr-support.com/thread-313.html) was helpful.  
For 1, I don’t know what you mean by screen mode or display setup. I have two monitors connected to one computer, and my program opens separate windows on each monitor (with the OpenWindow function). I can choose one screen or the other for calibration by sending a different window pointer to EyelinkInitDefaults.window . Is there a way to have one window pointer which corresponds to both monitors?

---

<div class="post-metadata">

**Author:** ![Ian-Max-Andolina](https://yyz2.discourse-cdn.com/free1/user_avatar/psychtoolbox.discourse.group/ian-max-andolina/32/4_2.png) [@Ian-Max-Andolina](https://psychtoolbox.discourse.group/u/Ian-Max-Andolina)\
**Post date:** [April 7, 2022, 8:33am UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335/4 "2022-04-07T08:33:07Z")

</div>

Well, there are several ways to connect two displays to a computer. You can treat them as separate displays (your current solution), but then you are responsible for managing them separately and there is more burden on the GPU. OS or driver dependant, you could open a single extended display 2X the width of both monitors and then position stimuli in this unified co-ordinate system (probably easiest from a PTB perspective). Finally hardware like display splitters can allow two displays-from-one display output and may allow for something like an extended display (i.e. not a mirror mode).

If you read through [Psychtoolbox-3 - PsychImaging](http://psychtoolbox.org/docs/PsychImaging) you will see there is a potential software solution: `PsychImaging('AddTask', 'General', 'DualWindowStereo'` — some of the details are in the demo [mode 10] [Psychtoolbox-3 - ImagingStereoDemo](http://psychtoolbox.org/docs/ImagingStereoDemo) — this sounds like it could work for your setup to provide a more optimal solution but I’ve never used it and it would probably require a lot of testing **or getting help from Mario directly**.

Not so relevant to your setup, but PTB also has a whole bunch of stereoscopic display modes (see demo above), probably not relevant for your particular setup as they are designed to work via single displays (using spatial/temporal/chromatic interleaving), but they may be useful for prototyping when out of the lab etc.

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [April 7, 2022, 5:26pm UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335/5 "2022-04-07T17:26:05Z")

</div>

All what Ian said.

Additionally: Depending on you OS, one of the stereomodes demo’ed in ImagingStereoDemo would be a proper choice for a stereoscopic/binocular stimulation setup. I don’t know if/how Eyelink toolbox deals with them wrt. calibration though.  
E.g., on Linux/X11 you’d use stereomode 4 or 5 with two displays connected to the same X-Screen, or two displays connected via display-splitter to one video output. On Windows it would be either mode 4 or 5 for display-splitter, or stereomode 10 or 4/5, for two separate outputs, depending on Windows version and the specific display driver bugs your setup may expose on windows. On Apples trainwreck, stereomode 10 would be the choice for separate outputs. I assume one might also be able to make some use of the display mirroring PsychImaging tasks if the Eyelink software would not support proper dual-display calibration.

In general, you should not roll your own setup with separate onscreen windows, unless you need completely independent control over presentation timing etc., as PTB’s builtin stereo support integrates with other PTB goodies and also at least tries to get timing synced up across displays if possible.

-mario

---

<div class="post-metadata">

**Author:** ![jeff](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jeff](https://psychtoolbox.discourse.group/u/jeff)\
**Post date:** [April 7, 2022, 9:16pm UTC](https://psychtoolbox.discourse.group/t/eyelink-calibration-on-two-screens/4335/6 "2022-04-07T21:16:37Z")

</div>

Thanks so much for the quick reply!  
My program now uses MirrorDisplayTo2ndOutputHead for the calibration step and stereo mode 10 for stimulus presentation.
