Closed rcmdnk closed 2 years ago
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽♂️
I think we should update the tutorial – these parameters are meant to match exact names only. Note that you can always re-assign channels types after reading with mne.rename_channels()
, which is more flexible because it also accepts a callable or a dict.
Thanks. It's fine for me the usage is confirmed. Thank you for the rename function, too.
Do you have time to update the tutorial?
Yes, I can do at least for the sleep stage classification part and will try to find others if exist.
It seems no other documents have the problem.
(some uses read_raw_edf(stim_channel=
, but they seem full names of the channels)
good catch. It's great if you can send a PR.
Message ID: @.***>
Yes. Done: #10362
Describe the bug
eog
,misc
, andstim_channel
of read_raw_edf are used to assign the channel type for each channel.Currently, only the exact matched channel can be detected. Nevertheless, some tutorials, such as Sleep stage classification from polysomnography (PSG) data - MNE 0.24.1 documentation, assume partial match and the results may differ from what is expected.
stim_channel
is checked by _check_stim_channel.eog
andmisc
is checked directly in_get_info.I'm not sure if this is a bug or intentional behavior. The behavior of some programs may change if this is changed to an exact match. (If the EDF file contains a long name channel whose part matches another stim/misc/eog channel...)
If this is intentional behavior, these tutorials should be fixed. Otherwise, these codes should be updated to allow the partial match.
Steps to reproduce
Expected results
Actual results
All channels show
eeg
(default type).Additional information
mne.sys_info():