Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into stats
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Oct 6, 2023
2 parents 13d36e2 + 5f7c9b9 commit c5eee5d
Show file tree
Hide file tree
Showing 129 changed files with 2,634 additions and 1,608 deletions.
30 changes: 15 additions & 15 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
*lcmv*.py @britta-wstnr

# Channels
/mne/channels @agramfort @mscheltienne
/mne/channels @agramfort @mscheltienne @dengemann

# Core sensor-space classes
/mne/epochs.py @drammock @agramfort @mscheltienne
/mne/evoked.py @drammock @agramfort @mscheltienne
/mne/io/*.* @drammock @cbrnr @agramfort @mscheltienne
/mne/epochs.py @drammock @agramfort @mscheltienne @dengemann
/mne/evoked.py @drammock @agramfort @mscheltienne @dengemann
/mne/io/*.* @drammock @cbrnr @agramfort @mscheltienne @dengemann

# Current-source density
/mne/preprocessing/_csd.py @alexrockhill
/mne/preprocessing/_csd.py @alexrockhill @dengemann

# Decoding
/mne/decoding/csp.py @cbrnr @agramfort
/mne/decoding/csp.py @cbrnr @agramfort @dengemann

# fNIRS
/mne/preprocessing/nirs @rob-luke
Expand Down Expand Up @@ -74,14 +74,14 @@
/mne/minimum_norm @agramfort

# Preprocessing
/mne/preprocessing/ica.py @cbrnr @adam2392 @agramfort @mscheltienne
/mne/preprocessing/infomax_.py @cbrnr @adam2392 @mscheltienne
/mne/preprocessing/ica.py @cbrnr @adam2392 @agramfort @mscheltienne @dengemann
/mne/preprocessing/infomax_.py @cbrnr @adam2392 @mscheltienne @dengemann
/mne/preprocessing/*annotate*.py @mscheltienne
/mne/preprocessing/bads.py @mscheltienne
/mne/preprocessing/e*g.py @mscheltienne

# Report
/mne/report @hoechenberger
/mne/report @hoechenberger @dengemann

# Simulation
/mne/simulation/ @agramfort
Expand All @@ -96,22 +96,22 @@
/mne/time_frequency @drammock @adam2392 @mscheltienne

# Viz
/mne/viz @drammock
/mne/viz @drammock @dengemann
/mne/viz/_brain @larsoner @wmvanvliet
/mne/viz/ui_events.py @wmvanvliet
/tutorials/visualization @larsoner @wmvanvliet
/examples/visualization @larsoner
/tutorials/visualization @larsoner @wmvanvliet @dengemann
/examples/visualization @larsoner @dengemann

#########################
# Project-level / other #
#########################

# Examples and tutorials
/examples @drammock @agramfort
/tutorials @drammock @agramfort
/examples @drammock @agramfort @dengemann
/tutorials @drammock @agramfort @dengemann

# Non-tutorial documentation text and infrastructure
/doc @larsoner @drammock @agramfort
/doc @larsoner @drammock @agramfort @dengemann
/logo @drammock

# Installation documentation
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ recursive-include tutorials *.py
recursive-include tutorials *.txt

recursive-include mne *.py
recursive-include mne *.pyi
recursive-include mne/data *
recursive-include mne/icons *
recursive-include mne/data/helmets *
Expand Down
2 changes: 1 addition & 1 deletion doc/_static/js/contrib-avatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function putAvatarsInPage() {
}
// finish
outer.append(title, inner);
document.getElementById("institution-logos").after(outer);
document.body.append(outer);
}

putAvatarsInPage();
2 changes: 2 additions & 0 deletions doc/_templates/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@
</div>
{% endfor %}
</div>
<!-- contributors -->
{% include 'avatars.html' %}
</div>
3 changes: 0 additions & 3 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@
{%- block scripts_end %}
{{ super() }}
<script src="https://mne.tools/versionwarning.js"></script>
{% if pagename == 'index' %}
<script src="{{ pathto('_static/js/contrib-avatars.js', 1) }}"></script>
{% endif %}
{%- endblock %}
8 changes: 7 additions & 1 deletion doc/changes/devel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,28 @@ Version 1.6.dev0 (development)

Enhancements
~~~~~~~~~~~~
- Improve tests for saving splits with `Epochs` (:gh:`11884` by `Dmitrii Altukhov`_)
- Improve tests for saving splits with :class:`mne.Epochs` (:gh:`11884` by `Dmitrii Altukhov`_)
- Added functionality for linking interactive figures together, such that changing one figure will affect another, see :ref:`tut-ui-events` and :mod:`mne.viz.ui_events`. Current figures implementing UI events are :func:`mne.viz.plot_topomap` and :func:`mne.viz.plot_source_estimates` (:gh:`11685` :gh:`11891` by `Marijn van Vliet`_)
- HTML anchors for :class:`mne.Report` now reflect the ``section-title`` of the report items rather than using a global incrementor ``global-N`` (:gh:`11890` by `Eric Larson`_)
- Added public :func:`mne.io.write_info` to complement :func:`mne.io.read_info` (:gh:`11918` by `Eric Larson`_)
- Added option ``remove_dc`` to to :meth:`Raw.compute_psd() <mne.io.Raw.compute_psd>`, :meth:`Epochs.compute_psd() <mne.Epochs.compute_psd>`, and :meth:`Evoked.compute_psd() <mne.Evoked.compute_psd>`, to allow skipping DC removal when computing Welch or multitaper spectra (:gh:`11769` by `Nikolai Chapochnikov`_)
- Add the possibility to provide a float between 0 and 1 as ``n_grad``, ``n_mag`` and ``n_eeg`` in `~mne.compute_proj_raw`, `~mne.compute_proj_epochs` and `~mne.compute_proj_evoked` to select the number of vectors based on the cumulative explained variance (:gh:`11919` by `Mathieu Scheltienne`_)
- Added support for Artinis fNIRS data files to :func:`mne.io.read_raw_snirf` (:gh:`11926` by `Robert Luke`_)
- Add helpful error messages when using methods on empty :class:`mne.Epochs`-objects (:gh:`11306` by `Martin Schulz`_)
- Add support for passing a :class:`python:dict` as ``sensor_color`` to specify per-channel-type colors in :func:`mne.viz.plot_alignment` (:gh:`12067` by `Eric Larson`_)
- Add inferring EEGLAB files' montage unit automatically based on estimated head radius using :func:`read_raw_eeglab(..., montage_units="auto") <mne.io.read_raw_eeglab>` (:gh:`11925` by `Jack Zhang`_, :gh:`11951` by `Eric Larson`_)
- Add :class:`~mne.time_frequency.EpochsSpectrumArray` and :class:`~mne.time_frequency.SpectrumArray` to support creating power spectra from :class:`NumPy array <numpy.ndarray>` data (:gh:`11803` by `Alex Rockhill`_)
- Add support for writing forward solutions to HDF5 and convenience function :meth:`mne.Forward.save` (:gh:`12036` by `Eric Larson`_)
- Refactored internals of :func:`mne.read_annotations` (:gh:`11964` by `Paul Roujansky`_)
- Enhance :func:`~mne.viz.plot_evoked_field` with a GUI that has controls for time, colormap, and contour lines (:gh:`11942` by `Marijn van Vliet`_)
- Add :class:`mne.viz.ui_events.UIEvent` linking for interactive colorbars, allowing users to link figures and change the colormap and limits interactively. This supports :func:`~mne.viz.plot_evoked_topomap`, :func:`~mne.viz.plot_ica_components`, :func:`~mne.viz.plot_tfr_topomap`, :func:`~mne.viz.plot_projs_topomap`, :meth:`~mne.Evoked.plot_image`, and :meth:`~mne.Epochs.plot_image` (:gh:`12057` by `Santeri Ruuskanen`_)

Bugs
~~~~
- Fix bugs with :func:`mne.preprocessing.realign_raw` where the start of ``other`` was incorrectly cropped; and onsets and durations in ``other.annotations`` were left unsynced with the resampled data (:gh:`11950` by :newcontrib:`Qian Chu`)
- Fix bug where ``encoding`` argument was ignored when reading annotations from an EDF file (:gh:`11958` by :newcontrib:`Andrew Gilbert`)
- Mark tests ``test_adjacency_matches_ft`` and ``test_fetch_uncompressed_file`` as network tests (:gh:`12041` by :newcontrib:`Maksym Balatsko`)
- Fix bug with :func:`mne.channels.read_ch_adjacency` (:gh:`11608` by :newcontrib:`Ivan Zubarev`)
- Fix bugs with saving splits for :class:`~mne.Epochs` (:gh:`11876` by `Dmitrii Altukhov`_)
- Fix bug with multi-plot 3D rendering where only one plot was updated (:gh:`11896` by `Eric Larson`_)
- Fix bug where subject birthdays were not correctly read by :func:`mne.io.read_raw_snirf` (:gh:`11912` by `Eric Larson`_)
Expand All @@ -56,12 +59,15 @@ Bugs
- Fix bug with axis clip box boundaries in :func:`mne.viz.plot_evoked_topo` and related functions (:gh:`11999` by `Eric Larson`_)
- Fix bug with ``subject_info`` when loading data from and exporting to EDF file (:gh:`11952` by `Paul Roujansky`_)
- Fix bug with delayed checking of :class:`info["bads"] <mne.Info>` (:gh:`12038` by `Eric Larson`_)
- Fix bug with :func:`mne.viz.plot_alignment` where ``sensor_colors`` were not handled properly on a per-channel-type basis (:gh:`12067` by `Eric Larson`_)
- Fix handling of channel information in annotations when loading data from and exporting to EDF file (:gh:`11960` :gh:`12017` :gh:`12044` by `Paul Roujansky`_)
- Add missing ``overwrite`` and ``verbose`` parameters to :meth:`Transform.save() <mne.transforms.Transform.save>` (:gh:`12004` by `Marijn van Vliet`_)
- Fix parsing of eye-link :class:`~mne.Annotations` when ``apply_offsets=False`` is provided to :func:`~mne.io.read_raw_eyelink` (:gh:`12003` by `Mathieu Scheltienne`_)
- Correctly prune channel-specific :class:`~mne.Annotations` when creating :class:`~mne.Epochs` without the channel(s) included in the channel specific annotations (:gh:`12010` by `Mathieu Scheltienne`_)
- Fix :func:`~mne.viz.plot_volume_source_estimates` with :class:`~mne.VolSourceEstimate` which include a list of vertices (:gh:`12025` by `Mathieu Scheltienne`_)
- Add support for non-ASCII characters in Annotations, Evoked comments, etc when saving to FIFF format (:gh:`12080` by `Daniel McCloy`_)
- Correctly handle passing ``"eyegaze"`` or ``"pupil"`` to :meth:`mne.io.Raw.pick` (:gh:`12019` by `Scott Huberty`_)
- Fix bug with :func:`~mne.viz.plot_raw` where changing ``MNE_BROWSER_BACKEND`` via :func:`~mne.set_config` would have no effect within a Python session (:gh:`12078` by `Santeri Ruuskanen`_)

API changes
~~~~~~~~~~~
Expand Down
4 changes: 4 additions & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
.. _George O'Neill: https://georgeoneill.github.io

.. _Gonzalo Reina: https://greina.me/

.. _Guillaume Dumas: https://mila.quebec/en/person/guillaume-dumas

.. _Guillaume Favelier: https://github.com/GuillaumeFavelier
Expand All @@ -210,6 +212,8 @@

.. _Ilias Machairas: https://github.com/JungleHippo

.. _Ivan Zubarev: https://github.com/zubara

.. _Ivana Kojcic: https://github.com/ikojcic

.. _Jaakko Leppakangas: https://github.com/jaeilepp
Expand Down
9 changes: 6 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"sphinxcontrib.bibtex",
"sphinxcontrib.youtube",
# homegrown
"contrib_avatars",
"gen_commands",
"gen_names",
"gh_substitutions",
Expand Down Expand Up @@ -200,7 +201,7 @@
"path-like": ":term:`path-like`",
"array-like": ":term:`array_like <numpy:array_like>`",
"Path": ":class:`python:pathlib.Path`",
"bool": ":class:`python:bool`",
"bool": ":ref:`bool <python:typebool>`",
# Matplotlib
"colormap": ":ref:`colormap <matplotlib:colormaps>`",
"color": ":doc:`color <matplotlib:api/colors_api>`",
Expand Down Expand Up @@ -1621,6 +1622,7 @@ def reset_warnings(gallery_conf, fname):
co = "connectivity"
mne_conn = "https://mne.tools/mne-connectivity/stable"
tu = "auto_tutorials"
pr = "preprocessing"
di = "discussions"
sm = "source-modeling"
fw = "forward"
Expand Down Expand Up @@ -1666,7 +1668,7 @@ def reset_warnings(gallery_conf, fname):
f"{tu}/{sd}/plot_phantom_4DBTi.html": f"{tu}/{nv}/90_phantom_4DBTi.html",
f"{tu}/{sd}/plot_brainstorm_auditory.html": f"{tu}/io/60_ctf_bst_auditory.html",
f"{tu}/{sd}/plot_sleep.html": f"{tu}/clinical/60_sleep.html",
f"{tu}/{di}/plot_background_filtering.html": f"{tu}/preprocessing/25_background_filtering.html", # noqa E501
f"{tu}/{di}/plot_background_filtering.html": f"{tu}/{pr}/25_background_filtering.html", # noqa E501
f"{tu}/{di}/plot_background_statistics.html": f"{tu}/{sn}/10_background_stats.html",
f"{tu}/{sn}/plot_stats_cluster_erp.html": f"{tu}/{sn}/20_erp_stats.html",
f"{tu}/{sn}/plot_stats_cluster_1samp_test_time_frequency.html": f"{tu}/{sn}/40_cluster_1samp_time_freq.html", # noqa E501
Expand All @@ -1681,7 +1683,7 @@ def reset_warnings(gallery_conf, fname):
f"{tu}/{si}/plot_creating_data_structures.html": f"{tu}/{si}/10_array_objs.html",
f"{tu}/{si}/plot_point_spread.html": f"{tu}/{si}/70_point_spread.html",
f"{tu}/{si}/plot_dics.html": f"{tu}/{si}/80_dics.html",
f"{tu}/{tf}/plot_eyetracking.html": f"{tu}/preprocessing/90_eyetracking_data.html",
f"{tu}/{tf}/plot_eyetracking.html": f"{tu}/{pr}/90_eyetracking_data.html",
f"{ex}/{co}/mne_inverse_label_connectivity.html": f"{mne_conn}/{ex}/mne_inverse_label_connectivity.html", # noqa E501
f"{ex}/{co}/cwt_sensor_connectivity.html": f"{mne_conn}/{ex}/cwt_sensor_connectivity.html", # noqa E501
f"{ex}/{co}/mixed_source_space_connectivity.html": f"{mne_conn}/{ex}/mixed_source_space_connectivity.html", # noqa E501
Expand All @@ -1692,6 +1694,7 @@ def reset_warnings(gallery_conf, fname):
f"{ex}/{co}/mne_inverse_psi_visual.html": f"{mne_conn}/{ex}/mne_inverse_psi_visual.html", # noqa E501
f"{ex}/{co}/sensor_connectivity.html": f"{mne_conn}/{ex}/sensor_connectivity.html",
f"{ex}/{vi}/publication_figure.html": f"{tu}/{vi}/10_publication_figure.html",
f"{ex}/{vi}/sensor_noise_level.html": f"{tu}/{pr}/50_artifact_correction_ssp.html",
}


Expand Down
7 changes: 7 additions & 0 deletions doc/sphinxext/_avatar_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<html>
<head>
<script src="../_static/js/contrib-avatars.js"></script>
</head>
<body>
</body>
</html>
34 changes: 34 additions & 0 deletions doc/sphinxext/contrib_avatars.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from pathlib import Path

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import WebDriverException


def generate_contrib_avatars(app, config):
"""Render a template webpage with avatars generated by JS and a GitHub API call."""
root = Path(app.srcdir)
infile = root / "sphinxext" / "_avatar_template.html"
outfile = root / "_templates" / "avatars.html"
try:
options = webdriver.ChromeOptions()
options.add_argument("--headless=new")
driver = webdriver.Chrome(options=options)
except WebDriverException:
options = webdriver.FirefoxOptions()
options.add_argument("--headless=new")
driver = webdriver.Firefox(options=options)
driver.get(f"file://{infile}")
wait = WebDriverWait(driver, 20)
wait.until(lambda d: d.find_element(by=By.ID, value="contributor-avatars"))
body = driver.find_element(by=By.TAG_NAME, value="body").get_attribute("innerHTML")
with open(outfile, "w") as fid:
fid.write(body)
driver.quit()


def setup(app):
"""Set up the Sphinx app."""
app.connect("config-inited", generate_contrib_avatars)
return
39 changes: 0 additions & 39 deletions examples/visualization/sensor_noise_level.py

This file was deleted.

Loading

0 comments on commit c5eee5d

Please sign in to comment.