1. INTRODUCTION

1.1 Summary

BrainStream is a Matlab-based package that is designed to deal with real-time processing of a continuous data stream with added triggers. It basically manages the experiment, from stimulus presentation, to enriching the data with extra information, to performing real-time analyses, communicating with your own, labspecific equipment.

A survey of BrainStreams? key features:
1) User friendly approach: Non-programmers should be able to define their own BCI experiment with BrainStream. Via easy manageable tab delimited text files (BrainStream? editor), all necessary information can be supplied to BrainStream. Markers popping up in the data stream trigger the execution of a collection of predefined processing steps.
2) Modular approach: BrainStreams? modular design allows for an efficient distribution of plug-ins among users. Since users refer to this plug-in (it is not actually copied into their experiment), maintenance/updates to such plug-in will automatically migrate into all experiments that refer to it.
3) Exchangeability: Startup procedures, artifact detection solutions but also complete BCI analyses can be defined as separate plug-ins. This will allow for easy exchange of BCI solutions among different institutes. Just swapping the hardware specific plug-in for example will make ones institutes developed BCI solution available and applicable to another institute.
4) Scaling: Due to the explicit way of defining experiments, valuable information is available on which basis BrainStream? can automatically decide which parts of the code can be executed in parallel. Although the user still is responsible for making smart choices, i.e., an elegant way of attributing variables to portions of work is still important; BrainStream? takes the implementation out of hand.

(This work is supported by the BrainGain? Smart Mix Programme of the Netherlands Ministry of Economic Affairs and the Netherlands Ministry of Education, Culture and Science.)

1.2 Objective

BrainStream aims to be a generic easy-to-use interface for users and programmers to set up Brain-Computer Interface (BCI) applications. The core concept is that all processing is triggered by 'markers' that arrive together with (or embedded in) the acquisition data stream. Using a set of modular-based, easily readable and modifiable text files (called 'tables'), specifying the action to take place when markers arrive, a broad range of BCI-applications can be defined in a simple way without programming experience. However, in these tables Matlab processing routines are called that allow integration of user-written code. Flow of information between processing slices of information is made explicit, such that independent computations can be run in parallel without code changes. Essentially, the ultimate goal of BrainStream is to allow researchers to focus on their BCI-specific analyses. Modular design facilitates compositions of new experiments by using fragments of previously defined experiments. This also includes parts of the framework that are specific to the BCI-hardware setup. Markers are named everywhere (not passed as numbers) and specific marker sequences can be specified parsed. Markers are enriched into events that may carry brain-data, but also many annotation that are constructed in the table (e.g. counting trial numbers). Events may also be annotated by (future) subject actions like button presses to sort events for processing. This kind of marker processing, that now can be declaratively defined, usually can only be programmed in a procedural way, e.g. as trlfun in Fieldtrip. BrainStream facilitates the organization of experiments in blocks, maintaining subject/session info etc. The resulting tables can be used for online experiments, but also directly for off-line processing of a data file. BrainStream also provides hooks for initialization and control of stimulus presentation, data aquisition and output generation. BrainStream interfaces for its core analyses to fieldtrip/EEGLAB and custom toolboxes.

Context.jpg

FIGURE 1 . BrainStream handles the user-specific part of an experiment

1.3 System

The user interface is tabular, with tables that are tab-delimited ASCII data files with column headers. The tables can be created using BrainStreams? internal editor. The data processing is based on markers. Onset of new events can be triggered directly by markers embedded in the data stream or by other sources. Dictionaries translate markers from the data stream into events. Each event involves the execution of one or more processing steps at one or more different logical time points. For instance, a possible action could be the execution of a set of Matlab functions (custom made or taken from a toolbox like Fieldtrip), getting or storing a variables content from or to BrainStreams central storage space, or just changing it.
Tables specify which processing steps belong to which events, when they should be executed, and what information they require (data and variables). They constitute a way to build a complete online BCI program without any programming, using off-the-shelf Matlab functions. It is easy to annotate data epochs with trial counts and responses happening later etc., due to an elegant way of specifying interactions between events. This also allows for smart and automatic distribution of processing over multiple machines. It is the part of processing that is usually handled in more complex functions.

Timeline_incoming_markers.gif

FIGURE 2 . Timeline of incoming markers, data selection and processing.

1.4 Documentation.

In this document, we start with a basic step-wise instruction on how to get started, referring to later sections for more advanced functions. Next comes an installation guide for anything that is not covered in the Getting Started section. In the fourth section, the architecture of the core and auxiliary functions is described. The next section deals with common errors and how to solve them, as well as an index of the used functions and a glossary.
As this is work in progress, a description of different hardware environments and the way BrainStream can be adapted to them will be added soon, as well as a number of applications, such as experimental paradigms and other procedures to run. Also more examples are coming.

Topic revision: r1 - 09 Nov 2009 - 17:37:03 - MarianneSeverens
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback