internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: mne-tools/mne-python

Issue:
Minor: epoch counts in epochs.plot() starts with 1 instead of 0
When using `epochs.plot()` to display epochs, e.g. to manually identify bad ones, the epoch numbers displayed on the plot start with 1, not 0, `while epochs.drop()` expects counts to start from 0. 
[I am aware that one can use the interactive plot + annotations to manually reject epochs, but still think it would avoid confusion if the counters match.]


Discussion:
we've had this issue in the past for ICA component numbering.
I think we ended up using 0 based-labels for plots using the # sign.
To be checked...

Yes, at least in my output ICA components are numbered from 0. Can the same be done for the epochs?
+1

Sounds good to me, @SophieHerbst can you make a PR?
I can give it a try in the next couple of days. 

Resolving patch:
diff --git a/mne/epochs.py b/mne/epochs.py
--- a/mne/epochs.py
+++ b/mne/epochs.py
@@ -1252,7 +1252,9 @@ def drop(self, indices, reason='USER', verbose=None):
         keep = np.setdiff1d(np.arange(len(self.events)), try_idx)
         self._getitem(keep, reason, copy=False, drop_event_id=False)
         count = len(try_idx)
-        logger.info('Dropped %d epoch%s' % (count, _pl(count)))
+        logger.info('Dropped %d epoch%s: %s' %
+                    (count, _pl(count), ', '.join(map(str, np.sort(try_idx)))))
+
         return self
 
     def _get_epoch_from_raw(self, idx, verbose=None):
diff --git a/mne/viz/epochs.py b/mne/viz/epochs.py
--- a/mne/viz/epochs.py
+++ b/mne/viz/epochs.py
@@ -1095,7 +1095,7 @@ def _prepare_mne_browse_epochs(params, projs, n_channels, n_epochs, scalings,
     ticks = epoch_times + 0.5 * n_times
     ax.set_xticks(ticks)
     ax2.set_xticks(ticks[:n_epochs])
-    labels = list(range(1, len(ticks) + 1))  # epoch numbers
+    labels = list(range(0, len(ticks)))  # epoch numbers
     ax.set_xticklabels(labels)
     xlim = epoch_times[-1] + len(orig_epoch_times)
     ax_hscroll.set_xlim(0, xlim)
@@ -1107,7 +1107,7 @@ def _prepare_mne_browse_epochs(params, projs, n_channels, n_epochs, scalings,
     hticks = list()
     for tick in hscroll_ticks:
         hticks.append(epoch_times.flat[np.abs(epoch_times - tick).argmin()])
-    hlabels = [x // n_times + 1 for x in hticks]
+    hlabels = [x // n_times for x in hticks]
     ax_hscroll.set_xticks(hticks)
     ax_hscroll.set_xticklabels(hlabels)
 


Test patch:
diff --git a/mne/viz/tests/test_epochs.py b/mne/viz/tests/test_epochs.py
--- a/mne/viz/tests/test_epochs.py
+++ b/mne/viz/tests/test_epochs.py
@@ -57,7 +57,7 @@ def test_plot_epochs_basic(capsys):
     epochs.info['lowpass'] = 10.  # allow heavy decim during plotting
     fig = epochs.plot(scalings=None, title='Epochs')
     ticks = [x.get_text() for x in fig.axes[0].get_xticklabels()]
-    assert ticks == ['1']
+    assert ticks == ['0']
     plt.close('all')
     # covariance / whitening
     cov = read_cov(cov_fname)
Repository: mne-tools/mne-python

Issue:
problem reading hpts files
#### Describe the bug
`read_dig_hpts` does not accept lower case channel types but does not throw an error. It's surprising and users don't find this problem easily.

#### Steps to reproduce
create an hpts file with the following content:

```sh
EEG    FP1  3.8676  -77.0439  -13.0212
EEG    FP2  -31.9297  -70.6852  -57.4881
EEG    F7  -6.1042  -68.2969   45.4939
```
(example borrowed from the [docstring](https://mne.tools/stable/generated/mne.channels.read_dig_hpts.html#mne.channels.read_dig_hpts))

Then do:

```py
from mne.channels import read_dig_hpts
montage = read_dig_hpts('test.hpts')
print(montage)
```

#### Expected results
Montage should contain 3 digitized channels
```sh
<DigMontage | 0 extras (headshape), 0 HPIs, 0 fiducials, 3 channels>
```

#### Actual results
Montage contains no digitized channels
```sh
<DigMontage | 0 extras (headshape), 0 HPIs, 0 fiducials, 0 channels>
```

#### Additional information
I'm on master branch of MNE


Discussion:

Resolving patch:
diff --git a/mne/channels/montage.py b/mne/channels/montage.py
--- a/mne/channels/montage.py
+++ b/mne/channels/montage.py
@@ -507,6 +507,7 @@ def read_dig_hpts(fname, unit='mm'):
     out = np.genfromtxt(fname, comments='#',
                         dtype=(_str, _str, 'f8', 'f8', 'f8'))
     kind, label = _str_names(out['f0']), _str_names(out['f1'])
+    kind = [k.lower() for k in kind]
     xyz = np.array([out['f%d' % ii] for ii in range(2, 5)]).T
     xyz *= _scale
     del _scale


Test patch:
diff --git a/mne/io/brainvision/tests/data/test.hpts b/mne/io/brainvision/tests/data/test.hpts
--- a/mne/io/brainvision/tests/data/test.hpts
+++ b/mne/io/brainvision/tests/data/test.hpts
@@ -39,4 +39,4 @@ eeg    A1   -65.6105  -14.9387  115.0734
 eeg    ReRef -163.2992    3.5260   -9.0238
 eeg    HL    1.0591    6.2860    4.8814
 eeg    HR   -51.6423   10.2912  -47.8098
-eeg    Vb   -61.2542   29.6360  -43.4039
+EEG    Vb   -61.2542   29.6360  -43.4039
Repository: mne-tools/mne-python

Issue:
Evoked.times is documented twice
I'm guessing this is due to some clash between different Mixin classes, but I haven't investigated yet.  Here's a screenshot of the docs page: note how `times` shows up twice with two different definitions (both above and below `data`).

![Screenshot_2020-03-03_10-51-03](https://user-images.githubusercontent.com/1810515/75811962-3bc1c200-5d42-11ea-92ec-9352a5d1c44b.png)



Discussion:
The problem is much simpler than all that :)

https://github.com/mne-tools/mne-python/blob/master/mne/evoked.py#L102-L109

Resolving patch:
diff --git a/mne/evoked.py b/mne/evoked.py
--- a/mne/evoked.py
+++ b/mne/evoked.py
@@ -99,11 +99,9 @@ class Evoked(ProjMixin, ContainsMixin, UpdateChannelsMixin, SetChannelsMixin,
         Last time sample.
     comment : str
         Comment on dataset. Can be the condition.
-    times : array
-        Array of time instants in seconds.
     data : array of shape (n_channels, n_times)
         Evoked response.
-    times :  ndarray
+    times :  array
         Time vector in seconds. Goes from `tmin` to `tmax`. Time interval
         between consecutive time samples is equal to the inverse of the
         sampling frequency.


Test patch:
Repository: mne-tools/mne-python

Issue:
stc.plot setting initial_time not working with time_viewer=True (PyVista)
There is something wrong with setting the initial time for an stc.plot with time_viewer=True (PyVista), it always defaults to the same value. I updated to the latest developers version, but the problem persists. @GuillaumeFavelier, maybe you know why?


```
import mne

mne.viz.set_3d_backend('pyvista')

data_dir = mne.datasets.sample.data_path('/volatile')
subjects_dir = data_dir + '/subjects'
stc_path = data_dir + '/MEG/sample/sample_audvis-meg-eeg'

stc = mne.read_source_estimate(stc_path, 'sample')

# First, morph the data to fsaverage_sym, for which we have left_right
# registrations:
stc = mne.compute_source_morph(stc, 'sample', 'fsaverage_sym', smooth=5,
                               warn=False,
                               subjects_dir=subjects_dir).apply(stc)

stc.plot(hemi='split', subjects_dir=subjects_dir, initial_time=0.,
          size=(800, 600),time_viewer=True)
```

![pyvista_initial_time](https://user-images.githubusercontent.com/6408073/75868869-02a05500-5e09-11ea-903c-e7358be8e8fd.png)




Discussion:
This is definitely a bug, I will report it in #7162 and investigate this. Thanks for reporting @SophieHerbst 

Resolving patch:
diff --git a/mne/viz/_brain/_timeviewer.py b/mne/viz/_brain/_timeviewer.py
--- a/mne/viz/_brain/_timeviewer.py
+++ b/mne/viz/_brain/_timeviewer.py
@@ -348,6 +348,7 @@ def __init__(self, brain, show_traces=False):
         )
         time_slider = self.plotter.add_slider_widget(
             self.time_call,
+            value=self.brain._data['time_idx'],
             rng=[0, max_time],
             pointa=(0.23, 0.1),
             pointb=(0.77, 0.1),


Test patch:
Repository: mne-tools/mne-python

Issue:
Legend does not reflect data for plot_psd
#### Describe the bug
`plot_psd` legends appear as grey dashed lines and do not represent the data in figure.


#### Steps to reproduce
This can be seen in the example here... https://mne.tools/dev/auto_examples/time_frequency/plot_compute_raw_data_spectrum.html#plot-a-cleaned-psd


#### Expected results
The second plot in this example from MNE V0.13 shows the behaviour I would expect https://mne.tools/0.13/auto_examples/time_frequency/plot_compute_raw_data_spectrum.html 



Discussion:

Resolving patch:
diff --git a/examples/time_frequency/plot_compute_raw_data_spectrum.py b/examples/time_frequency/plot_compute_raw_data_spectrum.py
--- a/examples/time_frequency/plot_compute_raw_data_spectrum.py
+++ b/examples/time_frequency/plot_compute_raw_data_spectrum.py
@@ -97,7 +97,8 @@
              show=False, average=True)
 
 ax.set_title('Four left-temporal magnetometers')
-plt.legend(ax.lines[::3], ['Without SSP', 'With SSP', 'SSP + Notch'])
+leg_lines = [line for line in ax.lines if line.get_linestyle() == '-']
+plt.legend(leg_lines, ['Without SSP', 'With SSP', 'SSP + Notch'])
 
 ###############################################################################
 # Alternative functions for PSDs


Test patch:
Repository: mne-tools/mne-python

Issue:
regression plot_arrowmap
see stable:

https://mne.tools/stable/auto_examples/visualization/plot_evoked_arrowmap.html#sphx-glr-auto-examples-visualization-plot-evoked-arrowmap-py

vs

https://mne.tools/dev/auto_examples/visualization/plot_evoked_arrowmap.html#sphx-glr-auto-examples-visualization-plot-evoked-arrowmap-py

this is certainly related to the refactoring of topography plots.


Discussion:

Resolving patch:
diff --git a/examples/visualization/plot_evoked_arrowmap.py b/examples/visualization/plot_evoked_arrowmap.py
--- a/examples/visualization/plot_evoked_arrowmap.py
+++ b/examples/visualization/plot_evoked_arrowmap.py
@@ -73,4 +73,4 @@
 raw_ctf_info = mne.pick_info(
     raw_ctf.info, mne.pick_types(raw_ctf.info, meg=True, ref_meg=False))
 plot_arrowmap(evoked_grad.data[:, max_time_idx], info_from=evoked_grad.info,
-              info_to=raw_ctf_info, scale=2e-10)
+              info_to=raw_ctf_info, scale=6e-10)
diff --git a/mne/viz/topomap.py b/mne/viz/topomap.py
--- a/mne/viz/topomap.py
+++ b/mne/viz/topomap.py
@@ -2487,7 +2487,7 @@ def _trigradient(x, y, z):
 
 
 @fill_doc
-def plot_arrowmap(data, info_from, info_to=None, scale=1e-10, vmin=None,
+def plot_arrowmap(data, info_from, info_to=None, scale=3e-10, vmin=None,
                   vmax=None, cmap=None, sensors=True, res=64, axes=None,
                   names=None, show_names=False, mask=None, mask_params=None,
                   outlines='head', contours=6, image_interp='bilinear',
@@ -2515,7 +2515,7 @@ def plot_arrowmap(data, info_from, info_to=None, scale=1e-10, vmin=None,
     info_to : instance of Info | None
         The measurement info to interpolate to. If None, it is assumed
         to be the same as info_from.
-    scale : float, default 1e-10
+    scale : float, default 3e-10
         To scale the arrows.
     vmin : float | callable | None
         The value specifying the lower bound of the color range.


Test patch:
Repository: mne-tools/mne-python

Issue:
filter_data docs 'upper cutoff frequency' typo
#### Describe the bug
The docs of `mne.filter.filter_data` have a typo: both `l_freq` and `h_freq` are said to represent "the upper cutoff frequency" for IIR filters.


#### Steps to reproduce
```
import mne
import pprint
pprint.pprint(mne.filter.filter_data.__doc__)
```
I would submit a PR myself but I don't know how your documentation works.


Discussion:
Any time you see

https://github.com/mne-tools/mne-python/blob/master/mne/filter.py#L754

It just uses something from

https://github.com/mne-tools/mne-python/blob/master/mne/utils/docs.py#L241

Can you make a PR to fix `docs.py`?

Resolving patch:
diff --git a/mne/utils/docs.py b/mne/utils/docs.py
--- a/mne/utils/docs.py
+++ b/mne/utils/docs.py
@@ -238,7 +238,7 @@
 # Filtering
 docdict['l_freq'] = """
 l_freq : float | None
-    For FIR filters, the lower pass-band edge; for IIR filters, the upper
+    For FIR filters, the lower pass-band edge; for IIR filters, the lower
     cutoff frequency. If None the data are only low-passed.
 """
 docdict['h_freq'] = """


Test patch:
Repository: mne-tools/mne-python

Issue:
DOC: spurious website content on 4k screens
in a maximized window on a 4k screen, I'm seeing strange content on the far left side:

![Screenshot_2020-06-08_18-17-21](https://user-images.githubusercontent.com/1810515/84195742-ea695300-aa53-11ea-8ca9-3184a805d4c9.png)




Discussion:
It's a `.. contents` for the current page, apparently in the `sphinxsidebar` class.

@drammock can you look into it? Maybe we want these, maybe we don't, not sure. Relevant things from a quick search:

- https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/sphinx_bootstrap_theme/bootstrap/layout.html
- https://github.com/ryan-roemer/sphinx-bootstrap-theme/issues/100

Actually it looks like one problem is the `margin-left` in `basic.css`, which comes from sphinx, is `-100%`. Adding a:
```
div.sphinxsidebar {
  margin-left: -20%;
}
```
to our `style.css` makes it show up more (but still looks bad), if you want to try making it work. If you want to kill it, you might be able to just set the visibility to false, or maybe better, change `_templates/layout.html` to remove it entirely.

Resolving patch:
diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -325,7 +325,7 @@
     # There are some problems with dipy's redirect:
     # https://github.com/nipy/dipy/issues/1955
     'dipy': ('https://dipy.org/documentation/latest',
-             'https://dipy.org/documentation/1.0.0./objects.inv/'),
+             'https://dipy.org/documentation/1.1.1./objects.inv/'),
     'mne_realtime': ('https://mne.tools/mne-realtime', None),
     'picard': ('https://pierreablin.github.io/picard/', None),
 }


Test patch:
Repository: mne-tools/mne-python

Issue:
Small docstring error in _auto_topomap_coords
The docstring of [`_auto_topomaps_coords`](https://github.com/mne-tools/mne-python/blob/03276c7c3d1d5a6cf7ca042f97d6cef51b14422e/mne/channels/layout.py#L622) says that parameter `to_sphere` defaults to `True`. However, this parameter has no default value.



Discussion:
please send us a PR to remove this from docstring

>


Resolving patch:
diff --git a/mne/channels/layout.py b/mne/channels/layout.py
--- a/mne/channels/layout.py
+++ b/mne/channels/layout.py
@@ -637,7 +637,7 @@ def _auto_topomap_coords(info, picks, ignore_overlap, to_sphere, sphere):
         positions overlap, an error is thrown.
     to_sphere : bool
         If True, the radial distance of spherical coordinates is ignored, in
-        effect fitting the xyz-coordinates to a sphere. Defaults to True.
+        effect fitting the xyz-coordinates to a sphere.
     sphere : array-like | str
         The head sphere definition.
 


Test patch:
Repository: mne-tools/mne-python

Issue:
Python version dependency issue
#7758 introduced a dependency on `contextlib.nullcontext`, which was added to the standard library in Python 3.7.  We allegedly support Python 3.6 as our minimum version.  This came up in helping a user troubleshoot MNE on Google CoLab hosted notebooks, which run py 3.6

cc @GuillaumeFavelier 


Discussion:
Argh, I added that. Can you make a quick PR to add one to `mne/fixes.py`? If not, I can do it quickly later tonight or tomorrow

Resolving patch:
diff --git a/mne/fixes.py b/mne/fixes.py
--- a/mne/fixes.py
+++ b/mne/fixes.py
@@ -1078,3 +1078,16 @@ def _np_apply_along_axis(func1d, axis, arr):
     @jit()
     def mean(array, axis):
         return _np_apply_along_axis(np.mean, axis, array)
+
+
+###############################################################################
+# Added in Python 3.7 (remove when we drop support for 3.6)
+
+try:
+    from contextlib import nullcontext
+except ImportError:
+    from contextlib import contextmanager
+
+    @contextmanager
+    def nullcontext(enter_result=None):
+        yield enter_result
diff --git a/mne/viz/backends/_notebook.py b/mne/viz/backends/_notebook.py
--- a/mne/viz/backends/_notebook.py
+++ b/mne/viz/backends/_notebook.py
@@ -3,7 +3,8 @@
 # License: Simplified BSD
 
 import matplotlib.pyplot as plt
-from contextlib import contextmanager, nullcontext
+from contextlib import contextmanager
+from ...fixes import nullcontext
 from ._pyvista import _Renderer as _PyVistaRenderer
 
 


Test patch:
Repository: mne-tools/mne-python

Issue:
stc.project('pca', src) requires fwd['src']
Sometimes a few source locations are dropped in forward computation so the `stc` gets out of sync with the original `src`. this means you need to call `stc.project('pca', fwd['src'])`. It would be nice if you could use the original `src`.

This problem used to exist with `stc.extract_label_time_course` but that has been fixed maybe by #6789?

I'm not sure how to replicate this issue on sample data but I could share some data that exhibits the issue if that is needed.


Discussion:
Indeed it looks like the same fix from #6789 could be applied to `stc.project`. Can you look into refactoring it for example into a `_check_vertices_subset` for https://github.com/mne-tools/mne-python/pull/6789/files#diff-3623e826cb12cb2dfa80dddf3b746d02R2544-R2549 then just reusing `with _temporary_vertices(src, stc.vertices):`?

Resolving patch:
diff --git a/mne/source_space.py b/mne/source_space.py
--- a/mne/source_space.py
+++ b/mne/source_space.py
@@ -3010,9 +3010,10 @@ def _get_src_nn(s, use_cps=True, vertices=None):
     vertices = s['vertno'] if vertices is None else vertices
     if use_cps and s.get('patch_inds') is not None:
         nn = np.empty((len(vertices), 3))
-        for p in np.searchsorted(s['vertno'], vertices):
+        for vp, p in enumerate(np.searchsorted(s['vertno'], vertices)):
+            assert(s['vertno'][p] == vertices[vp])
             #  Project out the surface normal and compute SVD
-            nn[p] = np.sum(
+            nn[vp] = np.sum(
                 s['nn'][s['pinfo'][s['patch_inds'][p]], :], axis=0)
         nn /= linalg.norm(nn, axis=-1, keepdims=True)
     else:


Test patch:
diff --git a/mne/tests/test_source_estimate.py b/mne/tests/test_source_estimate.py
--- a/mne/tests/test_source_estimate.py
+++ b/mne/tests/test_source_estimate.py
@@ -1244,6 +1244,30 @@ def objective(x):
     assert_allclose(directions, want_nn, atol=1e-6)
 
 
+def test_source_estime_project_label():
+    """Test projecting a source estimate onto direction of max power."""
+    fwd = read_forward_solution(fname_fwd)
+    fwd = pick_types_forward(fwd, meg=True, eeg=False)
+
+    evoked = read_evokeds(fname_evoked, baseline=(None, 0))[0]
+    noise_cov = read_cov(fname_cov)
+    free = make_inverse_operator(
+        evoked.info, fwd, noise_cov, loose=1.)
+    stc_free = apply_inverse(evoked, free, pick_ori='vector')
+
+    stc_pca = stc_free.project('pca', fwd['src'])[0]
+
+    labels_lh = read_labels_from_annot('sample', 'aparc', 'lh',
+                                       subjects_dir=subjects_dir)
+    new_label = labels_lh[0] + labels_lh[1]
+
+    stc_in_label = stc_free.in_label(new_label)
+    stc_pca_in_label = stc_pca.in_label(new_label)
+
+    stc_in_label_pca = stc_in_label.project('pca', fwd['src'])[0]
+    assert_array_equal(stc_pca_in_label.data, stc_in_label_pca.data)
+
+
 @pytest.fixture(scope='module', params=[testing._pytest_param()])
 def invs():
     """Inverses of various amounts of loose."""
Repository: mne-tools/mne-python

Issue:
tutorial bug plot_stats_cluster_erp.py
#### Describe the bug
Tutorial plot_stats_cluster_erp.py does not use the electrode connectivity matrix on the spatiotemporal cluster test. Connectivity 'con' is computed in line 79, but it is not used in line 88.



Discussion:

Resolving patch:
diff --git a/tutorials/stats-sensor-space/plot_stats_cluster_erp.py b/tutorials/stats-sensor-space/plot_stats_cluster_erp.py
--- a/tutorials/stats-sensor-space/plot_stats_cluster_erp.py
+++ b/tutorials/stats-sensor-space/plot_stats_cluster_erp.py
@@ -75,8 +75,8 @@
 # methods allow deriving power from the spatio-temoral correlation structure
 # of the data. Here, we use TFCE.
 
-# Calculate statistical thresholds
-con = find_ch_adjacency(epochs.info, "eeg")
+# Calculate adjacency matrix between sensors from their locations
+adjacency, _ = find_ch_adjacency(epochs.info, "eeg")
 
 # Extract data: transpose because the cluster test requires channels to be last
 # In this case, inference is done over items. In the same manner, we could
@@ -85,8 +85,10 @@
      short_words.get_data().transpose(0, 2, 1)]
 tfce = dict(start=.2, step=.2)
 
+# Calculate statistical thresholds
 t_obs, clusters, cluster_pv, h0 = spatio_temporal_cluster_test(
-    X, tfce, n_permutations=100)  # a more standard number would be 1000+
+    X, tfce, adjacency=adjacency,
+    n_permutations=100)  # a more standard number would be 1000+
 significant_points = cluster_pv.reshape(t_obs.shape).T < .05
 print(str(significant_points.sum()) + " points selected by TFCE ...")
 


Test patch:
Repository: mne-tools/mne-python

Issue:
BUG: pyvista error when ploting stc without hemi data
I have a pipeline where i compute some scalars on a set of labels which I map back to an `stc` for visualization using `stc = mne.labels_to_stc(labels, vals)`.

`stc.plot(...)` works with mayavi but will now fail with pyvista with the following error 

> ~/Projects/mne-python/mne-python-devel/mne/viz/_brain/_brain.py in set_time_point(self, time_idx)
>    1138 
>    1139                 # interpolate in space
> -> 1140                 smooth_mat = hemi_data['smooth_mat']
>    1141                 if smooth_mat is not None:
>    1142                     act_data = smooth_mat.dot(act_data)
> 
> KeyError: 'smooth_mat'

I think this is caused by some hemisphere checks where `hemi_data['smooth_mat']` is generated.

To replicate the issue just run `/examples/connectivity/plot_mne_inverse_envelope_correlation.py` using the pyvista backend and commenting out the following lines.
https://github.com/mne-tools/mne-python/blob/607fb4613fb5a80dd225132a4a53fe43b8fde0fb/examples/connectivity/plot_mne_inverse_envelope_correlation.py#L95-L96

I'm not sure if this is a bug in `mne.labels_to_stc` not setting something it should or a `_brain` bug or both.


Discussion:
Thanks for reporting this @bloyl and even more so since we plan to make `pyvista` the default backend in a near future.

I can reproduce so I'll open a PR to fix this asap.

Resolving patch:
diff --git a/mne/viz/_brain/_brain.py b/mne/viz/_brain/_brain.py
--- a/mne/viz/_brain/_brain.py
+++ b/mne/viz/_brain/_brain.py
@@ -1136,7 +1136,7 @@ def set_time_point(self, time_idx):
                     time_actor.SetInput(time_label(self._current_time))
 
                 # interpolate in space
-                smooth_mat = hemi_data['smooth_mat']
+                smooth_mat = hemi_data.get('smooth_mat')
                 if smooth_mat is not None:
                     act_data = smooth_mat.dot(act_data)
 


Test patch: