Useful Expyriment tools and helper functions

API reference tool

Besides this online documentation, Expyriment includes a full offline API reference tool which will allow you to browse and search the API offline, using a graphical user interface. For more information on offline documentation, please call:

expyriment.show_documentation()

Expyriment test suite

The Expyriment test suite is a guided tool for testing your computer’s abilities/performance. This includes timing accuracy of visual stimulus presentation, audio playback functionality, mouse functionality and serial port functionality/usage.

Eventually, all test results can be saved as a protocol, together with some information about the system.

Starting the test suite

The test suite can either be started from within an experiment, or from an interactive python session (for instance with IPython).

To start the test suite, just call:

expyriment.control.run_test_suite()

Menu overview

Here is a brief explanation of the available options:

  1. Visual stimulus presentation
  • Tests if stimuli can be presented timing accurately
  • Tests if stimulus presentation is synchronized to the refresh rate of the screen
  • Tests the video card’s settings for buffering
  1. Auditory stimulus presentation
  • Tests functionality of audio playback
  1. Mouse test
  • Tests mouse accuracy (polling time)
  • Tests functionality of mouse buttons
  1. Serial port test
  • Tests functionality of devices connected via the serial port
  1. Write protocol
  • Saves all test results, as well as information about the system, as a text file.
  1. Quit
  • Quits the test suite

Data preprocessing

In most cases, data acquired by Expyriment needs to be further processed before a statistical analysis can be performed. This processing entails an aggregation of the dependent variables over all factor-level combinations of the experimental design. Expyriment provides an easy, but flexible way to automatize this process with the included data preprocessing module of the misc package (expyriment.misc.data_preprocessing).

Command line interface

The command line interface can be used to start the Expyriment Reference Tool, or to run the Expyriment test suite or any Python script with predefined Expyriment default settings.

Usage:

python -m expyriment.cli [EXPYRIMENT SCRIPT] [OPTIONS]

Import expyriment data into R

The function expyriment_data.R concatinates all data and returns an R data frame with all subjects. Between subject factors will be added as variables to the data matrix.