根据投标规范组织和格式化脑磁和脑电图数据的跨国公司项目。
mne-bids的Python项目详细描述
mne-bids
文档可以在以下链接下找到:
安装
我们推荐使用Anacondapython 分配。我们要求您使用Python3。 除了numpy和scipy(包含在标准Python中 安装),您需要安装最新版本的MNE 使用pip工具:
$ pip install -U mne
然后安装mne-bids:
$ pip install -U mne-bids
如果您想升级较新版本的 mne-bids可用。如果您没有 计算机,将--user标志与pip一起使用。
为了检查是否一切正常,下面的命令不应该给出任何 错误消息:
$ python -c 'import mne_bids'
要获得mne-bids的完整功能,还需要pip install 以下软件包:
- nibabel,用于与MRI数据交互
如果要使用mne-bids的最新开发版本,请使用 以下命令:
$ pip install https://api.github.com/repos/mne-tools/mne-bids/zipball/master
快速启动
目前,我们支持为meg和eeg编写bids数据集。支持 ieeg目前处于试验阶段。
>>>frommneimportio>>>frommne_bidsimportwrite_raw_bids>>>raw=io.read_raw_fif('my_old_file.fif')>>>write_raw_bids(raw,'sub-01_ses-01_run-05',output_path='./bids_dataset')
命令行界面
除了import mne_bids,还可以使用命令行界面。 只需在命令行中键入mne_bids,然后按回车键,就可以看到 接受命令。然后键入mne_bids <command> --help,其中<command> 是公认的命令之一 <command>。
示例:
$ mne_bids raw_to_bids --subject_id sub01 --task rest --raw data.edf --output_path new_path
错误报告
使用github issue tracker 报告错误。
引用
如果你在工作中使用mne-bids,请引用下列文件之一, 取决于您使用的模态:
MEG
Niso, G., Gorgolewski, K. J., Bock, E., Brooks, T. L., Flandin, G., Gramfort, A., Henson, R. N., Jas, M., Litvak, V., Moreau, J., Oostenveld, R., Schoffelen, J., Tadel, F., Wexler, J., Baillet, S. (2018). MEG-BIDS, the brain imaging data structure extended to magnetoencephalography. Scientific Data, 5, 180110. http://doi.org/10.1038/sdata.2018.110
EEG
Pernet, C. R., Appelhoff, S., Gorgolewski, K. J., Flandin, G., Phillips, C., Delorme, A., Oostenveld, R. (2019). EEG-BIDS, an extension to the brain imaging data structure for electroencephalography. Scientific Data, 6, 103. https://doi.org/10.1038/s41597-019-0104-8
iEEG
Holdgraf, C., Appelhoff, S., Bickel, S., Bouchard, K., D'Ambrosio, S., David, O., … Hermes, D. (2019). iEEG-BIDS, extending the Brain Imaging Data Structure specification to human intracranial electrophysiology. Scientific Data, 6, 102. https://doi.org/10.1038/s41597-019-0105-7