goxpyriment

module
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: GPL-3.0

README

goxpyriment

goxpyriment is a framework for building behavioral and psychological experiments (currently, as Desktop App).

Features

  1. Zero-dependency deployment. Your experiments compile to standalone executables. No Python, no conda, no Font issue, no DLL hell on lab computers.
  2. AI-friendly API. The consistent API is well suited to AI assisted coding: describe your paradigm in plain language to Claude, Gemini, or ChatGPT and the generated code is usually ready to run immediately.
  3. Rich stimuli. Beyond text and images and audio, present video, generate visual patterns (gratings, Gabor patches, clouds of dots,...), and run high-precision RSVP streams.
  4. Response recording. Collect responses from keyboard, mouse, and gamepads. Records vocal responses.
  5. Timing precision. The stimulus loop runs VSYNC-locked with GC pauses disabled, giving sub-millisecond frame jitter on typical hardware.
  6. Hardware synchronization. Send TTL triggers to synchronize with external devices (EEG, MEG, eye-trackers, fMRI) over parallel port, USB (DLP-IO8), or generic serial.

Remark: If you are looking for a simple experiment generator - with fixed stimulus presentation schedule, check out Gostim2 which does not require any coding.


Documentation

Document PDF
Presentation short paper
Getting Started Tutorials
Installation Install Go and build the examples
Creating Your Own Experiment Beginner guide: new project, embedding assets, sharing binaries
User Manual Core concepts explained in depth
Migration Guide Coming from Expyriment, PsychoPy, or Psychtoolbox?
API Reference Complete function and type reference
Gallery of Examples Ready-to-run experiments and demos
Timing-Tests Check the timing of your computer

Support:


Quick Start

  1. Install Go and build the bundled examples.
  2. Create your own experiment — a step-by-step beginner guide from an empty folder to a shareable executable.
  3. Getting Started walks through worked tutorials (trials, data logging, RSVP, reaction times).

Pre-built binaries (ready-to run apps) of many experiments are available for Windows, macOS, and Linux.


Background

Goexpy is written in Go and relies on the SDL3 library through to the go-sdl3 bindings.

The original inspiration was expyriment.org, a lightweight Python library for cognitive and neuroscientific experiments (Krause & Lindemann, 2014. Behavior Research Methods, 46(2), 416–428. https://doi.org/10.3758/s13428-013-0390-6).


License & citation

GNU GPL v3 — see LICENSE.

Please cite as:

Christophe Pallier (2026) chrplr/goxpyriment. Zenodo. https://doi.org/10.5281/zenodo.19200598

Christophe Pallier, 2026.


Directories

Path Synopsis
Package apparatus provides the low-level input/output subsystems for goxpyriment:
Package apparatus provides the low-level input/output subsystems for goxpyriment:
Package clock provides timing helpers: Wait, GetTime, and a Clock for measuring durations and sleeping until a target offset.
Package clock provides timing helpers: Wait, GetTime, and a Clock for measuring durations and sleeping until a target offset.
cmd
gen-gallery command
gen-gallery regenerates the example tables in docs/GalleryOfExamples.md from per-example meta.yaml files.
gen-gallery regenerates the example tables in docs/GalleryOfExamples.md from per-example meta.yaml files.
gen-readme command
gen-readme regenerates README.md (repo root) from docs/index.md.
gen-readme regenerates README.md (repo root) from docs/index.md.
get-display-info command
get-display-info queries every connected display via SDL3 and prints its properties: name, bounds, current mode, desktop mode, content scale, orientation, and the full list of available fullscreen resolutions.
get-display-info queries every connected display via SDL3 and prints its properties: name, bounds, current mode, desktop mode, content scale, orientation, and the full list of available fullscreen resolutions.
Package control manages the overall state and initialization of an experiment.
Package control manages the overall state and initialization of an experiment.
Package design provides experiment structure types (trials, blocks, factors) and randomization helpers for building experiment designs.
Package design provides experiment structure types (trials, blocks, factors) and randomization helpers for building experiment designs.
Package geometry provides point/distance and coordinate conversion helpers (Euclidean distance, Cartesian–polar conversion, degree–radian).
Package geometry provides point/distance and coordinate conversion helpers (Euclidean distance, Cartesian–polar conversion, degree–radian).
Package media provides multi-movie playback with shared master-clock synchronisation, look-ahead frame conditions, and post-vsync display events suitable for wiring to hardware triggers.
Package media provides multi-movie playback with shared master-clock synchronisation, look-ahead frame conditions, and post-vsync display events suitable for wiring to hardware triggers.
present
Package present provides PresentTimer backends that report hardware-verified vsync timestamps for an apparatus.Screen.
Package present provides PresentTimer backends that report hardware-verified vsync timestamps for an apparatus.Screen.
Package staircase implements adaptive psychophysical threshold estimation.
Package staircase implements adaptive psychophysical threshold estimation.
Package sysinfo collects and formats hardware and software information about the running system (machine type, OS, CPU, memory, GPU, audio).
Package sysinfo collects and formats hardware and software information about the running system (machine type, OS, CPU, memory, GPU, audio).
Package triggers provides hardware trigger interfaces for synchronising stimuli with external recording equipment (EEG/MEG amplifiers, oscilloscopes, photodiodes), and for reading TTL-level response signals.
Package triggers provides hardware trigger interfaces for synchronising stimuli with external recording equipment (EEG/MEG amplifiers, oscilloscopes, photodiodes), and for reading TTL-level response signals.
Package units provides unit conversions for vision-science experiments.
Package units provides unit conversions for vision-science experiments.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL