Skip to content

Commit 0139ecf

Browse files
committed
Merge remote-tracking branch 'upstream/main' into backend
* upstream/main: to_data_frame API change (mne-tools#10925) MAINT: Fix Qt issue (mne-tools#10923) Update inverse.rst DOC (mne-tools#10922) DOC: Clean up Forward and SourceSpaces (mne-tools#10911) [MAINT, MRG] Move sensor cluster permutation example to correct directory (mne-tools#10917) [MRG] Add data loader functions for BESA files (mne-tools#10892)
2 parents 4932e6e + febd798 commit 0139ecf

33 files changed

+737
-23
lines changed

.github/workflows/linux_pip.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
- shell: bash -el {0}
5151
run: ./tools/github_actions_infos.sh
5252
name: 'Show infos'
53+
# Uncomment if "xcb not found" Qt errors/segfaults come up again
54+
# - shell: bash -el {0}
55+
# run: LD_DEBUG=libs python -c "from PyQt6.QtWidgets import QApplication, QWidget; app = QApplication([]); import matplotlib; matplotlib.use('QtAgg'); import matplotlib.pyplot as plt; plt.figure()"
5356
- shell: bash -el {0}
5457
run: ./tools/get_testing_version.sh
5558
name: 'Get testing version'

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ exclude .github/PULL_REQUEST_TEMPLATE.md
7878
# Test files
7979

8080
recursive-exclude mne/io/tests/data *
81+
recursive-exclude mne/io/besa/tests/data *
8182
recursive-exclude mne/io/bti/tests/data *
8283
recursive-exclude mne/io/edf/tests/data *
8384
recursive-exclude mne/io/kit/tests/data *

azure-pipelines.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ stages:
125125
mne sys_info -pd
126126
mne sys_info -pd | grep "qtpy: .*{PySide6=.*}$"
127127
displayName: Print config
128+
# Uncomment if "xcb not found" Qt errors/segfaults come up again
129+
# - bash: |
130+
# set -e
131+
# LD_DEBUG=libs python -c "from PySide6.QtWidgets import QApplication, QWidget; app = QApplication([]); import matplotlib; matplotlib.use('QtAgg'); import matplotlib.pyplot as plt; plt.figure()"
128132
- bash: source tools/get_testing_version.sh
129133
displayName: 'Get testing version'
130134
- task: Cache@2

doc/_includes/inverse.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ to raw data. To reflect the decrease of noise due to averaging, this matrix,
150150
:math:`C_0`, is scaled by the number of averages, :math:`L`, *i.e.*, :math:`C =
151151
C_0 / L`.
152152

153+
.. note::
154+
When EEG data are included, the gain matrix :math:`G` needs to be average referenced when computing the linear inverse operator :math:`M`. This is incorporated during creating the spatial whitening operator :math:`C^{-^1/_2}`, which includes any projectors on the data. EEG data average reference (using a projector) is mandatory for source modeling and is checked when calculating the inverse operator.
155+
153156
As shown above, regularization of the inverse solution is equivalent to a
154157
change in the variance of the current amplitudes in the Bayesian *a priori*
155158
distribution.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
:special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__
7+
:members:
8+
:no-inherited-members:
9+
10+
.. _sphx_glr_backreferences_{{ fullname }}:
11+
12+
.. minigallery:: {{ fullname }}
13+
:add-heading:

doc/changes/latest.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Current (1.1.dev0)
2323

2424
Enhancements
2525
~~~~~~~~~~~~
26+
- Add a note to clarify the inclusion of average referencing gain matrix during whitening (:gh:`10922` by :newcontrib:`Mingjian He`)
27+
2628
- Add time axis scale bar for :meth:`mne.Epochs.plot` using matplotlib backend (:gh:`10736` by :newcontrib:`Jordan Drew`)
2729

2830
- Add :func:`mne.bem.distance_to_bem` to find depth of source positions (:gh:`10632` by :newcontrib:`Matt Courtemanche`)
@@ -105,6 +107,8 @@ Enhancements
105107

106108
- :meth:`mne.Evoked.plot_field` gained a new parameter, ``interaction``, to control the rotation axes when interacting with the head (:gh:`10788` by `Richard Höchenberger`_)
107109

110+
- Add :func:`mne.read_evoked_besa` for reading evokeds from BESA ``.avr`` and ``.mul`` files. (:gh:`10892` by `Marijn van Vliet`_)
111+
108112
Bugs
109113
~~~~
110114
- Fix bug in :func:`mne.io.read_raw_edf` to allow reading in all Hypnodyne ZMax EDFs to be read in without issues (:gh:`10754` by :newcontrib:`Frederik Weber`)
@@ -144,7 +148,7 @@ Bugs
144148
- Fix bug in coregistration GUI that prevented it from starting up if only a high-resolution head model was available (:gh:`10543` by `Richard Höchenberger`_)
145149

146150
- Fix bug with :class:`mne.Epochs.add_reference_channels` where attributes were not updated properly so subsequent `~mne.Epochs.pick_types` calls were broken (:gh:`10912` by `Eric Larson`_)
147-
-
151+
-
148152
- Fix bug in the :class:`mne.viz.Brain` tool bar that prevented the buttons to call the corresponding feature (:gh:`10560` by `Guillaume Favelier`_)
149153

150154
- Fix issue with saving epochs once :func:`~mne.preprocessing.compute_current_source_density` has been used if a rejection threshold was used first (:gh:`10619` by `Alex Rockhill`_ and `Richard Höchenberger`_)
@@ -197,3 +201,5 @@ API and behavior changes
197201
- For :func:`mne.viz.plot_topomap`, :func:`mne.viz.plot_evoked_topomap`, :func:`mne.viz.plot_arrowmap`, :func:`mne.viz.plot_ica_components`, :meth:`mne.Covariance.plot_topomap`, :meth:`mne.Evoked.plot_topomap`, :meth:`mne.Evoked.animate_topomap`, :meth:`mne.decoding.CSP.plot_patterns`, :meth:`mne.Projection.plot_topomap` and :meth:`mne.preprocessing.ICA.plot_components` the topomap image interpolation was previously a cubic interpolation but now can be ``'linear'`` and ``'nearest'`` as well. Unless ``image_interp='nearest'`` is passed mne uses a subsequent matplotlib bilinear interpolation to make the interpolated image smoother. Previously, ``'image_interp'`` controlled this second interpolation step and, for the first interpolation, the only option was cubic. To simplify, ``image_interp`` is now responsible for the main interpolation and the subsequent matplotlib image interpolation is bilinear but can be changed afterward using ``im.set_interpolation`` (:gh:`10617` by `Alex Rockhill`_)
198202

199203
- The FLASH BEM surface generation via :func:`mne.bem.make_flash_bem` or the :ref:`mne flash_bem` command has now been clarified in terms of expected inputs. In :func:`mne.bem.convert_flash_mris` the ``convert`` parameter is now deprecated and the ``flash5`` and ``flash30`` now accept list of file names or nibabel images. One breaking change is that now the flash files are looked for as mef05_*.mgz and mef30_*.mgz in mri/flash folder (:gh:`10715` by `Alex Gramfort`_)
204+
205+
- The ``to_data_frame`` methods for :meth:`Raw <mne.io.Raw.to_data_frame>`, :meth:`Epochs <mne.Epochs.to_data_frame>`, :meth:`Evoked <mne.Evoked.to_data_frame>`, :meth:`SourceEstimate <mne.SourceEstimate.to_data_frame>`, :meth:`EpochsTFR <mne.time_frequency.EpochsTFR.to_data_frame>`, and :meth:`AverageTFR <mne.time_frequency.AverageTFR.to_data_frame>` all now have default ``time_format=None`` (keep time in seconds) instead of ``time_format='ms'`` (convert time to milliseconds) (:gh:`10925` by `Daniel McCloy`_)

doc/changes/names.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,5 @@
457457
.. _Lukas Gemein: https://github.com/gemeinl
458458
459459
.. _Frederik Weber: https://github.com/Frederik-D-Weber
460+
461+
.. _Mingjian He: https://github.com/mh105

doc/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@
171171
# Define what extra methods numpydoc will document
172172
docscrape.ClassDoc.extra_public_methods = mne.utils._doc_special_members
173173
numpydoc_class_members_toctree = False
174+
numpydoc_show_inherited_class_members = {
175+
'mne.SourceSpaces': False,
176+
'mne.Forward': False,
177+
}
174178
numpydoc_attributes_as_param_list = True
175179
numpydoc_xref_param_type = True
176180
numpydoc_xref_aliases = {
@@ -1039,7 +1043,7 @@ def reset_warnings(gallery_conf, fname):
10391043
f'{tu}/{sr}/plot_stats_cluster_spatio_temporal.html': f'{tu}/{sr}/20_cluster_1samp_spatiotemporal.html', # noqa E501
10401044
f'{tu}/{sr}/plot_stats_cluster_spatio_temporal_2samp.html': f'{tu}/{sr}/30_cluster_ftest_spatiotemporal.html', # noqa E501
10411045
f'{tu}/{sr}/plot_stats_cluster_spatio_temporal_repeated_measures_anova.html': f'{tu}/{sr}/60_cluster_rmANOVA_spatiotemporal.html', # noqa E501
1042-
f'{tu}/{sr}/plot_stats_cluster_time_frequency_repeated_measures_anova.html': f'{tu}/{sr}/70_cluster_rmANOVA_time_freq.html', # noqa E501
1046+
f'{tu}/{sr}/plot_stats_cluster_time_frequency_repeated_measures_anova.html': f'{tu}/{sn}/70_cluster_rmANOVA_time_freq.html', # noqa E501
10431047
f'{tu}/{tf}/plot_sensors_time_frequency.html': f'{tu}/{tf}/20_sensors_time_frequency.html', # noqa E501
10441048
f'{tu}/{tf}/plot_ssvep.html': f'{tu}/{tf}/50_ssvep.html',
10451049
f'{tu}/{si}/plot_creating_data_structures.html': f'{tu}/{si}/10_array_objs.html', # noqa E501

doc/file_io.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ File I/O
2424
read_epochs_fieldtrip
2525
read_events
2626
read_evokeds
27+
read_evoked_besa
2728
read_evoked_fieldtrip
2829
read_evokeds_mff
2930
read_freesurfer_lut

doc/forward.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ Forward Modeling
66

77
.. autosummary::
88
:toctree: generated/
9+
:template: autosummary/class_no_inherited_members.rst
910

1011
Forward
1112
SourceSpaces
13+
14+
.. autosummary::
15+
:toctree: generated/
16+
1217
add_source_space_distances
1318
apply_forward
1419
apply_forward_raw

0 commit comments

Comments
 (0)