OpenSesame

Last modified by SOLO SA on 2025/05/08 15:58

Subpages

Cogsci.nl · GitHub

Introduction

OpenSesame is opensource, Python based software used for building and running behavioral experiments. It features an easy to use graphical user interface for basic task building purposes. More advanced tasks are created by using scripting in Python. OpenSesame can be used in combination with physiology and eye tracking.

Availability, Support and Advice

OpenSesame is freely available. At the FSW Leiden it is preinstalled on all lab computers (see the Software List to check which version and other software). For work computers it can be requested for at the ISSC Helpdesk. For unmanaged/personal computers, it can be downloaded here

SOLO provides full support for OpenSesame and recommends its usage to anyone who has some experience with Python, or is willing to learn. For highly timing critical tasks, E-Prime is recommended.

OpenSesame versions at FSW Leiden

On July 1st 2024 the system installation was updated on the lab computers at FSW Leiden (PdlC and Sylvius) from OpenSesame 3 to OpenSesame 4. This system installation can be reached by opening OpenSesame through the Windows Start menu or by double-clicking on a .osexp file.

Next to the system installation, OpenSesame 3 and OpenSesame 4 will also be available through a Conda environment. On FSW lab PCs, one of the following applies:

  • The lab PC has the OpenSesame 3 – Tobii and Opensesame 4 – Tobii shortcuts on the Desktop.
  • The lab PC does not have the abovementioned shortcuts. You can install OpenSesame in a Conda environment yourself by following the instructions here: solo-fsw/opensesame-tobii-env.

It is important to know that when opening your task by double-clicking on the task (.osexp file), your task will always open with the OpenSesame 4 system installation!

More details about the versions installed on the lab pc's (from July 1st 2024):

  • The system installation of OpenSesame 4 is opened when double-clicking on an .osexp file or by opening OpenSesame through the Windows Start menu. This version does not have the markers plugin preinstalled, but you can download it yourself (see for more info: solo-fsw/opensesame4_plugin_markers: OpenSesame 4 plugin for sending markers with Leiden Univ devices (github.com)). Tobii eye tracking does not work with this version. This version is recommended when OpenSesame 4 can be used and Tobii eye tracking is not required.
  • The OpenSesame 4 Conda installation is opened by using the OpenSesame 4 – Tobii shortcut on the Desktop (if available, if not, you can install OpenSesame 4 in a Conda environment yourself, see solo-fsw/opensesame-tobii-env, and follow the instructions there to start OpenSesame). Your task (.osexp file) can then be opened  by going to File > Open. This version of OpenSesame comes preinstalled with the markers_os4 plugin and Tobii eye tracking. This version is recommended when OpenSesame 4 with Tobii eye tracking is required.
  • The OpenSesame 3 Conda installation is opened by using the OpenSesame 3 – Tobii shortcut on the Desktop (if available, if not, you can install OpenSesame 3 in a Conda environment yourself, see solo-fsw/opensesame-tobii-env, and follow the instructions there to start OpenSesame). Your task (.osexp file) can then be opened  by going to File > Open. This version of OpenSesame comes preinstalled with the markers_os3 plugin and Tobii eye tracking. This version is recommended when OpenSesame 3 must be used (with or without Tobii eye tracking).

Important notes on OpenSesame 3 and 4

  • OpenSesame 4 is not fully backwards compatible, this means that tasks created in OpenSesame 3 will likely not run without adjustments in OpenSesame 4. Similarly, tasks created in OpenSesame 4 do not run in OpenSesame 3. See for changes that were made the release notes of OpenSesame 4.
  • When you want to make use of the preinstalled OpenSesame version on the lab computers, make sure to build your task in OpenSesame 4.
  • When you want to use OpenSesame 3 (with or without Tobii) or OpenSesame 4 with Tobii on a lab computer, use the OpenSesame 3 - Tobii or OpenSesame 4 - Tobii shortcut on the Desktop (if available, if not, see solo-fsw/opensesame-tobii-env to install it yourself). If you want to recreate these virtual environments on your work laptop for task development, this can be done with Anaconda (see solo-fsw/opensesame-tobii-env).
  • The information displayed on the OpenSesame website (e.g. manuals, tutorials, documentation), will show the information relating to version 4 by default. This information sometimes differs from OpenSesame 3 in important ways. Therefore, always make sure you select the right version of the website to display (in the top menu-bar to the right of the "Support" button).
  • For experiments that you plan to run (solely) online, we recommend using OpenSesame 4 on your own laptop/pc, as it also comes with a new version of OSWeb that has some nice new features

OpenSesame on a Mac

Although SOLO does not support Mac, here is some info on installing OpenSesame on a Mac.

  • Go to the OpenSesame download page and follow the instructions.
  • Because an ICCS supported/maintained Mac does not seem to allow one to write to the Applications folder; copy/drag the OpenSesame application to your Desktop (for instance).
  • Control-click the OpenSesame application icon, then choose Open from the shortcut menu.
  • Click Open again and have some patience.

Online & OSWeb

OSWeb is an extension of OpenSesame, which allows for Javascript version of OpenSesame experiments to be run online (e.g. on JATOS or Pavlovia). For information about OSWeb, see our dedicated OSWeb page.

Tobii

For information on using OpenSesame with Tobii eyetrackers, see here.

Markers

For more information on sending markers in OpenSesame, see here.

Touchscreen

OpenSesame supports the use of a touch screen. To do this it is recommended to use Expyriment or PsychoPy as a backend. To use PsychoPy effectively, the experiment will involve a bit of coding, as the touch screen works well by updating the mouse position and checking if it is in the right location rather than responding to a single tap. PsychoPy requires two taps to register a single click, which should not be the case but it seems to be an artifact of the PsychoPy implementation. A single tap is registered as a hover in PsychoPy. 

Example implementation for PsychoPy:

1746712359669-629.png

The ‘touch’ variable is a Mouse object, which is built into OpenSesame, and initialized in the ‘Prepare’ tab of the inline python object. The margin is decided by the image width (which you will need to declare yourself). The margin is used to ensure that the area of the drawn image (in this case, a square and a circle) will respond to touch. NOTE: This implementation will also work if you want the participants to simply hover over the area of interest.

For expyriment it seems you can simply create a regular experiment. It is recommended to read the documentation to decide which backend fits your experiment best. We did encounter some errors (ExperimentProcessDied), which is usually solved by switching backends.

Resources

  • The OpenSesame website provides tutorials and manuals
  • Sebastiaan Mathôt made several Youtube video's about OpenSesame and Python, which can be found here

FAQ

DateTopicQuestionAnswer
2025-04-25Task running in Windowed modeThe task runs in windowed mode, while I am running Fullscreen and am not running a Quickrun.Make sure your Display is set to 100% in Windows.