Back to the main page.

Bug 1638 - Install the realtime head localizer in Frankfurt

Reported 2012-08-08 15:47:00 +0200
Modified 2019-08-10 11:55:54 +0200
Product: FieldTrip
Component: realtime
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Arjen Stolk
Depends on:
See also:

Arjen Stolk - 2012-08-08 15:47:21 +0200

Info on the interface between the CTF shared memory segment and the FieldTrip buffer can be found here: Info on the procedure of using the realtime headlocalizer: In short, the setup at the Donders has two components: A) the CTF acquisition computer, where the FieldTrip buffer is running (using 'acq2ftx' - i.e. acquisition to fieldtrip (x refers to headposition channels)). Note that MATLAB does not need to be installed on this acquisition computer as acq2ftx is written in C-code. The buffer is available to any other PC via TCP/IP. B) Another dedicated computer, termed the realtime pc, which gets the headposition data from the FieldTrip buffer and does the plotting (using ft_realtime_headlocalizer from matlab command window). Note that the latter can also be done on the acquisition computer, but we chose to split the two processes over two computers (acquisition and visualization). The steps involved: 1) install fieldtrip on the CTF acquisition computer (and on the realtime pc) 2) run from linux terminal: /fieldtrip/realtime/src/acquisition/ctf/acq2ftx 3) start acq 4) start matlab and make sure this directory is added to path: /fieldtrip/realtime/online_meg 5) cfg.dataset = 'buffer://localhost:1972' (this address should point to the location where the buffer is run - i.e. the acquisition computer) ft_realtime_headlocalizer(cfg)

Robert Oostenveld - 2012-09-20 09:29:28 +0200

(In reply to comment #0) Note that you don't have to run the MATLAB parts on the acquisition computer. In Nijmegen that also does not work, because the RH version is too old roboos@odin> cat /etc/redhat-release Red Hat Enterprise Linux WS release 3 (Taroon Update 4) Consequently, any recent version of MATLAB won't run due to all sorts of library issues. It is enough to run acq2ftx on the acquisition computer and MATLAB on another computer. In our case the acquisition computer is called odin, and we use it as cfg.dataset = 'buffer://odin:1972' for the ft_realtime examples.

Stan van Pelt - 2012-09-20 10:37:07 +0200

(In reply to comment #1) I'll have a look at it together with Michael next week Tuesday. I think we will first try to get the realtime headlocalizer running, the spatial filter business can follow later. We'll keep you posted.

Robert Oostenveld - 2012-09-20 10:42:30 +0200

(In reply to comment #2) I suggest you start with the ft_realtime_signalviewer, that is the most simple one.

Robert Oostenveld - 2012-09-20 13:18:13 +0200

Michal asked thanks for the help. My question initially was whether the CTF virtual channels that you can add to your recording (and see in 'realtime aliong with the other channels in data monitor), count as recorded channels, and could be written to the buffer.

Robert Oostenveld - 2012-09-20 13:19:41 +0200

(In reply to comment #4) I actually don't know. I do not see a reson why not, because the data seems to be made available by Acq very late in it's pipeline. Could you try it out and let us know?

Stan van Pelt - 2012-09-20 14:00:51 +0200

(In reply to comment #5) Sounds like that should work. Fascinating if it would.

Arjen Stolk - 2012-09-25 15:24:16 +0200

Considering it to work.

Arjen Stolk - 2012-10-25 12:09:42 +0200

One last practical issue related to this topic: The default linux/redhat configuration of the shared memory does not allow a sufficiently large memory block to be allocated. This requires changing the setting in the operating system (to 1000000000). For details see 'known problems with CTF real-time acquisition' on the following wiki page:

Robert Oostenveld - 2019-08-10 11:51:58 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on

Robert Oostenveld - 2019-08-10 11:55:54 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on