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

Issue:
CSP.plot_filters() is actually plotting the transpose of filters
#### Describe the bug
The `plot_filters()` method of `mne.decoding.CSP` is not plotting filters, but actually plotting the transpose of filters.
Using version `0.21.2`.


#### Steps to reproduce
Use the code from [Motor imagery decoding from EEG data using the Common Spatial Pattern (CSP)](https://mne.tools/stable/auto_examples/decoding/plot_decoding_csp_eeg.html?highlight=csp) and change the last line of the second code block `csp.plot_patterns` to `csp.plot_filters`, and the result is:

![Current plot_filters result](https://i.loli.net/2020/11/29/8jalSeG9WxDhrfo.png)

And in `mne.decoding.CSP`, the each row of `filters_` attribute is one CSP filter, see: https://github.com/mne-tools/mne-python/blob/maint/0.21/mne/decoding/csp.py#L184. But if we set the second row of `filters_` to be all zeros, the figure almost has no change:
```python
csp.filters_[1, :] = 0  # the coeffs in the second filter(row) are all 0 
csp.plot_filters(epochs.info, ch_type='eeg', units='Patterns (AU)', size=1.5)
```
![Not expected result](https://i.loli.net/2020/11/29/PEf6X8imKL37blv.png)

Instead, if we set the second column of `filters_` to be all zeros, then the "second filter" CSP1 becomes empty:
```python
csp.filters_[:, 1] = 0  # the second column of filters_
csp.plot_filters(epochs.info, ch_type='eeg', units='Patterns (AU)', size=1.5)
```
![empty](https://i.loli.net/2020/11/30/5KxoQnrIR6q7ubw.png)

So `plot_filters` is actually plotting the transpose of filters (the columns of `filters_`), not the csp filters (the rows of `filters_`).

#### To fix it
I think just change this line of code https://github.com/mne-tools/mne-python/blob/maint/0.21/mne/decoding/csp.py#L479 to 
`filters = EvokedArray(self.filters_.T, info, tmin=0)` could fix this issue. I tried the following code and the figure looks more reasonable to be CSP filters:
```
csp.filters_ = csp.filters_.T
csp.plot_filters(epochs.info, ch_type='eeg', units='Patterns (AU)', size=1.5)
```
![result](https://i.loli.net/2020/11/30/a3h1xUiJyQ4PGLE.png)

BTW, the figure from `plot_patterns` method is correct.


Discussion:
LGTM. Can you submit a PR?

Resolving patch:
diff --git a/mne/decoding/csp.py b/mne/decoding/csp.py
--- a/mne/decoding/csp.py
+++ b/mne/decoding/csp.py
@@ -475,7 +475,7 @@ def plot_filters(self, info, components=None, ch_type=None,
         info = cp.deepcopy(info)
         info['sfreq'] = 1.
         # create an evoked
-        filters = EvokedArray(self.filters_, info, tmin=0)
+        filters = EvokedArray(self.filters_.T, info, tmin=0)
         # the call plot_topomap
         return filters.plot_topomap(
             times=components, ch_type=ch_type, vmin=vmin,


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

Issue:
TOPOs appear circular for MEG 
now in a number of plots we have MEG topos that appear circular instead of following the helmet shape.

See for example:

https://mne.tools/dev/_images/sphx_glr_plot_20_visualize_epochs_008.png

in

https://mne.tools/dev/auto_tutorials/epochs/plot_20_visualize_epochs.html#sphx-glr-auto-tutorials-epochs-plot-20-visualize-epochs-py

I don't know if it's a problem of defaults but I also see around me a lot of people showing me MEG topos with circular shapes and I feel it should not happen.


Discussion:
@drammock do you want to look / add it to your queue somewhere?
sure; topos are coming soon on my list
@drammock this one would be nice to fix for 0.22

Resolving patch:
diff --git a/mne/viz/topomap.py b/mne/viz/topomap.py
--- a/mne/viz/topomap.py
+++ b/mne/viz/topomap.py
@@ -1771,7 +1771,8 @@ def _plot_topomap_multi_cbar(data, pos, ax, title=None, unit=None, vmin=None,
         ax.set_title(title, fontsize=10)
     im, _ = plot_topomap(data, pos, vmin=vmin, vmax=vmax, axes=ax,
                          cmap=cmap[0], image_interp='bilinear', contours=0,
-                         outlines=outlines, show=False, sphere=sphere)
+                         outlines=outlines, show=False, sphere=sphere,
+                         ch_type=ch_type)
 
     if colorbar:
         cbar, cax = _add_colorbar(ax, im, cmap, pad=0.25, title=None,
diff --git a/tutorials/epochs/plot_20_visualize_epochs.py b/tutorials/epochs/plot_20_visualize_epochs.py
--- a/tutorials/epochs/plot_20_visualize_epochs.py
+++ b/tutorials/epochs/plot_20_visualize_epochs.py
@@ -139,10 +139,9 @@
 
 ###############################################################################
 # It is also possible to plot spectral estimates across sensors as a scalp
-# topography, using `~mne.Epochs.plot_psd_topomap`. The default
-# parameters will plot five frequency bands (δ, θ, α, β, γ), will compute power
-# based on magnetometer channels, and will plot the power estimates in
-# decibels:
+# topography, using `~mne.Epochs.plot_psd_topomap`. The default parameters will
+# plot five frequency bands (δ, θ, α, β, γ), will compute power based on
+# magnetometer channels, and will plot the power estimates in decibels:
 
 epochs['visual/right'].plot_psd_topomap()
 


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

Issue:
BUG: Bug with `pip pre` / sklearn
@agramfort maybe a quick one for you:
```
____________________ test_get_coef_multiclass_full[4-10-2] ____________________
mne\decoding\tests\test_base.py:302: in test_get_coef_multiclass_full
    scores = cross_val_multiscore(time_gen, X, y, cv=cv, verbose=True)
mne\decoding\base.py:441: in cross_val_multiscore
    scores = parallel(p_func(clone(estimator), X, y, scorer, train, test,
mne\decoding\base.py:441: in <genexpr>
    scores = parallel(p_func(clone(estimator), X, y, scorer, train, test,
mne\decoding\base.py:474: in _fit_and_score
    X_train, y_train = _safe_split(estimator, X, y, train)
c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\sklearn\utils\metaestimators.py:198: in _safe_split
    if _is_pairwise(estimator):
c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\sklearn\base.py:844: in _is_pairwise
    pairwise_tag = _safe_tags(estimator, key="pairwise")
c:\hostedtoolcache\windows\python\3.8.6\x64\lib\site-packages\sklearn\utils\_tags.py:62: in _safe_tags
    raise ValueError(
E   ValueError: The key pairwise is not defined in _get_tags() for the class GeneralizingEstimator.
```


Discussion:

Resolving patch:
diff --git a/mne/fixes.py b/mne/fixes.py
--- a/mne/fixes.py
+++ b/mne/fixes.py
@@ -278,6 +278,28 @@ def is_regressor(estimator):
     return getattr(estimator, "_estimator_type", None) == "regressor"
 
 
+_DEFAULT_TAGS = {
+    'non_deterministic': False,
+    'requires_positive_X': False,
+    'requires_positive_y': False,
+    'X_types': ['2darray'],
+    'poor_score': False,
+    'no_validation': False,
+    'multioutput': False,
+    "allow_nan": False,
+    'stateless': False,
+    'multilabel': False,
+    '_skip_test': False,
+    '_xfail_checks': False,
+    'multioutput_only': False,
+    'binary_only': False,
+    'requires_fit': True,
+    'preserves_dtype': [np.float64],
+    'requires_y': False,
+    'pairwise': False,
+}
+
+
 class BaseEstimator(object):
     """Base class for all estimators in scikit-learn
 
@@ -398,6 +420,9 @@ def __repr__(self):
     # conditionals that are not satisfied by our objects (e.g.,
     # ``if type(self).__module__.startswith('sklearn.')``.
 
+    def _more_tags(self):
+        return _DEFAULT_TAGS
+
     def _get_tags(self):
         collected_tags = {}
         for base_class in reversed(inspect.getmro(self.__class__)):


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

Issue:
BUG: stc plot color limits
@larsoner 000dac95c0f7a4439ee60fb92f1007fd288f9611 introduced a color limit bug in the stc plot

```python
import numpy as np
from pathlib import Path
from mayavi import mlab
import matplotlib.pyplot as plt

import mne

data_path = Path(mne.datasets.sample.data_path())
fname = data_path / 'MEG' / 'sample' / 'sample_audvis-meg'

# Read stc from file
stc = mne.read_source_estimate(fname, subject='sample')
stc.data[:, :] = np.random.rand(*stc.data.shape) # some positive data


fig_size = (300, 300)
fig = mlab.figure(size=fig_size)

brain = stc.plot(
    hemi='lh',
    views='lat',
    colormap='coolwarm',
    subjects_dir=data_path / 'subjects',
    clim=dict(kind='value', pos_lims=[0, .2, .5]),  # <-------------------- this what breaks
    backend='mayavi',
    figure=fig,
)

img = mlab.screenshot(figure=fig, mode='rgba', antialiased=True)
plt.imshow(img)
```

before:
![image](https://user-images.githubusercontent.com/4881164/101778595-5a848e80-3af4-11eb-84d6-dcbc7de8ed75.png)


after:
![image](https://user-images.githubusercontent.com/4881164/101778610-5fe1d900-3af4-11eb-9ee7-9d6ce46600e2.png)



Discussion:
cc @GuillaumeFavelier who probably know intimately the intricate 3d plotting functions 
I can replicate on latest `master`, @GuillaumeFavelier I can make a quick PR for this since I just dumped https://github.com/mne-tools/mne-python/pull/8335#issuecomment-742531087 on you :)

Resolving patch:
diff --git a/mne/viz/_3d.py b/mne/viz/_3d.py
--- a/mne/viz/_3d.py
+++ b/mne/viz/_3d.py
@@ -1905,8 +1905,8 @@ def _plot_stc(stc, subject, surface, hemi, colormap, time_label,
 
     if transparent is None:
         transparent = True
-    sd_kwargs = dict(transparent=transparent, verbose=False)
     center = 0. if diverging else None
+    sd_kwargs = dict(transparent=transparent, center=center, verbose=False)
     kwargs = {
         "array": stc,
         "colormap": colormap,


Test patch:
diff --git a/mne/viz/tests/test_3d.py b/mne/viz/tests/test_3d.py
--- a/mne/viz/tests/test_3d.py
+++ b/mne/viz/tests/test_3d.py
@@ -387,8 +387,12 @@ def test_process_clim_plot(renderer_interactive, brain_gc):
     stc = SourceEstimate(stc_data, vertices, 1, 1, 'sample')
 
     # Test for simple use cases
-    stc.plot(**kwargs)
-    stc.plot(clim=dict(pos_lims=(10, 50, 90)), **kwargs)
+    brain = stc.plot(**kwargs)
+    assert brain.data['center'] is None
+    brain.close()
+    brain = stc.plot(clim=dict(pos_lims=(10, 50, 90)), **kwargs)
+    assert brain.data['center'] == 0.
+    brain.close()
     stc.plot(colormap='hot', clim='auto', **kwargs)
     stc.plot(colormap='mne', clim='auto', **kwargs)
     stc.plot(clim=dict(kind='value', lims=(10, 50, 90)), figure=99, **kwargs)
Repository: mne-tools/mne-python

Issue:
Enlarging time range in raw.plot doesn't draw new annotations
Here's a simple example to reproduce:

```python
import numpy as np
import mne

fs = 500
n_chans = 10
data = np.random.randn(n_chans, fs * 100) * 5e-6
info = mne.create_info(n_chans, fs, "eeg")
raw = mne.io.RawArray(data, info)
raw.annotations.append(onset=[1, 5, 9, 12, 15, 19],
                       duration=[2, 5, 3, 3, 5, 3],
                       description=["A1", "A1", "B2", "C3", "A1", "B2"])
raw.plot(n_channels=n_chans)
```

Once the plot window is open, increase the time window and notice that annotations outside the initial time window are not drawn. Here's what the plot looks like after increasing the window 13 times (notice that annotations from 10s are not drawn, but the overview bar still shows them):

<img width="1027" alt="Screen Shot 2020-12-30 at 16 08 50" src="https://user-images.githubusercontent.com/4377312/103361694-8ffc1680-4ab9-11eb-9e2c-a86f750c58fd.png">

@drammock do you have time to take a look?


Discussion:
Sure, I'll look today.

Resolving patch:
diff --git a/mne/viz/_figure.py b/mne/viz/_figure.py
--- a/mne/viz/_figure.py
+++ b/mne/viz/_figure.py
@@ -714,7 +714,7 @@ def _keypress(self, event):
                 self._update_hscroll()
                 if key == 'end' and self.mne.vline_visible:  # prevent flicker
                     self._show_vline(None)
-                self._redraw()
+                self._redraw(annotations=True)
         elif key == '?':  # help window
             self._toggle_help_fig(event)
         elif key == 'a':  # annotation mode


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

Issue:
in nicolet.py there is a problem reading files with non-round file length in seconds 
using the function mne.io.read_raw_nicolet does not work when the **length in seconds is not an integer** 

instead of trying to read it as an int, adding:

elif var == 'duration_in_sec':
            value = float(value)

in row 79 in nicolat.py will fix this


Discussion:
@miriamguen can you share a problematic file?
sure!
 35010100_0006.data
<https://drive.google.com/file/d/1EdhLV7WYhCOKO8Mv97MbSRCyaH9QWgR7/view?usp=drive_web>
 35010100_0006.head
<https://drive.google.com/file/d/1d0aETqnivycFwpW-EIT7cM3JgSbYOOPu/view?usp=drive_web>


On Thu, 7 Jan 2021 at 14:55, Alexandre Gramfort <notifications@github.com>
wrote:

> @miriamguen <https://github.com/miriamguen> can you share a problematic
> file?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/mne-tools/mne-python/issues/8706#issuecomment-756099500>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AKAVVJOUANV3QKZRXGCQMJLSYWVMRANCNFSM4VY5XDUQ>
> .
>


-- 
-- 

Miriam Guendelman, MD

PHD student

Computational Psychiatry Lab <http://computational-psychiatry.com/>
Dept. of Brain and Cognitive Science
<http://in.bgu.ac.il/bcs/Pages/default.aspx>s
<http://in.bgu.ac.il/bcs/Pages/default.aspx>
Ben-Gurion University of the Negev
<http://in.bgu.ac.il/en/Pages/default.aspx>

Beer-Sheva, 84105

Israel
Cell: +972-50-2616202
--


Resolving patch:
diff --git a/mne/io/nicolet/nicolet.py b/mne/io/nicolet/nicolet.py
--- a/mne/io/nicolet/nicolet.py
+++ b/mne/io/nicolet/nicolet.py
@@ -75,8 +75,11 @@ def _get_nicolet_info(fname, ch_type, eog, ecg, emg, misc):
                 value = value[1:-2].split(',')  # strip brackets
             elif var == 'conversion_factor':
                 value = float(value)
-            elif var != 'start_ts':
+            elif var in ['num_channels', 'rec_id', 'adm_id', 'pat_id',
+                         'num_samples']:
                 value = int(value)
+            elif var != 'start_ts':
+                value = float(value)
             header_info[var] = value
 
     ch_names = header_info['elec_names']


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

Issue:
[DOC] Add `Brain._renderer.set_camera` to `stc.plot` documentation
I noticed that it wasn't described in the `SourceEstimate.plot` documentation how to set a view that is not one of the canonical views. I had to look in the source code to remember how to do this so I thought it might be useful to document. It does expose a private function as in `brain._renderer.set_camera(azimuth=-110, elevation=100, distance=500, np.array([-0.03326882, -0.04459817,  0.08267832]))`. This is quite messy/showing the under the hood bits that maybe shouldn't be shown but I'm not sure how else to get the view you really like without the GUI.



Discussion:
If this is not helpful, no worries.
Are you aware of the public function called `show_view()` ? It uses `set_camera()` under the hood and accepts `elevation`, `azimuth`, `distance` ...etc.
Let me know if there is something that you can't accomplish with it.
Ah no, that is a much better solution. Maybe there is a better way to make this easier to find from the documentation or maybe I should have just looked harder :) 
No worries, the `Brain`'s API is a work in progress so any suggestion of improvement is welcome.

> Maybe there is a better way to make this easier to find from the documentation

I don't know how though 😅
Maybe a first step would be changing the `SourceEstimate.plot` returns to `mne.viz.Brain` from `surfer.Brain` as that was what was returned for me. That would be a good step in pointing users in the right direction unless I'm wrong about the return object :)

That is a good point! 👌

Resolving patch:
diff --git a/mne/viz/_3d.py b/mne/viz/_3d.py
--- a/mne/viz/_3d.py
+++ b/mne/viz/_3d.py
@@ -1777,9 +1777,8 @@ def plot_source_estimates(stc, subject=None, surface='inflated', hemi='lh',
 
     Returns
     -------
-    figure : instance of surfer.Brain | matplotlib.figure.Figure
-        An instance of :class:`surfer.Brain` from PySurfer or
-        matplotlib figure.
+    figure : instance of mne.viz.Brain | matplotlib.figure.Figure
+        An instance of :class:`mne.viz.Brain` or matplotlib figure.
 
     Notes
     -----
@@ -2596,8 +2595,8 @@ def plot_vector_source_estimates(stc, subject=None, hemi='lh', colormap='hot',
 
     Returns
     -------
-    brain : surfer.Brain
-        A instance of :class:`surfer.Brain` from PySurfer.
+    brain : mne.viz.Brain
+        A instance of :class:`mne.viz.Brain`.
 
     Notes
     -----


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

Issue:
Confusion around "resp" channel type
In `channels.py`, it is claimed that the `resp` channel type is for certain response triggers:

https://github.com/mne-tools/mne-python/blob/19fb479de44865d5ce79ad5af539a06081fae0c5/mne/channels/channels.py#L704-L706

This seems to be supported by code treating BTi data:
https://github.com/mne-tools/mne-python/blob/19fb479de44865d5ce79ad5af539a06081fae0c5/mne/io/bti/bti.py#L1188-L1189

But the following comment in `constants.py` suggests it's a resp-iratory, not a resp-onse channel:
https://github.com/mne-tools/mne-python/blob/19fb479de44865d5ce79ad5af539a06081fae0c5/mne/io/constants.py#L177

Now … what gives?

x-ref https://github.com/mne-tools/mne-bids/issues/700

cc @agramfort 


Discussion:
The authority should be fiff-constants

https://github.com/mne-tools/fiff-constants/blob/master/DictionaryTypes.txt#L257
So… it's our BTi code that needs fixing, not the comment in `constants.py`?
Yes I think so
awesome, thanks for digging this out @hoechenberger ... this is good for MNE-BIDS :)

Resolving patch:
diff --git a/mne/channels/channels.py b/mne/channels/channels.py
--- a/mne/channels/channels.py
+++ b/mne/channels/channels.py
@@ -702,8 +702,7 @@ def pick_types(self, meg=False, eeg=False, stim=False, eog=False,
         misc : bool
             If True include miscellaneous analog channels.
         resp : bool
-            If True include response-trigger channel. For some MEG systems this
-            is separate from the stim channel.
+            If ``True`` include respiratory channels.
         chpi : bool
             If True include continuous HPI coil channels.
         exci : bool
diff --git a/mne/io/bti/bti.py b/mne/io/bti/bti.py
--- a/mne/io/bti/bti.py
+++ b/mne/io/bti/bti.py
@@ -1186,7 +1186,7 @@ def _get_bti_info(pdf_fname, config_fname, head_shape_fname, rotation_x,
             chan_info['unit'] = FIFF.FIFF_UNIT_V
 
         elif chan_4d == 'RESPONSE':
-            chan_info['kind'] = FIFF.FIFFV_RESP_CH
+            chan_info['kind'] = FIFF.FIFFV_STIM_CH
         elif chan_4d == 'TRIGGER':
             chan_info['kind'] = FIFF.FIFFV_STIM_CH
         elif chan_4d.startswith('EOG'):


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

Issue:
Clicking in overview bar does not draw annotations in raw.plot
If plotting a `Raw` object with annotations, these are not drawn in the main window when navigating through the data by clicking on the little overview bar. It's probably just an `update()` call that's missing. For a MWE, the example in from #8686 can be used. @drammock do you have time to look?


Discussion:
Yes, I'll look. I actually noticed this myself late on Friday so it was already on my to-do list for today 🙂

Resolving patch:
diff --git a/mne/viz/_figure.py b/mne/viz/_figure.py
--- a/mne/viz/_figure.py
+++ b/mne/viz/_figure.py
@@ -780,7 +780,7 @@ def _buttonpress(self, event):
             # click in horizontal scrollbar
             elif event.inaxes == self.mne.ax_hscroll:
                 if self._check_update_hscroll_clicked(event):
-                    self._redraw()
+                    self._redraw(annotations=True)
             # click on proj button
             elif event.inaxes == self.mne.ax_proj:
                 self._toggle_proj_fig(event)


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

Issue:
Handling bad marker coils when reading KIT data
Hello,

We are attempting to read .con files from KIT system, and mne.io.read_raw_kit() runs into an error when there are missing marker coils. This seems to be caused by retrieving coordinates for markers (e.g. 'hpi_1') when they don't exist (line 716 in mne/io/kit/kit.py).

We propose the following solution, which checks whether a marker coil exists before retrieving its values:

    # nasion, lpa, rpa, HPI in native space
    #elp = [dig.pop(key) for key in (
    #    'fidnz', 'fidt9', 'fidt10',
    #    'hpi_1', 'hpi_2', 'hpi_3', 'hpi_4')]
    elp = []
    for key in (
        'fidnz', 'fidt9', 'fidt10',
        'hpi_1', 'hpi_2', 'hpi_3', 'hpi_4'):
        if key in dig:
            elp.append(dig.pop(key))

@JD-Zhu @paulsowman


Discussion:
no objection to open a PR

will it break anything down the lines?

>


Resolving patch:
diff --git a/mne/io/kit/coreg.py b/mne/io/kit/coreg.py
--- a/mne/io/kit/coreg.py
+++ b/mne/io/kit/coreg.py
@@ -148,8 +148,8 @@ def _set_dig_kit(mrk, elp, hsp, eeg):
             raise ValueError("File %r should contain 8 points; got shape "
                              "%s." % (elp, elp_points.shape))
         elp = elp_points
-    elif len(elp) not in (7, 8):
-        raise ValueError("ELP should contain 7 or 8 points; got shape "
+    elif len(elp) not in (6, 7, 8):
+        raise ValueError("ELP should contain 6 ~ 8 points; got shape "
                          "%s." % (elp.shape,))
     if isinstance(mrk, str):
         mrk = read_mrk(mrk)
diff --git a/mne/io/kit/kit.py b/mne/io/kit/kit.py
--- a/mne/io/kit/kit.py
+++ b/mne/io/kit/kit.py
@@ -720,14 +720,17 @@ def get_kit_info(rawfile, allow_unknown_format, standardize_names=None,
                     hsp.append(rr)
 
             # nasion, lpa, rpa, HPI in native space
-            elp = [dig.pop(key) for key in (
-                'fidnz', 'fidt9', 'fidt10',
-                'hpi_1', 'hpi_2', 'hpi_3', 'hpi_4')]
-            if 'hpi_5' in dig and dig['hpi_5'].any():
-                elp.append(dig.pop('hpi_5'))
+            elp = []
+            for key in (
+                    'fidnz', 'fidt9', 'fidt10',
+                    'hpi_1', 'hpi_2', 'hpi_3', 'hpi_4', 'hpi_5'):
+                if key in dig and np.isfinite(dig[key]).all():
+                    elp.append(dig.pop(key))
             elp = np.array(elp)
             hsp = np.array(hsp, float).reshape(-1, 3)
-            assert elp.shape in ((7, 3), (8, 3))
+            if elp.shape not in ((6, 3), (7, 3), (8, 3)):
+                raise RuntimeError(
+                    f'Fewer than 3 HPI coils found, got {len(elp) - 3}')
             # coregistration
             fid.seek(cor_dir['offset'])
             mrk = np.zeros((elp.shape[0] - 3, 3))


Test patch: