我正在为我的大学项目研究存储在“.gdf”文件中的脑电信号数据。我的目标是使用Python打开该文件。到目前为止,我能够使用MNE包打开该文件。代码是:
import os
import numpy as np
import mne
raw=mne.io.read_raw_gdf('1.gdf')
print(raw.info)
因此,我得到:
Extracting EDF parameters from C:\Users\Gamer\Desktop\1.gdf...
GDF file detected
Setting channel info structure...
Creating raw.info structure...
<Info | 7 non-empty values
bads: []
ch_names: AFz, F3, F1, Fz, F2, F4, FFC5h, FFC3h, FFC1h, FFC2h, FFC4h, ...
chs: 64 EEG
custom_ref_applied: False
highpass: 0.0 Hz
lowpass: 128.0 Hz
meas_date: 2017-04-04 12:50:01 UTC
nchan: 64
projs: []
sfreq: 256.0 Hz
>
现在,我的问题是:
数据集说明可在http://bnci-horizon-2020.eu/database/data-sets/001-2019/dataset_description_v1-1.pdf上找到
欢迎使用堆栈溢出和mne python!:)
如果您尝试打印已读取的原始文件(而不仅仅是其info属性),您应该能够看到维度。原始文件总是首先存储在mne python通道中,因此数据数组的维度是
channels x samples
如果对数组没有问题,可以通过
.get_data()
方法(see the docs here)获得它。如果您喜欢熊猫数据帧,可以通过raw.to_data_frame()
(docs)获得它但是在获取数据数组/表之前,您可能需要执行过滤(例如
raw.filter(1, None)
)、注释坏数据段(tutorial)、插值坏通道(tutorial)和执行ICA(tutorial)。一般来说,您试图进行的分析可能是在mne中实现的,或者使用mne对象更容易执行。确保在mne文档中看到许多丰富的tutorials和examples。 如果您有任何进一步的问题,我们现在使用对话:https://mne.discourse.group/
相关问题 更多 >
编程相关推荐