You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vertical placement of channel traces seems off in raw butterfly plot #10083
It appears as if the stim channel has a lot of signals, and the EOG channel were flat.
How do you know which is supposed to be which? To me I see three sets of signals, which I'd expect. But I wouldn't expect it to be in the order you gave in pick_types because that function does not reorder channels, or set the plotting order.
If you want specifically ordered channels, you need to pass order=..., probably in your case something like:
order = np.concatenate([
mne.pick_types(raw.info, eeg=True),
mne.pick_types(raw.info, eog=True),
mne.pick_types(raw.info, stim=True)])
raw.plot(order=order)
gets you closer to what you want. However, I'm not sure if butterfly will respect this, it might just be non-butterfly mode.
If this is the case, I would just update the doc for the order param to say that it isn't used in butterfly mode, because butterfly mode has to group by channel type. (I guess we could go based on the order we see each channel type first in the instance, but I think this has disadvantages, too, so probably shouldn't be the default.)
Based on the ordinate labels. The respective butterfly traces should oscillate around the respective channel type label, or be clipped if they're exceeding a certain amplitude.
It's misleading if, like in the first picture, the eog label is perfectly aligned with a flat line, when in fact this line represents the stim channels.
Similarly, the labelling seems to indicate there's many traces in the stim channels, while actually these belong to eeg.
And the EOG trace is centered around the eeg label.
Activity
larsoner commentedon Dec 3, 2021
How do you know which is supposed to be which? To me I see three sets of signals, which I'd expect. But I wouldn't expect it to be in the order you gave in
pick_typesbecause that function does not reorder channels, or set the plotting order.If you want specifically ordered channels, you need to pass
order=..., probably in your case something like:gets you closer to what you want. However, I'm not sure if butterfly will respect this, it might just be non-butterfly mode.
If this is the case, I would just update the doc for the
orderparam to say that it isn't used in butterfly mode, because butterfly mode has to group by channel type. (I guess we could go based on the order we see each channel type first in the instance, but I think this has disadvantages, too, so probably shouldn't be the default.)hoechenberger commentedon Dec 3, 2021
Based on the ordinate labels. The respective butterfly traces should oscillate around the respective channel type label, or be clipped if they're exceeding a certain amplitude.
It's misleading if, like in the first picture, the
eoglabel is perfectly aligned with a flat line, when in fact this line represents thestimchannels.Similarly, the labelling seems to indicate there's many traces in the stim channels, while actually these belong to
eeg.And the EOG trace is centered around the
eeglabel.hoechenberger commentedon Dec 3, 2021
@larsoner Will you be around at today's dev meeting? We can discuss there.
larsoner commentedon Dec 3, 2021
Oh wow I didn't even see the labels because of image transparency and GitHub dark mode. Agreed those labels are wrong :)
larsoner commentedon Dec 3, 2021
No I can't, but it seems like a straightforward bug to me. The fix is hopefully similarly straightforward, but with viz, who knows!
hoechenberger commentedon Dec 3, 2021
Bummer!
Yeah I have no idea honestly :) Maybe @drammock has an immediate intuition?