26e38513ca7be1a96b012f0853c832b2ec3b2e9f,mne/viz/_brain/_timeviewer.py,UpdateColorbarScale,__call__,#UpdateColorbarScale#Any#,186
Before Change
def __call__(self, value):
Update the colorbar sliders.
self.brain.update_fscale(value)
fmin = self.brain._data["fmin"]
fmid = self.brain._data["fmid"]
fmax = self.brain._data["fmax"]
for slider in self.plotter.slider_widgets:
name = getattr(slider, "name", None)
if name == "fmin":
slider_rep = slider.GetRepresentation()
slider_rep.SetValue(fmin)
elif name == "fmid":
slider_rep = slider.GetRepresentation()
slider_rep.SetValue(fmid)
elif name == "fmax":
slider_rep = slider.GetRepresentation()
slider_rep.SetValue(fmax)
elif name == "fscale":
slider_rep = slider.GetRepresentation()
slider_rep.SetValue(1.0)
self.plotter.update()
class BumpColorbarPoints(object):
After Change
self.reps = {key: None for key in self.keys}
self.fscale_slider_rep = None
def __call__(self , value):
Update the colorbar sliders.
self.brain.update_fscale(value)
for key in self.keys:
if self.reps[key] is not None:
self .reps[key].SetValue(self.brain._data[key])
if self.fscale_slider_rep is not None:
self.fscale_slider_rep.SetValue(1.0)
self.plotter.update()
class BumpColorbarPoints(object):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 27
Instances Project Name: mne-tools/mne-python
Commit Name: 26e38513ca7be1a96b012f0853c832b2ec3b2e9f
Time: 2020-04-20
Author: guillaume.favelier@gmail.com
File Name: mne/viz/_brain/_timeviewer.py
Class Name: UpdateColorbarScale
Method Name: __call__
Project Name: mne-tools/mne-python
Commit Name: f6e036d8191b00fc407cdcbc4965f71d84a9878d
Time: 2020-01-28
Author: guillaume.favelier@gmail.com
File Name: mne/viz/_brain/_timeviewer.py
Class Name: _TimeViewer
Method Name: restore_user_scaling
Project Name: mne-tools/mne-python
Commit Name: f6e036d8191b00fc407cdcbc4965f71d84a9878d
Time: 2020-01-28
Author: guillaume.favelier@gmail.com
File Name: mne/viz/_brain/_timeviewer.py
Class Name: _TimeViewer
Method Name: apply_auto_scaling
Project Name: mne-tools/mne-python
Commit Name: 26e38513ca7be1a96b012f0853c832b2ec3b2e9f
Time: 2020-04-20
Author: guillaume.favelier@gmail.com
File Name: mne/viz/_brain/_timeviewer.py
Class Name: UpdateColorbarScale
Method Name: __call__