mne-tools / mne-tools/mne-python
bad colormap behavior when brain vlim sliders crossover
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Description of the problem
when reviewing #12612 I noticed odd behavior (also present on main): if vmin slider is moved to be a larger value than vmid slider, and then moved back again to be a smaller value than vmid, vmid behaves as though its value were pushed up to wherever vmin topped out but the vmid slider itself stays in its original position. Afterward, a tiny adjustment to vmid will have a big effect:
Steps to reproduce
run this code, then adjust sliders as is done in the video
import mne
path = mne.datasets.sample.data_path()
stc = mne.read_source_estimate(path / "MEG/sample/fsaverage_audvis-meg")
brain = stc.plot("fsaverage", hemi="both", subjects_dir=path / "subjects")
Link to data
No response
Expected results
not sure what correct behavior should be. Some options:
- when dragging
vminpastvmidin positive direction,vmidgets dragged along with it (I think this is how it used to work in an older version of the GUI?)- unclear what should happen to
vmidwhen draggingvminback down... simplest is to leave it wherevervmintopped out, but that's not a great UX. Harder to implement but nicer UX would be to remember wherevmidwas and have it drag along withvminup to (but not past) that prior location.
- unclear what should happen to
- when dragging
vmintowardvmidin positive direction,vminis not allowed to go pastvmid--- force users to adjustvmidupward first
Actual results
see video above
Additional information
Platform Linux-5.15.0-58-generic-x86_64-with-glibc2.35
Python 3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:43:09) [GCC 12.3.0]
Executable /opt/mambaforge/envs/mnedev/bin/python3.11
CPU x86_64 (16 cores)
Memory 125.7 GB
Core
├☒ mne 1.7.0.dev76+g52a905928 (outdated, release 1.7.0 is available!)
├☑ numpy 1.26.4 (OpenBLAS 0.3.23.dev with 16 threads)
├☑ scipy 1.11.4
└☑ matplotlib 3.8.2 (backend=QtAgg)
Numerical (optional)
├☑ sklearn 1.3.2
├☑ numba 0.58.1
├☑ nibabel 5.2.0
├☑ nilearn 0.10.2
├☑ dipy 1.8.0
├☑ openmeeg 2.5.7
├☑ cupy 13.0.0
├☑ pandas 2.1.4
├☑ h5io 0.2.1
└☑ h5py 3.10.0
Visualization (optional)
├☑ pyvista 0.43.2 (OpenGL 4.5.0 NVIDIA 545.23.08 via NVIDIA GeForce RTX 2060/PCIe/SSE2)
├☑ pyvistaqt 0.11.0
├☑ vtk 9.3.0
├☑ qtpy 2.4.1 (PyQt6=6.6.0)
├☑ ipympl 0.9.3
├☑ pyqtgraph 0.13.3
├☑ mne-qt-browser 0.7.0.dev9+g547b976
├☑ ipywidgets 8.1.1
├☑ trame_client 2.14.2
├☑ trame_server 2.15.0
├☑ trame_vtk 2.7.0
└☑ trame_vuetify 2.3.1
Ecosystem (optional)
├☑ mne-bids 0.15.0.dev24+g05b8e6b8
├☑ mne-nirs 0.7.0.dev0
├☑ mne-connectivity 0.7.0.dev0
├☑ mne-bids-pipeline 1.6.0.dev8+g9055e9c
├☑ neo 0.13.0
├☑ eeglabio 0.0.2-4
├☑ edfio 0.4.0
├☑ mffpy 0.8.0
├☑ pybv 0.7.5
└☐ unavailable mne-features, mne-icalabel
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided sample code and reproducing the vmin/vmid slider crossover in the brain plot opened by stc.plot(...). Review the slider and colormap behavior, then agree which expected interaction applies from the two options before implementing it. Done means the sliders and rendered colormap remain consistent after crossing and returning, with regression coverage for that sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100