Skip to content

Commit f2381db

Browse files
authored
Merge branch 'main' into correct_annot_export
2 parents c823f99 + 4f53a37 commit f2381db

File tree

139 files changed

+1829
-591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1829
-591
lines changed

Diff for: .circleci/config.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ jobs:
218218
- restore_cache:
219219
keys:
220220
- data-cache-phantom-kit
221+
- restore_cache:
222+
keys:
223+
- data-cache-ds004388
221224
- run:
222225
name: Get data
223226
# This limit could be increased, but this is helpful for finding slow ones
@@ -252,7 +255,7 @@ jobs:
252255
name: Check sphinx log for warnings (which are treated as errors)
253256
when: always
254257
command: |
255-
! grep "^.* (WARNING|ERROR): .*$" sphinx_log.txt
258+
! grep "^.*\(WARNING\|ERROR\): " sphinx_log.txt
256259
- run:
257260
name: Show profiling output
258261
when: always
@@ -393,6 +396,10 @@ jobs:
393396
key: data-cache-phantom-kit
394397
paths:
395398
- ~/mne_data/MNE-phantom-KIT-data # (1 G)
399+
- save_cache:
400+
key: data-cache-ds004388
401+
paths:
402+
- ~/mne_data/ds004388 # (1.8 G)
396403

397404

398405
linkcheck:

Diff for: .pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
# Ruff mne
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.8.6
4+
rev: v0.9.1
55
hooks:
66
- id: ruff
77
name: ruff lint mne
@@ -82,7 +82,7 @@ repos:
8282

8383
# zizmor
8484
- repo: https://github.com/woodruffw/zizmor-pre-commit
85-
rev: v1.0.0
85+
rev: v1.1.1
8686
hooks:
8787
- id: zizmor
8888

Diff for: azure-pipelines.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ stages:
112112
- bash: |
113113
set -e
114114
python -m pip install --progress-bar off --upgrade pip
115-
python -m pip install --progress-bar off "mne-qt-browser[opengl] @ git+https://github.com/mne-tools/mne-qt-browser.git@main" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1" pandas neo pymatreader antio defusedxml
115+
python -m pip install --progress-bar off "mne-qt-browser[opengl] @ git+https://github.com/mne-tools/mne-qt-browser.git@main" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1,!=6.8.1.1" pandas neo pymatreader antio defusedxml
116116
python -m pip uninstall -yq mne
117117
python -m pip install --progress-bar off --upgrade -e .[test]
118118
displayName: 'Install dependencies with pip'
@@ -243,7 +243,7 @@ stages:
243243
PYTHONIOENCODING: 'utf-8'
244244
AZURE_CI_WINDOWS: 'true'
245245
PYTHON_ARCH: 'x64'
246-
timeoutInMinutes: 75
246+
timeoutInMinutes: 80
247247
strategy:
248248
maxParallel: 4
249249
matrix:

Diff for: doc/api/datasets.rst

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Datasets
1818
brainstorm.bst_auditory.data_path
1919
brainstorm.bst_resting.data_path
2020
brainstorm.bst_raw.data_path
21+
default_path
2122
eegbci.load_data
2223
eegbci.standardize
2324
fetch_aparc_sub_parcellation

Diff for: doc/api/preprocessing.rst

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ Projections:
116116
read_ica_eeglab
117117
read_fine_calibration
118118
write_fine_calibration
119+
apply_pca_obs
119120

120121
:py:mod:`mne.preprocessing.nirs`:
121122

Diff for: doc/api/time_frequency.rst

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Functions that operate on mne-python objects:
3131
.. autosummary::
3232
:toctree: ../generated/
3333

34+
combine_spectrum
35+
combine_tfr
3436
csd_tfr
3537
csd_fourier
3638
csd_multitaper

Diff for: doc/changes/devel/12910.newfeature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the option to return taper weights from :func:`mne.time_frequency.tfr_array_multitaper`, and taper weights are now stored in the :class:`mne.time_frequency.BaseTFR` objects, by `Thomas Binns`_.

Diff for: doc/changes/devel/13037.newfeature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add PCA-OBS preprocessing for the removal of heart-artefacts from EEG or ESG datasets via :func:`mne.preprocessing.apply_pca_obs`, by :newcontrib:`Emma Bailey` and :newcontrib:`Steinn Hauser Magnusson`.

Diff for: doc/changes/devel/13054.newfeature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added :func:`mne.time_frequency.combine_tfr` to allow combining TFRs across tapers, by `Thomas Binns`_.

Diff for: doc/changes/devel/13056.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug with saving of anonymized data when helium info is present in measurement info, by `Eric Larson`_.

Diff for: doc/changes/devel/13058.newfeature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add the function :func:`mne.time_frequency.combine_spectrum` for combining data across :class:`mne.time_frequency.Spectrum` objects, and allow :func:`mne.grand_average` to operate on :class:`mne.time_frequency.Spectrum` objects, by `Thomas Binns`_.

Diff for: doc/changes/devel/13062.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix computation of time intervals in :func:`mne.preprocessing.compute_fine_calibration` by `Eric Larson`_.

Diff for: doc/changes/devel/13063.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug in the colorbars created by :func:`mne.viz.plot_evoked_topomap` by `Santeri Ruuskanen`_.

Diff for: doc/changes/devel/13067.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug where taper weights were not correctly applied when computing multitaper power with :meth:`mne.Epochs.compute_tfr` and :func:`mne.time_frequency.tfr_array_multitaper`, by `Thomas Binns`_.

Diff for: doc/changes/devel/13069.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug cause by unnecessary assertion when loading mixed frequency EDFs without preloading :func:`mne.io.read_raw_edf` by `Simon Kern`_.

Diff for: doc/changes/names.inc

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
.. _Eberhard Eich: https://github.com/ebeich
7474
.. _Eduard Ort: https://github.com/eort
7575
.. _Emily Stephen: https://github.com/emilyps14
76+
.. _Emma Bailey: https://www.cbs.mpg.de/employees/bailey
7677
.. _Enrico Varano: https://github.com/enricovara/
7778
.. _Enzo Altamiranda: https://www.linkedin.com/in/enzoalt
7879
.. _Eric Larson: https://larsoner.com
@@ -284,6 +285,7 @@
284285
.. _Stanislas Chambon: https://github.com/Slasnista
285286
.. _Stefan Appelhoff: https://stefanappelhoff.com
286287
.. _Stefan Repplinger: https://github.com/stfnrpplngr
288+
.. _Steinn Hauser Magnusson: https://github.com/steinnhauser
287289
.. _Steven Bethard: https://github.com/bethard
288290
.. _Steven Bierer: https://github.com/neurolaunch
289291
.. _Steven Gutstein: https://github.com/smgutstein

Diff for: doc/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@
355355
"n_frequencies",
356356
"n_tests",
357357
"n_samples",
358+
"n_peaks",
358359
"n_permutations",
359360
"nchan",
360361
"n_points",
@@ -1289,7 +1290,7 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
12891290
rst_prolog += f"""
12901291
.. |{icon}| raw:: html
12911292
1292-
<i class="{' '.join(classes + (f'fa-{icon}',))}"></i>
1293+
<i class="{" ".join(classes + (f"fa-{icon}",))}"></i>
12931294
"""
12941295

12951296
rst_prolog += """

Diff for: doc/references.bib

+10
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,16 @@ @inproceedings{NdiayeEtAl2016
13351335
year = {2016}
13361336
}
13371337

1338+
@article{NiazyEtAl2005,
1339+
author = {Niazy, R. K. and Beckmann, C.F. and Iannetti, G.D. and Brady, J. M. and Smith, S. M.},
1340+
title = {Removal of FMRI environment artifacts from EEG data using optimal basis sets},
1341+
journal = {NeuroImage},
1342+
year = {2005},
1343+
volume = {28},
1344+
pages = {720-737},
1345+
doi = {10.1016/j.neuroimage.2005.06.067.}
1346+
}
1347+
13381348
@article{NicholsHolmes2002,
13391349
author = {Nichols, Thomas E. and Holmes, Andrew P.},
13401350
doi = {10.1002/hbm.1058},

Diff for: doc/sphinxext/credit_tools.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def generate_credit_rst(app=None, *, verbose=False):
169169
if author["e"] is not None:
170170
if author["e"] not in name_map:
171171
unknown_emails.add(
172-
f'{author["e"].ljust(29)} '
172+
f"{author['e'].ljust(29)} "
173173
"https://github.com/mne-tools/mne-python/pull/"
174174
f"{commit}/files"
175175
)
@@ -178,9 +178,9 @@ def generate_credit_rst(app=None, *, verbose=False):
178178
else:
179179
name = author["n"]
180180
if name in manual_renames:
181-
assert _good_name(
182-
manual_renames[name]
183-
), f"Bad manual rename: {name}"
181+
assert _good_name(manual_renames[name]), (
182+
f"Bad manual rename: {name}"
183+
)
184184
name = manual_renames[name]
185185
if " " in name:
186186
first, last = name.rsplit(" ", maxsplit=1)

Diff for: doc/sphinxext/related_software.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ def _get_packages() -> dict[str, str]:
163163
assert not dups, f"Duplicates in MANUAL_PACKAGES and PYPI_PACKAGES: {sorted(dups)}"
164164
# And the installer and PyPI-only should be disjoint:
165165
dups = set(PYPI_PACKAGES) & set(packages)
166-
assert (
167-
not dups
168-
), f"Duplicates in PYPI_PACKAGES and installer packages: {sorted(dups)}"
166+
assert not dups, (
167+
f"Duplicates in PYPI_PACKAGES and installer packages: {sorted(dups)}"
168+
)
169169
for name in PYPI_PACKAGES | set(MANUAL_PACKAGES):
170170
if name not in packages:
171171
packages.append(name)

Diff for: doc/sphinxext/unit_role.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ def unit_role(name, rawtext, text, lineno, inliner, options={}, content=[]): #
1010

1111
def pass_error_to_sphinx(rawtext, text, lineno, inliner):
1212
msg = inliner.reporter.error(
13-
"The :unit: role requires a space-separated number and unit; "
14-
f"got {text}",
13+
f"The :unit: role requires a space-separated number and unit; got {text}",
1514
line=lineno,
1615
)
1716
prb = inliner.problematic(rawtext, rawtext, msg)

Diff for: examples/inverse/vector_mne_solution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
# inverse was computed with loose=0.2
8080
print(
8181
"Absolute cosine similarity between source normals and directions: "
82-
f'{np.abs(np.sum(directions * inv["source_nn"][2::3], axis=-1)).mean()}'
82+
f"{np.abs(np.sum(directions * inv['source_nn'][2::3], axis=-1)).mean()}"
8383
)
8484
brain_max = stc_max.plot(
8585
initial_time=peak_time,

0 commit comments

Comments
 (0)