Default scaling of raw data traces
Hi!
I would like to look into fixing the default scaling of raw data traces. The defaults are such that MEG data typically looks quite ok. However, biosignals, other analog inputs, and stimulus channels are often unreadable. The GUI does not allow scaling channel types individually, which makes it difficult to visually inspect data. See an example below:
Two suggestions:
- Could we automatically scale the data for each channel type separately so that it is nicely displayed in the raw data browser?
- Could we implement a way to interactively change the scaling in the raw data browser?
I know that it is possible to set scalings when running raw.plot(), but that is difficult to do without knowing how the data looks like first.
Thoughts?
Have you tried scalings="auto"? It should try some auto scaling on a per-channel-type (I think?) basis
There are keyboard bindings +/- for changing scalings, but it's for all channels. Might get you part of the way...
mne-qt-browser might already have some individual scaling capability, if not, then that would be a reasonable place to add it as it's a Qt GUI it should be simple enough!
Hi @larsoner!
I tried setting scalings="auto" and got variable results. For my own data, it set the scaling so that only a few MISC channels were readable:
I also tried with sample_audvis_raw.fif and the behavior is also a bit unexpected there.
I checked the source of mne-qt-browser and it seems that each channel type gets its scaling from raw.plot(). Once the raw data browser is open, the user can only zoom in and out using + and - keys.'
I would like to look into the behavior of scalings='auto' a bit. I also thought that maybe it would be nice to have a button or keymap in the GUI which would scale each trace so that it would take the same amount of space graphically. This would be useful for inspecting data in the presence of multiple auxiliary signals, even if the traces were no longer in the same scale with respect to each other of the same channel type.
I would like to look into the behavior of scalings='auto' a bit.
Feel free but also look through git blame for relevant issues and PRs, IIRC we discussed how that should behave a bit at some point.
I also thought that maybe it would be nice to have a button or keymap in the GUI which would scale each trace so that it would take the same amount of space graphically. This would be useful for inspecting data in the presence of multiple auxiliary signals, even if the traces were no longer in the same scale with respect to each other of the same channel type.
I guess this might be okay but we'd have to make it clear that the scale is now different per-channel. This would mean adding scales for each channel (busy and likely difficult but cleanest), just removing the scale bars (a little unclear), or writing "varying (uV)" or something (probably easy-ish and at least makes it clearer the scales vary).
I guess this might be okay but we'd have to make it clear that the scale is now different per-channel. This would mean adding scales for each channel (busy and likely difficult but cleanest), just removing the scale bars (a little unclear), or writing "varying (uV)" or something (probably easy-ish and at least makes it clearer the scales vary).
I am not excited about allowing different scaling for different channels of the same type. @ruuskas would it be enough for you if the GUI allowed changing scaling interactively per channel type?
I tried setting
scalings="auto"and got variable results. For my own data, it set the scaling so that only a few MISC channels were readable:
If MEG channels were already displaying nicely and it was just the misc channel traces that were illegible, you could also try raw.plot(scalings={"misc":"auto"}) ? Then MNE uses the default scalings for MEG channels and tries to compute a sensible scaling for the misc data