Python support for BrainProducts hardware.

Here we have implemented support for the Remote Control Server application, which allows you to control recordings, send annotations etc. all from Python.

class psychopy.hardware.brainproducts.RemoteControlServer(host='', port=6700, timeout=1.0, testMode=False)[source]

Provides a remote-control interface to BrainProducts Recorder.

Example usage:

import time
from psychopy import logging
from psychopy.hardware import brainproducts

rcs = brainproducts.RemoteControlServer()'testExp',
         workspace='C:/Vision/Workfiles/Standard Workspace.rwksp',
rcs.mode = 'monitor' # or 'impedence', or 'default'
rcs.sendAnnotation('124', 'STIM')
rcs.mode = 'default'  # stops monitoring mode

To initialize the remote control recorder.

  • host (string, optional) – The IP address or hostname of the computer running RCS. Defaults to

  • port (int, optional) – The port on which RCS is listening for a connection on the EEG computer. This should usually not need to be changed. Defaults to 6700.

  • timeout (float, optional) – The timeout (in seconds) to wait for sending/receivign commands

  • testMode (bool, optional) – If True, the network connection to the RCS computer will not actually be initialized. Defaults to False.

property amplifier

Get/set the amplifier to use


Closes the recording and deletes all associated workspace variables (e.g. when a participant has been completed)


Use this to reset any DC offset that might have accumulated if you aren’t using a high-pass filter

property expName

Get/set the name of the experiment or study (string)

The name will make up the first part of the EEG filename.

Example Usage:

rcs.expName = 'MyTestStudy'
property mode

Get/set the current mode.

Mode is a string that can be one of:

  • ‘default’ or ‘def’ or None will exit special modes

  • ‘impedance’ or ‘imp’ for impedance checking

  • ‘monitoring’ or ‘mon’

  • ‘test’ or ‘tes’ to go into test view

open(expName, participant, workspace)[source]

Opens a study/workspace on the RCS server

  • expName (str) – Name of the experiment. Will make up the first part of the EEG filename.

  • participant (str) – Participant identifier. Will make up the second part of the EEG filename.

  • workspace (str) – The full path to the workspace file (.rwksp), with forward slashes as path separators. e.g. “c:/myFolder/mySetup.rwksp”


Opens the Recorder application from the Remote Control.

Neat, huh?!

property overwriteProtection

Get/set whether the

property participant

Get/set the participant identifier (a string or numeric).

This identifier will make up the center part of the EEG filename.


Pause recording EEG without ending the session.


Resume a paused recording

sendAnnotation(annotation, annType)[source]

Sends a message to be logged on the Recorder.

The timing of annotations may be imprecise and this should not be trusted as a method of sending sync triggers.

Annotations can contain any ASCII characters except for “;”

  • annotation (string) – The desription text to be sent in the annotation.

  • annType (string) – The category of the annotation which are user-defined strings (e.g. stimulus, response)

:param Example usage::: rcs.sendAnnotation(“face003”, “stimulus”)

sendRaw(message, checkOutput='OK')[source]

A helper function to send raw messages (strings) to the RCS.

This is normally only used for debugging purposes and is not needed by most users.

  • message (string) – The string that will be sent

  • checkOutput (string (default='OK')) – If a value is provided then this will be checked for by this function. If no check is needed then set checkOutput=None


Start recording EEG.


Stop recording EEG.

property timeout

What is a reasonable timeout in seconds (initially set to 0.5)

For some systems (e.g. when the RCS is the same machine) you might want to set this to a lower value. For an unpredictable or slow network connection you might want to set this to a higher value.

property workspace

Get/set the path to the workspace file. An absolute path is required.

Example Usage:

rcs.workspace = 'C:/Vision/Worksfiles/testing.rwksp'

Back to top