When using “mne.io.read_raw_edf(edf_path, include = “xxx”)”, if the channels in edf have different sfreq, there’ll be different info.sfreq with different include-list probably.
raw = mne.io.read_raw_edf(r'D:\Users\014446\Desktop\Test-001.edf', preload = False)
Code above told me sfreq = 1000Hz
Code below told me sfreq = 200Hz
raw = mne.io.read_raw_edf(r'D:\Users\014446\Desktop\Test-001.edf', preload = False, include = "EEG C4-M1")
I guess mne.info.sfreq will only return sfreq of a certain channel, or just return the maximum sfreq of all channels.
So I wonder if there are some ways that I could get a list of sfreq of each channel without individually pick each channel in “include = xxx”.
I don’t think that MNE exposes this information. If you want to see the sampling frequency of each individual channel, I recommend using edfio as follows:
from edfio import read_edf
edf = read_edf("Test-001.edf")
print(edf.signals)
Here, edf.signals is a tuple of edfio.EdfSignal objects, which contain everything related to a specific channel (including the sampling frequency).
Yeah, I have changed my code from MNE to EDFIO, it works indeed.
By the way, the solution that I just pick each channel I need in a loop and store them in seperate variables also works, though complex but still acceptable at least for my project.