The plugin interface with a FieldTrip Buffer running at a given address. It does not implement the buffer itself, only a client. It is non-invasive, and does not even have access to the MEG device directly, only the data pushed to the buffer.
Download the fieldtrip source code on your acquisition computer, either from their website or their GitHub page. We are interested in the executable
neuromag2ft, which will serve as both our buffer host and interface to push data to the buffer.
We will need to be able to run
neuromag2fton the acquisition computer for the Neuromag. Depending on your system, you might have to build it locally. You can do so by running the makefile in
/realtime/src/acquisition/neuromag/with the command
make. If in doubt, follow the documentation on the fieldtrip buffer website.
neuromag2fton the aquisition computer.
neuromag2ftcan be run with different parameters, but for this example we will be running it with all default settings. For more options, run it with the
--helpflag. Run the executable in
/realtime/src/acquisition/neuromag/bin/<YOUR_OS>. This should both create a buffer and start an interface with the neuromag. This buffer will, by default, be hosted on port
Start data collection
Start collecting data and ensure it is being sent into the buffer through
neuromag2ft. It is important that
neuromag2ftalready be running before data collection starts, otherwise
neuromag2ftwill not work.
Set up plugin in MNE Scan
Run MNE Scan and select the
FtBufferplugin from the toolbar on the left. Set the buffer address, which will be the IP address of your aquisition computer, and port, which by default is
1972. Click the
Setbutton. This sets the
Portfields, and attempts to acquire a sample fif file created by
In MNE Scan, click the green start button on the top left to start the plugin.