项目作者: mne-tools

项目描述 :
Realtime data analysis with MNE-Python
高级语言: Python
项目地址: git://github.com/mne-tools/mne-realtime.git
创建时间: 2019-05-19T12:58:22Z
项目社区:https://github.com/mne-tools/mne-realtime

开源协议:BSD 3-Clause "New" or "Revised" License

下载


MNE-realtime

[!WARNING]
This project is discontinued in favor of MNE-LSL.
At the moment, MNE-LSL replaces the LSLClient
and does not yet support the FieldTrip buffer.

This is a package for realtime analysis of MEG/EEG data with MNE.
The documentation can be found here:

Dependencies

Installation

We recommend the Anaconda Python distribution. We require that you use Python 3.
You may choose to install mne-realtime via pip.

Besides numpy and scipy (which are included in the standard Anaconda
installation), you will need to install the most recent version of MNE
using the pip tool:

  1. $ pip install -U mne

Then install mne-realtime:

  1. $ pip install https://api.github.com/repos/mne-tools/mne-realtime/zipball/main

These pip commands also work if you want to upgrade if a newer version of
mne-realtime is available. If you do not have administrator privileges on the
computer, use the --user flag with pip.

Quickstart

  1. info = mne.io.read_info(op.join(data_path, 'MEG', 'sample',
  2. 'sample_audvis_raw.fif'))
  3. with FieldTripClient(host='localhost', port=1972,
  4. tmax=30, wait_max=5, info=info) as rt_client:
  5. rt_epochs = RtEpochs(rt_client, event_id, tmin, tmax, ...)
  6. rt_epochs.start()
  7. for ev in rt_epochs.iter_evoked():
  8. epoch_data = ev.data
  9. # or alternatively, get last n_samples
  10. rt_epoch = rt_client.get_data_as_epoch(n_samples=500)
  11. continuous_data = rt_epoch.get_data()

The FieldTripClient supports multiple vendors through the FieldTrip buffer.
It can be replaced with other clients such as LSLClient.
See API for a list of clients.

Bug reports

Use the github issue tracker
to report bugs.