-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Enhance "Set reference" #258
Conversation
Yes, I like that. Some suggestions:
|
Yes, adding a reference channel (all zero) to the data should come before re-referencing to one or more existing electrodes. I thought that because people rarely do that, the option should go last. But you are right, it is probably better when you put it first (even though it is disabled by default). I was thinking that "Set reference" and "Add reference" are very similar. We could use "Re-reference" instead of "Set reference" to highlight that this operation is applied to existing channels, whereas "Add reference" adds a new channel. Do you perform any checks (e.g. adding a new reference requires a new name which is not equal to any existing channels name, and re-referencing requires one or more existing channel names)? |
How about this, for maximum clarity? ad checks: I was thinking mne performs those checks anyway, so mnelab could just show the error messages (and remove the data set duplicate, if applicable), like in |
👍
I didn't check, but yes, this would work of course! Theoretically we could use a (multi-selection) list widget that shows all existing channels instead of a text edit. |
Not sure if that's a valid use case, but this wouldn't work if someone wanted to use a newly added channel as part of the rereferencing selection 🤔 Edit: but yes, this would probably be more practical :D |
Well, that's a very rare use case, and I think in such a case it is OK that the users opens the dialog twice. |
I tried adding a reference and re-referencing to an existing channel, but got this error:
|
Right, my bad, fixed now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I think this is good to go. Additional thought (maybe another PR): the "average" reference is identical to selecting all channels from the list, so we don't really need it. It's just a shortcut basically, and the most common use cases are either one or two channels or the average over all.
Thanks @hofaflo! |
Currently, if the data set does not contain the reference channel, rereferencing requires to open "Set reference..." twice:
Example, following this tutorial:


Here's an idea what the dialog could look like to perform both steps at once (called "Modify reference" to reflect both possible actions):

This could be the initial state:

And only adding a reference channel, without rereferencing would still be possible:
