Real-time access to neurophysiological data

A recent development in the FieldTrip project is that we started using and extending it for real-time data analysis, feature extraction and classification. Besides data preprocessing, feature extraction and classification, which are needed for Brain-Computer Interface (BCI) and neurofeedback applications, we have added functionality for real-time processing of neuroimaging data in MATLAB in general using a common interface to the data.

This page is part of the documentation series of the Fieldtrip buffer for realtime aquisition. The FieldTrip buffer is a standard that defines a central hub (the FieldTrip buffer) that facilitates realtime exchange of neurophysiological data. The documentation is organized in five main sections, being:

  1. description and general overview of the buffer,
  2. definition of the buffer protocol,
  3. specific implementations that interface with acquisition software, or software platforms.
  4. the getting started documentation which takes you through the first steps of real-time data streaming and analysis in MATLAB

The page scratchpad contains some loose ends that have no clear place.

Frequently asked questions

Example scripts

General tips and tricks

If you find you're getting problems you might want to think about the following:

  • It's useful to distinguish between reading your data (say, from a hardware device), processing steps, and writing the data (say, to a buffer). Try to separate these things both in your head and your program.
  • Can you nail down the source of the problems, or rather, are you really sure which of the components fails? If not, try to swap your components with something simpler. For example, in Matlab you can initially try to write the data to 'empty://' instead of a FieldTrip buffer. This will help you determining whether your acquisition part works correctly. The other way round, you can use the ft_realtime_signalproxy (or ideas from it) to check whether the writing part works.
  • Are you having performance problems? Maybe you can initially try to reduce the number of channels or the sample rate, and check whether the program logic is right.
  • How much data are you trying to move? If for example you want to write to a buffer on a remote machine, you need to be aware of the physical limits of the network connection.
  • You can try moving the actual buffer to another machine, and you do not need to have the buffer attached to a Matlab session (try using demo_buffer).
  • You can try to report and compare the wall clock time with the sample time. Here, wall clock time refers to the real time your computer has run since you started the acquisition loop, while sample time is given by the amount of data processed so far, divided by your sampling frequency. These two numbers should ideally be the same or have a small constant offset, but they should not drift apart. Successive sample and clock times should also match your blocksize, that is, if you always read 500 samples at a time from a device, and your sampling rate is 1000 Hz, your measured clock time and calculated sample time should increase roughly by 0.5 seconds after each block.

Publications using FieldTrip buffer

The following is a list of papers that made use of the FieldTrip buffer or referred to it. If you have published a paper which uses the FieldTrip buffer and which is not yet listed here, feel free to add it! Just click the edit button (under Page tools) at the top of this page.

Published in 2013

Mayaud, L., Filipe, S., Petegnief, L., Rochecouste, O., & Congedo, M. (2013) Robust Brain-computer Interface for virtual Keyboard (RoBIK): Project results. IRBM, , .

Year unknown

Soldati, N. () Novel data-driven analysis methods for real-time fMRI and simultaneous EEG-fMRI neuroimaging.

Published in 2012

Stolk, A., Todorovic, A., Schoffelen, J-M., & Oostenveld, R. (2012) Online and offline tools for head movement compensation in MEG. Neuroimage, , .

Published in 2011

Degenhart, A. D., Kelly, J. W., Ashmore, R. C., Collinger, J. L., Tyler-Kabara, E. C., Weber, D. J., & Wang, W. (2011) Craniux: a LabVIEW-based modular software framework for brain-machine interface research. Computational intelligence and neuroscience, 2011, 6.
Jensen, O., Bahramisharif, A., Oostenveld, R., Klanke, S., Hadjipapas, A., Okazaki, Y. O., & van Gerven, M. A. J. (2011) Using brain--computer interfaces and brain-state dependent stimulation as tools in cognitive neuroscience. Frontiers in psychology, 2, .
Oostenveld, R., Fries, P., Maris, E., & Schoffelen, J-M. (2011) FieldTrip: open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data. Computational intelligence and neuroscience, 2011, 1.
Sudre, G., Parkkonen, L., Bock, E., Baillet, S., Wang, W., & Weber, D. J. (2011) RtMEG: a real-time software interface for magnetoencephalography. Computational intelligence and neuroscience, 2011, 11.

Published in 2010

Delorme, A., Kothe, C., Vankov, A., Bigdely-Shamlo, N., Oostenveld, R., Zander, T. O., & Makeig, S. (2010) MATLAB-based tools for BCI research.
Schalk, G. () Effective brain-computer interfacing using BCI2000.

development/realtime.txt · Last modified: 2013/11/12 17:19 by 84.241.210.146

You are here: startdevelopmentrealtime
This DokuWiki features an Anymorphic Webdesign theme, customised by Eelke Spaak and Stephen Whitmarsh.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0