goxpyriment

module
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: GPL-3.0

README

goxpyriment

goxpyriment is a high-level Go framework for building behavioral and psychological experiments.

⟶ Jump to Demos (pre-built binaries for many experiments; not recommended: only for those in a hurry)

If you are looking for a simpler, no-code experiment generator, check out Gostim2.

💡 TIP Vibe-coding: After installation, you can launch an AI coding agent (Claude, Gemini, ...) inside the goxpyrimentfolder and ask it to add a new experiment to the examples folder — this leads the agent to read the existing examples for context. Describe the experiment (stimuli, design, etc.) in plain language and enjoy. Recommendation: save your prompt in a description.md file alongside the code.

⚠️ WARNING: This software is in beta-testing, that is, I am waiting for reports from the battleground before releasing a first stabl version. Although it is certainly possible to use it to implement real experiments in the lab, users should (as always) very carefully check their behavior, for example with a bbtk.

Goxpyriment relies on the libsdl library through the go-sdl3 bindings.

(While Python is easy, Go is simple: read Go-vs-Python). The code was mostly written using Claude Sonnet 4.6, with some input from Gemini 2.5 flash.

As its name suggests, goxpyriment was inspired by expyriment.org, a nice, light-weight Python library for cognitive and neuroscientic experiments (See Krause, F., & Lindemann, O. (2014). Behavior Research Methods, 46(2), 416–428. https://doi.org/10.3758/s13428-013-0390-6). The API should feel very familiar to expyriment users.

ChrPlr, March 2026.

License

This project is licensed under the GNU Public License v3 - see the LICENSE file for details.

Please cite thie repository as:


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
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 staircase implements adaptive psychophysical threshold estimation.
Package staircase implements adaptive psychophysical threshold estimation.
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