diff --git a/.github/workflows/credit.yml b/.github/workflows/credit.yml index 9e6aa00b663..3ceb98a185d 100644 --- a/.github/workflows/credit.yml +++ b/.github/workflows/credit.yml @@ -40,6 +40,6 @@ jobs: git checkout -b credit git commit -am "MAINT: Update code credit" git push origin credit - PR_NUM=$(gh pr create --base main --head credit --title "MAINT: Update code credit" --body "Created by credit [GitHub action](https://github.com/mne-tools/mne-python/actions/runs/${{ github.run_id }}).

*Adjustments may need to be made to `doc/changes/credit_tools.py` or `.mailmap` etc. to get CircleCI to pass.*" --label "no-changelog-entry-needed") + PR_NUM=$(gh pr create --base main --head credit --title "MAINT: Update code credit" --body "Created by credit [GitHub action](https://github.com/mne-tools/mne-python/actions/runs/${{ github.run_id }}).

*Adjustments may need to be made to \`doc/changes/credit_tools.py\` or \`.mailmap\` etc. to get CircleCI to pass.*" --label "no-changelog-entry-needed") echo "Opened https://github.com/mne-tools/mne-python/pull/${PR_NUM}" >> $GITHUB_STEP_SUMMARY if: steps.status.outputs.dirty == 'true' diff --git a/.github/workflows/spec_zero.yml b/.github/workflows/spec_zero.yml index 3f3698190fc..6a45f2876b6 100644 --- a/.github/workflows/spec_zero.yml +++ b/.github/workflows/spec_zero.yml @@ -57,6 +57,6 @@ jobs: git checkout -b spec_zero git commit -am "MAINT: Update dependency specifiers" git push origin spec_zero - PR_NUM=$(gh pr create --base main --head spec_zero --title "MAINT: Update dependency specifiers" --body "Created by spec_zero [GitHub action](https://github.com/mne-tools/mne-python/actions/runs/${{ github.run_id }}).

*Adjustments may need to be made to shims in mne/fixes.py in this or another PR. `git grep TODO VERSION` is a good starting point for finding potential updates.*" --label "no-changelog-entry-needed") + PR_NUM=$(gh pr create --base main --head spec_zero --title "MAINT: Update dependency specifiers" --body "Created by spec_zero [GitHub action](https://github.com/mne-tools/mne-python/actions/runs/${{ github.run_id }}).

*Adjustments may need to be made to shims in \`mne/fixes.py\` in this or another PR. \`git grep TODO VERSION\` is a good starting point for finding potential updates.*" --label "no-changelog-entry-needed") echo "Opened https://github.com/mne-tools/mne-python/pull/${PR_NUM}" >> $GITHUB_STEP_SUMMARY if: steps.status.outputs.dirty == 'true' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 04b22145319..7eefe5d0941 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # Ruff mne - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.2 + rev: v0.14.3 hooks: - id: ruff-check name: ruff lint mne @@ -82,7 +82,7 @@ repos: # zizmor - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.16.0 + rev: v1.16.2 hooks: - id: zizmor diff --git a/doc/changes/dev/13468.bugfix.rst b/doc/changes/dev/13468.bugfix.rst new file mode 100644 index 00000000000..162ee90ff6a --- /dev/null +++ b/doc/changes/dev/13468.bugfix.rst @@ -0,0 +1 @@ +Correctly set the calibration factor in Nihon Kohden reader (which affects channel amplitudes), by `Tom Ma`_. diff --git a/doc/changes/dev/13478.bugfix.rst b/doc/changes/dev/13478.bugfix.rst new file mode 100644 index 00000000000..426f0ba5a91 --- /dev/null +++ b/doc/changes/dev/13478.bugfix.rst @@ -0,0 +1 @@ +Fix bug with :func:`mne.preprocessing.ICA.apply` not working when the ICA instance was fitted including marked bad channels, by `Michael Straube`_. \ No newline at end of file diff --git a/doc/conf.py b/doc/conf.py index 0c8f65b7df7..350f0d230e8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -657,6 +657,7 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines): linkcheck_ignore = [ # will be compiled to regex # 403 Client Error: Forbidden "https://doi.org/10.1002/", # onlinelibrary.wiley.com/doi/10.1002/hbm + "https://doi.org/10.1017/", # cambridge.org "https://doi.org/10.1016/", # neuroimage "https://doi.org/10.1021/", # pubs.acs.org/doi/abs "https://doi.org/10.1063/", # pubs.aip.org/aip/jap @@ -682,6 +683,9 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines): "https://doi.org/10.3390/", # mdpi.com "https://hms.harvard.edu/", # doc/funding.rst "https://stackoverflow.com/questions/21752259/python-why-pickle", # doc/help/faq + "https://blender.org", + "https://home.alexk101.dev", + "https://www.mq.edu.au/", "https://www.biorxiv.org/content/10.1101/", # biorxiv.org "https://www.researchgate.net/profile/", "https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html", @@ -746,13 +750,10 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines): show_warning_types = True nitpick_ignore = [ ("py:class", "None. Remove all items from D."), - ("py:class", "a set-like object providing a view on D's items"), - ("py:class", "a set-like object providing a view on D's keys"), ( "py:class", "v, remove specified key and return the corresponding value.", ), # noqa: E501 - ("py:class", "None. Update D from dict/iterable E and F."), ("py:class", "an object providing a view on D's values"), ("py:class", "a shallow copy of D"), ("py:class", "(k, v), remove and return some (key, value) pair as a"), @@ -761,6 +762,8 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines): ("py:class", "None. Remove all items from od."), ] nitpick_ignore_regex = [ + ("py:class", "a set-like object providing a view on D's (items|keys)"), + ("py:class", r"None\. Update D from (dict|mapping)/iterable E and F\."), # Classes whose methods we purposefully do not document ("py:.*", r"mne\.io\.BaseRaw.*"), # use mne.io.Raw ("py:.*", r"mne\.BaseEpochs.*"), # use mne.Epochs diff --git a/doc/sphinxext/prs/13096.json b/doc/sphinxext/prs/13096.json new file mode 100644 index 00000000000..6b04f0c57cd --- /dev/null +++ b/doc/sphinxext/prs/13096.json @@ -0,0 +1,51 @@ +{ + "merge_commit_sha": "c4de9b61cd5f40a8771a853d483621c735390ec2", + "authors": [ + { + "n": "Young Truong", + "e": null + }, + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Bru", + "e": "b.aristimunha@gmail.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "doc/changes/dev/13096.newfeature.rst": { + "a": 1, + "d": 0 + }, + "mne/io/eeglab/_eeglab.py": { + "a": 195, + "d": 7 + }, + "mne/io/eeglab/eeglab.py": { + "a": 63, + "d": 23 + }, + "mne/io/eeglab/tests/test_eeglab.py": { + "a": 143, + "d": 2 + }, + "tools/azure_dependencies.sh": { + "a": 3, + "d": 1 + }, + "tools/github_actions_dependencies.sh": { + "a": 4, + "d": 0 + }, + "tools/github_actions_env_vars.sh": { + "a": 1, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13251.json b/doc/sphinxext/prs/13251.json new file mode 100644 index 00000000000..de9b32ad434 --- /dev/null +++ b/doc/sphinxext/prs/13251.json @@ -0,0 +1,39 @@ +{ + "merge_commit_sha": "181fea1e7e0bd73c2ec5cf67391cf598ad1af7bf", + "authors": [ + { + "n": null, + "e": "myd7349@gmail.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".github/workflows/tests.yml": { + "a": 1, + "d": 0 + }, + "azure-pipelines.yml": { + "a": 1, + "d": 0 + }, + "doc/changes/dev/13251.bugfix.rst": { + "a": 1, + "d": 0 + }, + "mne/datasets/config.py": { + "a": 2, + "d": 2 + }, + "mne/io/nihon/nihon.py": { + "a": 55, + "d": 11 + }, + "mne/io/nihon/tests/test_nihon.py": { + "a": 8, + "d": 10 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13347.json b/doc/sphinxext/prs/13347.json new file mode 100644 index 00000000000..e6dcebc212f --- /dev/null +++ b/doc/sphinxext/prs/13347.json @@ -0,0 +1,19 @@ +{ + "merge_commit_sha": "94d9871acc920a47a04e9481d1fb2dfb25be7bfe", + "authors": [ + { + "n": "Clemens Brunner", + "e": null + }, + { + "n": "Daniel McCloy", + "e": "dan@mccloy.info" + } + ], + "changes": { + "doc/conf.py": { + "a": 16, + "d": 4 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13421.json b/doc/sphinxext/prs/13421.json new file mode 100644 index 00000000000..cc10cbda0be --- /dev/null +++ b/doc/sphinxext/prs/13421.json @@ -0,0 +1,27 @@ +{ + "merge_commit_sha": "52234feffb2d46ebcc7d204697ec9bec15fd6d75", + "authors": [ + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "tools/azure_dependencies.sh": { + "a": 1, + "d": 3 + }, + "tools/github_actions_dependencies.sh": { + "a": 0, + "d": 4 + }, + "tools/github_actions_env_vars.sh": { + "a": 1, + "d": 1 + }, + "tools/install_pre_requirements.sh": { + "a": 2, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13431.json b/doc/sphinxext/prs/13431.json new file mode 100644 index 00000000000..f8fb6f633f9 --- /dev/null +++ b/doc/sphinxext/prs/13431.json @@ -0,0 +1,59 @@ +{ + "merge_commit_sha": "34e2743d7f1a1684f6359520392fd437bf2cd92f", + "authors": [ + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".github/workflows/tests.yml": { + "a": 13, + "d": 7 + }, + ".pre-commit-config.yaml": { + "a": 2, + "d": 2 + }, + "doc/sphinxext/related_software.py": { + "a": 0, + "d": 1 + }, + "environment.yml": { + "a": 2, + "d": 0 + }, + "mne/conftest.py": { + "a": 5, + "d": 0 + }, + "mne/decoding/tests/test_receptive_field.py": { + "a": 2, + "d": 2 + }, + "mne/viz/backends/_pyvista.py": { + "a": 3, + "d": 0 + }, + "mne/viz/backends/tests/test_renderer.py": { + "a": 1, + "d": 0 + }, + "tools/circleci_dependencies.sh": { + "a": 1, + "d": 1 + }, + "tools/github_actions_dependencies.sh": { + "a": 2, + "d": 0 + }, + "tools/hooks/update_environment_file.py": { + "a": 2, + "d": 5 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13432.json b/doc/sphinxext/prs/13432.json new file mode 100644 index 00000000000..a1f9475b5c1 --- /dev/null +++ b/doc/sphinxext/prs/13432.json @@ -0,0 +1,91 @@ +{ + "merge_commit_sha": "51b6a5c5fe711d10e959f1669960b4506cb4ad6e", + "authors": [ + { + "n": "github-actions[bot]", + "e": "41898282+github-actions[bot]@users.noreply.github.com" + } + ], + "changes": { + "doc/sphinxext/prs/13350.json": { + "a": 51, + "d": 0 + }, + "doc/sphinxext/prs/13375.json": { + "a": 27, + "d": 0 + }, + "doc/sphinxext/prs/13395.json": { + "a": 27, + "d": 0 + }, + "doc/sphinxext/prs/13398.json": { + "a": 75, + "d": 0 + }, + "doc/sphinxext/prs/13403.json": { + "a": 107, + "d": 0 + }, + "doc/sphinxext/prs/13404.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13405.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13407.json": { + "a": 107, + "d": 0 + }, + "doc/sphinxext/prs/13409.json": { + "a": 47, + "d": 0 + }, + "doc/sphinxext/prs/13410.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13411.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13412.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13413.json": { + "a": 19, + "d": 0 + }, + "doc/sphinxext/prs/13416.json": { + "a": 27, + "d": 0 + }, + "doc/sphinxext/prs/13420.json": { + "a": 19, + "d": 0 + }, + "doc/sphinxext/prs/13423.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13424.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13426.json": { + "a": 31, + "d": 0 + }, + "doc/sphinxext/prs/13427.json": { + "a": 15, + "d": 0 + }, + "doc/sphinxext/prs/13428.json": { + "a": 35, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13434.json b/doc/sphinxext/prs/13434.json new file mode 100644 index 00000000000..3995a187bc2 --- /dev/null +++ b/doc/sphinxext/prs/13434.json @@ -0,0 +1,31 @@ +{ + "merge_commit_sha": "4fdde3a1cc87c66263d9b0c663d6a81abfcd89b5", + "authors": [ + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".pre-commit-config.yaml": { + "a": 1, + "d": 1 + }, + "mne/conftest.py": { + "a": 1, + "d": 1 + }, + "mne/preprocessing/tests/test_maxwell.py": { + "a": 7, + "d": 0 + }, + "tools/install_pre_requirements.sh": { + "a": 7, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13435.json b/doc/sphinxext/prs/13435.json new file mode 100644 index 00000000000..fba54c8e7a7 --- /dev/null +++ b/doc/sphinxext/prs/13435.json @@ -0,0 +1,47 @@ +{ + "merge_commit_sha": "61bc8b8755da982491d4cebf940bbde160b98e1a", + "authors": [ + { + "n": "Clemens Brunner", + "e": null + }, + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "doc/changes/dev/13435.newfeature.rst": { + "a": 1, + "d": 0 + }, + "environment.yml": { + "a": 1, + "d": 1 + }, + "mne/conftest.py": { + "a": 1, + "d": 1 + }, + "mne/export/_edf_bdf.py": { + "a": 75, + "d": 34 + }, + "mne/export/_export.py": { + "a": 22, + "d": 16 + }, + "mne/export/tests/test_export.py": { + "a": 48, + "d": 0 + }, + "pyproject.toml": { + "a": 2, + "d": 2 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13436.json b/doc/sphinxext/prs/13436.json new file mode 100644 index 00000000000..e42a8e1f9e8 --- /dev/null +++ b/doc/sphinxext/prs/13436.json @@ -0,0 +1,27 @@ +{ + "merge_commit_sha": "f7df4e5cc88bfb6795932ebbd7a3e72fdaff39d1", + "authors": [ + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".github/workflows/check_changelog.yml": { + "a": 4, + "d": 1 + }, + "mne/datasets/tests/test_datasets.py": { + "a": 3, + "d": 3 + }, + "mne/surface.py": { + "a": 3, + "d": 8 + }, + "tools/install_pre_requirements.sh": { + "a": 1, + "d": 7 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13437.json b/doc/sphinxext/prs/13437.json new file mode 100644 index 00000000000..d522701eb73 --- /dev/null +++ b/doc/sphinxext/prs/13437.json @@ -0,0 +1,43 @@ +{ + "merge_commit_sha": "49b09fb6e0f6353f49239ee7a35a08b955c496ac", + "authors": [ + { + "n": "Clemens Brunner", + "e": null + }, + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "environment.yml": { + "a": 1, + "d": 1 + }, + "mne/conftest.py": { + "a": 1, + "d": 1 + }, + "mne/export/_edf_bdf.py": { + "a": 75, + "d": 34 + }, + "mne/export/_export.py": { + "a": 22, + "d": 16 + }, + "mne/export/tests/test_export.py": { + "a": 48, + "d": 0 + }, + "pyproject.toml": { + "a": 2, + "d": 2 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13439.json b/doc/sphinxext/prs/13439.json new file mode 100644 index 00000000000..c1b249d43df --- /dev/null +++ b/doc/sphinxext/prs/13439.json @@ -0,0 +1,15 @@ +{ + "merge_commit_sha": "adc01cdc40cdaaf00d39108923dce352bd3091b2", + "authors": [ + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".circleci/config.yml": { + "a": 2, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13440.json b/doc/sphinxext/prs/13440.json new file mode 100644 index 00000000000..480fdfa9bbb --- /dev/null +++ b/doc/sphinxext/prs/13440.json @@ -0,0 +1,63 @@ +{ + "merge_commit_sha": "231f2247f873094ef225ab0b364fcc073386e397", + "authors": [ + { + "n": "Johannes Herforth", + "e": "johannes@herforth.net" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "azure-pipelines.yml": { + "a": 2, + "d": 2 + }, + "doc/changes/dev/13440.bugfix.rst": { + "a": 1, + "d": 0 + }, + "doc/changes/names.inc": { + "a": 1, + "d": 0 + }, + "doc/install/advanced.rst": { + "a": 1, + "d": 1 + }, + "mne/datasets/_fetch.py": { + "a": 2, + "d": 2 + }, + "mne/datasets/_fsaverage/base.py": { + "a": 2, + "d": 2 + }, + "mne/datasets/_phantom/base.py": { + "a": 1, + "d": 1 + }, + "mne/datasets/config.py": { + "a": 26, + "d": 26 + }, + "mne/datasets/utils.py": { + "a": 1, + "d": 1 + }, + "tools/get_minimal_commands.sh": { + "a": 2, + "d": 2 + }, + "tools/github_actions_dependencies.sh": { + "a": 1, + "d": 0 + }, + "tools/install_pre_requirements.sh": { + "a": 2, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13442.json b/doc/sphinxext/prs/13442.json new file mode 100644 index 00000000000..ebc5cb550e3 --- /dev/null +++ b/doc/sphinxext/prs/13442.json @@ -0,0 +1,19 @@ +{ + "merge_commit_sha": "f3c00cc7996b48f3c8166269c8d0c1d5b772edea", + "authors": [ + { + "n": "dependabot[bot]", + "e": "49699333+dependabot[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".github/workflows/codeql-analysis.yml": { + "a": 3, + "d": 3 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13443.json b/doc/sphinxext/prs/13443.json new file mode 100644 index 00000000000..977425f1466 --- /dev/null +++ b/doc/sphinxext/prs/13443.json @@ -0,0 +1,15 @@ +{ + "merge_commit_sha": "06d09def3a2b9cbbae2b0a4af77b4ba0d81c228a", + "authors": [ + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + } + ], + "changes": { + ".pre-commit-config.yaml": { + "a": 1, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13445.json b/doc/sphinxext/prs/13445.json new file mode 100644 index 00000000000..02c75b4862f --- /dev/null +++ b/doc/sphinxext/prs/13445.json @@ -0,0 +1,55 @@ +{ + "merge_commit_sha": "7fb19a1a7dbf4b8d710dd71a88a1b8ee73e1e100", + "authors": [ + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + }, + { + "n": "autofix-ci[bot]", + "e": "114827586+autofix-ci[bot]@users.noreply.github.com" + } + ], + "changes": { + "doc/changes/dev/13445.newfeature.rst": { + "a": 1, + "d": 0 + }, + "doc/install/installers.rst": { + "a": 7, + "d": 7 + }, + "mne/beamformer/tests/test_dics.py": { + "a": 2, + "d": 0 + }, + "mne/beamformer/tests/test_lcmv.py": { + "a": 3, + "d": 1 + }, + "mne/gui/_coreg.py": { + "a": 1, + "d": 10 + }, + "mne/gui/tests/test_coreg.py": { + "a": 1, + "d": 7 + }, + "mne/minimum_norm/tests/test_inverse.py": { + "a": 46, + "d": 12 + }, + "mne/minimum_norm/tests/test_resolution_matrix.py": { + "a": 2, + "d": 0 + }, + "mne/minimum_norm/tests/test_time_frequency.py": { + "a": 1, + "d": 0 + }, + "mne/tests/test_surface.py": { + "a": 1, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13446.json b/doc/sphinxext/prs/13446.json new file mode 100644 index 00000000000..5a9318f44a6 --- /dev/null +++ b/doc/sphinxext/prs/13446.json @@ -0,0 +1,19 @@ +{ + "merge_commit_sha": "3cfac64bbc778b0c52dcd76f4b4799cc59226fae", + "authors": [ + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "azure-pipelines.yml": { + "a": 2, + "d": 2 + }, + "tools/github_actions_dependencies.sh": { + "a": 0, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13448.json b/doc/sphinxext/prs/13448.json new file mode 100644 index 00000000000..04779aef613 --- /dev/null +++ b/doc/sphinxext/prs/13448.json @@ -0,0 +1,35 @@ +{ + "merge_commit_sha": "aa2d977c794a6e25d3b0855e523b69141d6416ad", + "authors": [ + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + }, + { + "n": "autofix-ci[bot]", + "e": "114827586+autofix-ci[bot]@users.noreply.github.com" + } + ], + "changes": { + "doc/changes/dev/13448.newfeature.rst": { + "a": 1, + "d": 0 + }, + "mne/io/artemis123/tests/test_artemis123.py": { + "a": 1, + "d": 1 + }, + "mne/io/eeglab/tests/test_eeglab.py": { + "a": 10, + "d": 15 + }, + "mne/io/nihon/nihon.py": { + "a": 5, + "d": 3 + }, + "mne/time_frequency/tests/test_tfr.py": { + "a": 1, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13451.json b/doc/sphinxext/prs/13451.json new file mode 100644 index 00000000000..1394676a859 --- /dev/null +++ b/doc/sphinxext/prs/13451.json @@ -0,0 +1,43 @@ +{ + "merge_commit_sha": "54644a5d36027f9ee5b672a15e998768b39b745c", + "authors": [ + { + "n": "Thomas S. Binns", + "e": "t.s.binns@outlook.com" + }, + { + "n": "autofix-ci[bot]", + "e": "114827586+autofix-ci[bot]@users.noreply.github.com" + }, + { + "n": "Daniel McCloy", + "e": "dan@mccloy.info" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".github/workflows/spec_zero.yml": { + "a": 62, + "d": 0 + }, + ".yamllint.yml": { + "a": 2, + "d": 0 + }, + "doc/changes/dev/13451.other.rst": { + "a": 1, + "d": 0 + }, + "pyproject.toml": { + "a": 1, + "d": 1 + }, + "tools/dev/spec_zero_update_versions.py": { + "a": 258, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13452.json b/doc/sphinxext/prs/13452.json new file mode 100644 index 00000000000..01a919c507b --- /dev/null +++ b/doc/sphinxext/prs/13452.json @@ -0,0 +1,67 @@ +{ + "merge_commit_sha": "4fb5442b12d38427c4f1e818e5d5944e59323ec3", + "authors": [ + { + "n": "Richard Höchenberger", + "e": "richard.hoechenberger@gmail.com" + }, + { + "n": "autofix-ci[bot]", + "e": "114827586+autofix-ci[bot]@users.noreply.github.com" + }, + { + "n": "Daniel McCloy", + "e": "dan@mccloy.info" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".pre-commit-config.yaml": { + "a": 1, + "d": 1 + }, + "azure-pipelines.yml": { + "a": 3, + "d": 3 + }, + "doc/changes/dev/13452.other.rst": { + "a": 3, + "d": 0 + }, + "doc/development/contributing.rst": { + "a": 2, + "d": 2 + }, + "doc/sphinxext/related_software.txt": { + "a": 37, + "d": 0 + }, + "mne/utils/tests/test_config.py": { + "a": 5, + "d": 1 + }, + "pyproject.toml": { + "a": 68, + "d": 67 + }, + "tools/azure_dependencies.sh": { + "a": 2, + "d": 2 + }, + "tools/circleci_dependencies.sh": { + "a": 7, + "d": 12 + }, + "tools/github_actions_dependencies.sh": { + "a": 12, + "d": 5 + }, + "tools/hooks/update_environment_file.py": { + "a": 1, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13453.json b/doc/sphinxext/prs/13453.json new file mode 100644 index 00000000000..7d51a84a459 --- /dev/null +++ b/doc/sphinxext/prs/13453.json @@ -0,0 +1,15 @@ +{ + "merge_commit_sha": "447a3e279e72fa9eac01c03b0f8dd20eadc87dff", + "authors": [ + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + } + ], + "changes": { + ".pre-commit-config.yaml": { + "a": 2, + "d": 2 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13456.json b/doc/sphinxext/prs/13456.json new file mode 100644 index 00000000000..1779fe8fef4 --- /dev/null +++ b/doc/sphinxext/prs/13456.json @@ -0,0 +1,31 @@ +{ + "merge_commit_sha": "e6db33a24114d54d7b0baf4c6f2e5a8368acafd5", + "authors": [ + { + "n": "Stefan Appelhoff", + "e": "stefan.appelhoff@mailbox.org" + } + ], + "changes": { + "doc/changes/dev/13456.newfeature.rst": { + "a": 1, + "d": 0 + }, + "mne/_fiff/meas_info.py": { + "a": 7, + "d": 2 + }, + "mne/channels/channels.py": { + "a": 24, + "d": 3 + }, + "mne/channels/montage.py": { + "a": 9, + "d": 3 + }, + "mne/channels/tests/test_channels.py": { + "a": 5, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13458.json b/doc/sphinxext/prs/13458.json new file mode 100644 index 00000000000..7f4af2859b6 --- /dev/null +++ b/doc/sphinxext/prs/13458.json @@ -0,0 +1,35 @@ +{ + "merge_commit_sha": "147ff5995f91a0a2b1dcce15b16980c2a03143a6", + "authors": [ + { + "n": null, + "e": "myd7349@gmail.com" + }, + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + }, + { + "n": "Daniel McCloy", + "e": "dan@mccloy.info" + } + ], + "changes": { + "doc/changes/dev/13458.apichange.rst": { + "a": 1, + "d": 0 + }, + "mne/io/nihon/nihon.py": { + "a": 17, + "d": 14 + }, + "mne/utils/docs.py": { + "a": 5, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13459.json b/doc/sphinxext/prs/13459.json new file mode 100644 index 00000000000..d21ccc9a4e6 --- /dev/null +++ b/doc/sphinxext/prs/13459.json @@ -0,0 +1,39 @@ +{ + "merge_commit_sha": "2bc159e6210334af85edcfc179ebaf825bab5d50", + "authors": [ + { + "n": "github-actions[bot]", + "e": "41898282+github-actions[bot]@users.noreply.github.com" + }, + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + ".github/workflows/credit.yml": { + "a": 1, + "d": 1 + }, + ".github/workflows/spec_zero.yml": { + "a": 1, + "d": 1 + }, + "environment.yml": { + "a": 3, + "d": 3 + }, + "mne/viz/backends/_pyvista.py": { + "a": 2, + "d": 1 + }, + "pyproject.toml": { + "a": 9, + "d": 9 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13460.json b/doc/sphinxext/prs/13460.json new file mode 100644 index 00000000000..475522df4ed --- /dev/null +++ b/doc/sphinxext/prs/13460.json @@ -0,0 +1,47 @@ +{ + "merge_commit_sha": "65a717ced7b93d40cde68b13d037d0bba8690ba0", + "authors": [ + { + "n": "Johannes Herforth", + "e": "johannes@herforth.net" + }, + { + "n": "Thomas S. Binns", + "e": "t.s.binns@outlook.com" + } + ], + "changes": { + "doc/changes/dev/13460.newfeature.rst": { + "a": 1, + "d": 0 + }, + "mne/io/base.py": { + "a": 19, + "d": 17 + }, + "mne/preprocessing/ica.py": { + "a": 2, + "d": 0 + }, + "mne/viz/_figure.py": { + "a": 5, + "d": 1 + }, + "mne/viz/ica.py": { + "a": 9, + "d": 0 + }, + "mne/viz/raw.py": { + "a": 8, + "d": 1 + }, + "mne/viz/tests/test_ica.py": { + "a": 16, + "d": 0 + }, + "mne/viz/tests/test_raw.py": { + "a": 17, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13462.json b/doc/sphinxext/prs/13462.json new file mode 100644 index 00000000000..2617a9e7b75 --- /dev/null +++ b/doc/sphinxext/prs/13462.json @@ -0,0 +1,19 @@ +{ + "merge_commit_sha": "8b1a914d28b164b3ebe21395a9b6dea950147099", + "authors": [ + { + "n": "Daniel McCloy", + "e": null + } + ], + "changes": { + "doc/changes/names.inc": { + "a": 4, + "d": 0 + }, + "doc/overview/people.rst": { + "a": 6, + "d": 1 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13463.json b/doc/sphinxext/prs/13463.json new file mode 100644 index 00000000000..0bbee61cefa --- /dev/null +++ b/doc/sphinxext/prs/13463.json @@ -0,0 +1,31 @@ +{ + "merge_commit_sha": "e50d56542864e727705faf71501a2789bd59cc6f", + "authors": [ + { + "n": "Michael Straube", + "e": null + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "doc/changes/dev/13463.newfeature.rst": { + "a": 1, + "d": 0 + }, + "doc/changes/names.inc": { + "a": 1, + "d": 0 + }, + "mne/channels/channels.py": { + "a": 11, + "d": 1 + }, + "mne/channels/tests/test_channels.py": { + "a": 11, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13464.json b/doc/sphinxext/prs/13464.json new file mode 100644 index 00000000000..a7d8d457db3 --- /dev/null +++ b/doc/sphinxext/prs/13464.json @@ -0,0 +1,15 @@ +{ + "merge_commit_sha": "6ec537f525050db438256be0254ee3bff707463f", + "authors": [ + { + "n": "dependabot[bot]", + "e": "49699333+dependabot[bot]@users.noreply.github.com" + } + ], + "changes": { + ".github/workflows/release.yml": { + "a": 2, + "d": 2 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13465.json b/doc/sphinxext/prs/13465.json new file mode 100644 index 00000000000..af7769ae5ed --- /dev/null +++ b/doc/sphinxext/prs/13465.json @@ -0,0 +1,15 @@ +{ + "merge_commit_sha": "610ebe5193457909485db37dcc0f750c0e6ecaaf", + "authors": [ + { + "n": "pre-commit-ci[bot]", + "e": "66853113+pre-commit-ci[bot]@users.noreply.github.com" + } + ], + "changes": { + ".pre-commit-config.yaml": { + "a": 2, + "d": 2 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13466.json b/doc/sphinxext/prs/13466.json new file mode 100644 index 00000000000..b55afb98fbb --- /dev/null +++ b/doc/sphinxext/prs/13466.json @@ -0,0 +1,23 @@ +{ + "merge_commit_sha": "3d7722fecf2bf1d99e1a526654087912836d839a", + "authors": [ + { + "n": "Michael Straube", + "e": null + } + ], + "changes": { + "doc/changes/dev/13466.bugfix.rst": { + "a": 1, + "d": 0 + }, + "mne/_fiff/reference.py": { + "a": 1, + "d": 1 + }, + "mne/_fiff/tests/test_reference.py": { + "a": 4, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13469.json b/doc/sphinxext/prs/13469.json new file mode 100644 index 00000000000..d15a511194a --- /dev/null +++ b/doc/sphinxext/prs/13469.json @@ -0,0 +1,23 @@ +{ + "merge_commit_sha": "f4a3f3f46477a8fda6b1adff0a8094faa670bec0", + "authors": [ + { + "n": "Scott Huberty", + "e": null + } + ], + "changes": { + "doc/changes/dev/13469.bugfix.rst": { + "a": 1, + "d": 0 + }, + "mne/io/eyelink/_utils.py": { + "a": 10, + "d": 3 + }, + "mne/preprocessing/eyetracking/tests/test_calibration.py": { + "a": 34, + "d": 0 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13470.json b/doc/sphinxext/prs/13470.json new file mode 100644 index 00000000000..b2634e21f57 --- /dev/null +++ b/doc/sphinxext/prs/13470.json @@ -0,0 +1,23 @@ +{ + "merge_commit_sha": "f09b3da1a23757b76fd0adfdb9c6ed29db14af29", + "authors": [ + { + "n": "Michael Straube", + "e": null + }, + { + "n": "Eric Larson", + "e": "larson.eric.d@gmail.com" + } + ], + "changes": { + "doc/changes/dev/13470.bugfix.rst": { + "a": 1, + "d": 0 + }, + "mne/viz/topomap.py": { + "a": 2, + "d": 5 + } + } +} \ No newline at end of file diff --git a/doc/sphinxext/prs/13475.json b/doc/sphinxext/prs/13475.json new file mode 100644 index 00000000000..fc952399543 --- /dev/null +++ b/doc/sphinxext/prs/13475.json @@ -0,0 +1,15 @@ +{ + "merge_commit_sha": "1815534a3252faf159594ae5d9480b529ab9fb3d", + "authors": [ + { + "n": "Daniel McCloy", + "e": null + } + ], + "changes": { + ".mailmap": { + "a": 1, + "d": 1 + } + } +} \ No newline at end of file diff --git a/mne/datasets/config.py b/mne/datasets/config.py index 53bea629097..62937779692 100644 --- a/mne/datasets/config.py +++ b/mne/datasets/config.py @@ -87,7 +87,7 @@ # update the checksum in the MNE_DATASETS dict below, and change version # here: ↓↓↓↓↓↓↓↓ RELEASES = dict( - testing="0.166", + testing="0.167", misc="0.27", phantom_kit="0.2", ucl_opm_auditory="0.2", @@ -115,7 +115,7 @@ # Testing and misc are at the top as they're updated most often MNE_DATASETS["testing"] = dict( archive_name=f"{TESTING_VERSIONED}.tar.gz", - hash="md5:273c5919cf74198a39146e9cbc146ce0", + hash="md5:d82318a83b436ca2c7ca8420487c05c2", url=( "https://codeload.github.com/mne-tools/mne-testing-data/" f"tar.gz/{RELEASES['testing']}" diff --git a/mne/io/nihon/nihon.py b/mne/io/nihon/nihon.py index 91db6a083d2..0c474a4b250 100644 --- a/mne/io/nihon/nihon.py +++ b/mne/io/nihon/nihon.py @@ -162,9 +162,14 @@ def _read_21e_file(fname): break else: warn( - f"Could not decode 21E file as one of {_encodings}; " + f"Could not decode {e_fname} as one of {_encodings}; " f"Default channel names are chosen." ) + else: + warn( + f"Could not find {e_fname} containing channel definitions; " + f"Default channel names are chosen." + ) return _chan_labels @@ -280,7 +285,7 @@ def _read_nihon_header(fname): "Cannot read NK file with different sfreq in each datablock" ) - return header + return header, _chan_labels def _read_event_log_block(fid, t_block, version): @@ -380,13 +385,13 @@ def _map_ch_to_type(ch_name): return "eeg" -def _map_ch_to_specs(ch_name): +def _map_ch_to_specs(ch_name, chan_labels_upper): unit_mult = 1e-3 phys_min = -12002.9 phys_max = 12002.56 dig_min = -32768 - if ch_name.upper() in _default_chan_labels: - idx = _default_chan_labels.index(ch_name.upper()) + if ch_name.upper() in chan_labels_upper: + idx = chan_labels_upper.index(ch_name.upper()) if (idx < 42 or idx > 73) and idx not in [76, 77]: unit_mult = 1e-6 phys_min = -3200 @@ -432,7 +437,9 @@ def __init__(self, fname, preload=False, *, encoding="utf-8", verbose=None): data_name = fname.name logger.info(f"Loading {data_name}") - header = _read_nihon_header(fname) + # chan_labels are electrode codes defined in the .21E file. + # It is not the same as header["ch_names"]. + header, chan_labels = _read_nihon_header(fname) metadata = _read_nihon_metadata(fname) # n_chan = len(header['ch_names']) + 1 @@ -447,8 +454,9 @@ def __init__(self, fname, preload=False, *, encoding="utf-8", verbose=None): if "meas_date" in metadata: with info._unlock(): info["meas_date"] = metadata["meas_date"] - chs = {x: _map_ch_to_specs(x) for x in info["ch_names"]} + chan_labels_upper = [x.upper() for x in chan_labels] + chs = {x: _map_ch_to_specs(x, chan_labels_upper) for x in info["ch_names"]} cal = np.array([chs[x]["cal"] for x in info["ch_names"]], float)[:, np.newaxis] offsets = np.array([chs[x]["offset"] for x in info["ch_names"]], float)[ :, np.newaxis diff --git a/mne/io/nihon/tests/test_nihon.py b/mne/io/nihon/tests/test_nihon.py index ba3bc204d2c..28996cfb49a 100644 --- a/mne/io/nihon/tests/test_nihon.py +++ b/mne/io/nihon/tests/test_nihon.py @@ -30,7 +30,7 @@ def test_nihon_eeg(): raw_edf.drop_channels(["Events/Markers"]) assert raw._data.shape == raw_edf._data.shape - assert raw.info["sfreq"] == raw.info["sfreq"] + assert raw.info["sfreq"] == raw_edf.info["sfreq"] # a couple of ch names differ in the EDF edf_ch_names = {"EEG Mark1": "$A2", "EEG Mark2": "$A1"} raw_edf.rename_channels(edf_ch_names) @@ -48,7 +48,7 @@ def test_nihon_eeg(): raw = read_raw_nihon(fname_edf, preload=True) with pytest.raises(ValueError, match="Not a valid Nihon Kohden EEG file"): - raw = _read_nihon_header(fname_edf) + header, _ = _read_nihon_header(fname_edf) bad_fname = data_path / "eximia" / "text_eximia.nxe" @@ -90,3 +90,38 @@ def return_channel_duplicates(fname): ) with pytest.warns(RuntimeWarning, match=msg): read_raw_nihon(fname) + + +@testing.requires_testing_data +def test_nihon_calibration(): + """Test handling of calibration factor and range in Nihon Kohden EEG files.""" + fname = data_path / "NihonKohden" / "DA00100E.EEG" + raw = read_raw_nihon(fname, preload=True, encoding="cp936") + + Fp1_idx = raw.ch_names.index("Fp1") + M1_idx = raw.ch_names.index("M1") + M2_idx = raw.ch_names.index("M2") + + Fp1_info = raw.info["chs"][Fp1_idx] + M1_info = raw.info["chs"][M1_idx] + M2_info = raw.info["chs"][M2_idx] + + # M1, M2 are EEG channels, just like Fp1. + # So they should have the same calibration factor and physical range. + assert_allclose(M1_info["cal"], Fp1_info["cal"]) + assert_allclose(M2_info["cal"], Fp1_info["cal"]) + assert_allclose(M1_info["range"], Fp1_info["range"]) + assert_allclose(M2_info["range"], Fp1_info["range"]) + + fname_edf = data_path / "NihonKohden" / "DA00100E.EDF" + raw_edf = read_raw_edf(fname_edf, preload=True) + raw_edf.drop_channels(["Events/Markers"]) + # a couple of ch names differ in the EDF + edf_ch_names = {"EEG Mark1": "$M1", "EEG Mark2": "$M2"} + raw_edf.rename_channels(edf_ch_names) + + assert raw.ch_names == raw_edf.ch_names + assert raw._data.shape == raw_edf._data.shape + assert raw.info["sfreq"] == raw_edf.info["sfreq"] + + assert_allclose(raw.get_data(), raw_edf.get_data()) diff --git a/mne/preprocessing/ica.py b/mne/preprocessing/ica.py index 1ebe20a32fe..6805007927e 100644 --- a/mne/preprocessing/ica.py +++ b/mne/preprocessing/ica.py @@ -2286,7 +2286,7 @@ def _apply_raw(self, raw, include, exclude, n_pca_components, start, stop): start, stop = _check_start_stop(raw, start, stop) picks = pick_types( - raw.info, meg=False, include=self.ch_names, exclude="bads", ref_meg=False + raw.info, meg=False, include=self.ch_names, exclude=[], ref_meg=False ) data = raw[picks, start:stop][0] @@ -2300,7 +2300,7 @@ def _apply_epochs(self, epochs, include, exclude, n_pca_components): _check_preload(epochs, "ica.apply") picks = pick_types( - epochs.info, meg=False, ref_meg=False, include=self.ch_names, exclude="bads" + epochs.info, meg=False, ref_meg=False, include=self.ch_names, exclude=[] ) # special case where epochs come picked but fit was 'unpicked'. @@ -2323,7 +2323,7 @@ def _apply_epochs(self, epochs, include, exclude, n_pca_components): def _apply_evoked(self, evoked, include, exclude, n_pca_components): """Aux method.""" picks = pick_types( - evoked.info, meg=False, ref_meg=False, include=self.ch_names, exclude="bads" + evoked.info, meg=False, ref_meg=False, include=self.ch_names, exclude=[] ) # special case where evoked come picked but fit was 'unpicked'. diff --git a/mne/preprocessing/tests/test_ica.py b/mne/preprocessing/tests/test_ica.py index 91dffe93078..ab8d401e019 100644 --- a/mne/preprocessing/tests/test_ica.py +++ b/mne/preprocessing/tests/test_ica.py @@ -1024,6 +1024,15 @@ def f(x, y): ica = ICA(n_components=0.99, max_iter="auto") ica.fit(raw_, picks=picks, reject_by_annotation=True) + # test apply when fit was run including marked bad channels + epochs_ = Epochs( + raw=raw_, events=make_fixed_length_events(raw_), baseline=None, preload=True + ) + evoked_ = epochs_.average() + ica.apply(raw_) + ica.apply(epochs_) + ica.apply(evoked_) + def test_get_explained_variance_ratio(tmp_path, short_raw_epochs): """Test ICA.get_explained_variance_ratio().""" diff --git a/pyproject.toml b/pyproject.toml index d612eb553bc..38ec45e76f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,10 @@ doc = [ "pydata_sphinx_theme >= 0.15.2", "pygments >= 2.13", "pytest", + "pyvistaqt", "pyxdf", "pyzmq != 24.0.0", + "scikit-learn", "seaborn != 0.11.2", "selenium >= 4.27.1", "sphinx >= 6", diff --git a/tutorials/io/60_ctf_bst_auditory.py b/tutorials/io/60_ctf_bst_auditory.py index a9d86594669..4c3249996aa 100644 --- a/tutorials/io/60_ctf_bst_auditory.py +++ b/tutorials/io/60_ctf_bst_auditory.py @@ -16,10 +16,6 @@ - Each run contains 200 regular beeps and 40 easy deviant beeps. - Random ISI: between 0.7s and 1.7s seconds, uniformly distributed. - Button pressed when detecting a deviant with the right index finger. - -The specifications of this dataset were discussed initially on the -`FieldTrip bug tracker -`__. """ # Authors: Mainak Jas # Eric Larson