-1

我正在尝试将 .edf 文件转换为 .npy 文件。我是编码新手,但我的基本理解是这两个文件都是数组,我应该能够在 python 中创建一个脚本来转换数据。

4

1 回答 1

0

你是说欧洲数据格式吗?如果是这样,您可以使用mne-python库:

import mne.io
edf_raw = mne.io.read_raw_edf(edf_fname, preload=True)
hz = 1 / (edf_raw.times[1] - edf_raw.times[0])
# If you wish to get specific channels and time:
edf_data, times = edf_raw[channels_indices, int(from_t * hz): int(to_t * hz]
# Or to get all the data:
edf_data, times = edf_raw[:, :]
于 2019-02-07T22:04:34.740 回答