Add physical_range="channelwise" for EDF export#12510
Add physical_range="channelwise" for EDF export#12510mscheltienne merged 7 commits intomne-tools:mainfrom
physical_range="channelwise" for EDF export#12510Conversation
physical_range="channelwise" for EDF export
physical_range="channelwise" for EDF exportphysical_range="per-channel" for EDF export
There was a problem hiding this comment.
LGTM, one comment I can not add in-line, in the docdict entry export_edf_note that you modified, could you replace:
:attr:`raw.set_channel_types <mne.io.Raw.set_channel_types>`
with
:meth:`mne.io.Raw.set_channel_types`
Same with set_montage 2 lines later.
cbrnr
left a comment
There was a problem hiding this comment.
Done @mscheltienne. BTW, LMK if "per-channel" follows MNE conventions, or if "per_channel" would be better (or if you have a better term).
|
|
Maybe let's go with the str |
agreed; sorry my last message wasn't clear but i did mean using the string, not adding a separate param |
cbrnr
left a comment
There was a problem hiding this comment.
Initially, I used channelwise, but then thought that the correct spelling was channel-wise, which doesn't look so nice as an argument. Anyway, I've now switched (back) and this should be good to go!
physical_range="per-channel" for EDF exportphysical_range="channelwise" for EDF export
|
Thanks @cbrnr! I will definitely use this in my EDF exports! |
|
I'd only use this when you really need it though, because it seems like some programs (EEGLAB?) cannot properly handle EDF files with individual channel ranges. So basically, whenever you have zero-mean signals, you don't need it and you can just use |
Fixes #12493 by adding
physical_range="channelwise". The default behavior remainsphysical_range="auto", which sets the physical range per channel type. However, in some cases where channels vary wildly in their ranges (mainly due to different offsets), which is often the case if the amplifier used no DC HP filter (e.g. Biosemi), setting individual physical ranges per channel ensures that each channel uses the maximum resolution afforded by the EDF format (only 16 bits). This seems to be perfectly compatible with the EDF standard (please correct me if I'm wrong), but I've added a note that some tools might be incompatible with such EDF files.