Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/inverse/multi_dipole_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
cov_fname = meg_path / "sample_audvis-shrunk-cov.fif"
bem_dir = data_path / "subjects" / "sample" / "bem"
bem_fname = bem_dir / "sample-5120-5120-5120-bem-sol.fif"
trans_fname = meg_path / "sample_audvis_raw-trans.fif"

###############################################################################
# Read the MEG data from the audvis experiment. Make epochs and evokeds for the
Expand Down Expand Up @@ -102,8 +103,9 @@
cov_fit_right["projs"] = evoked_fit_right.info["projs"]

# Fit the dipoles with the subset of sensors.
dip_left, _ = mne.fit_dipole(evoked_fit_left, cov_fit_left, bem)
dip_right, _ = mne.fit_dipole(evoked_fit_right, cov_fit_right, bem)
kwargs = dict(bem=bem, trans=trans_fname)
dip_left, _ = mne.fit_dipole(evoked_fit_left, cov_fit_left, **kwargs)
dip_right, _ = mne.fit_dipole(evoked_fit_right, cov_fit_right, **kwargs)

###############################################################################
# Now that we have the location and orientations of the dipoles, compute the
Expand Down
6 changes: 3 additions & 3 deletions examples/stats/r_interop.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
.. _r-interop:

============================
Integrating with R via rpy2
============================
===============================
Integrating with R via ``rpy2``
===============================

This example shows how to run a mass-univariate 2-sample t-test on
:class:`~mne.Epochs` data in Python using :func:`scipy.stats.ttest_ind`,
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ doc = [
"pyvistaqt >= 0.11", # released 2023-06-30, no newer version available
"pyxdf",
"pyzmq != 24.0.0",
"rpy2",
"scikit-learn >= 1.4", # released 2024-01-18, will become 1.5 on 2026-05-21
"seaborn >= 0.5, != 0.11.2",
"selenium >= 4.27.1",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this one should move, too -- this is really only needed for making the contrib viz which only CircleCI does on a regular basis. But we can add stuff like this later if it becomes problematic (haven't heard many complaints about selenium installs so far)

Expand All @@ -36,6 +35,7 @@ doc = [
"sphinxcontrib-towncrier >= 0.5.0a0",
"sphinxcontrib-youtube",
]
doc-full = ["rpy2", {include-group = "doc"}]
# Dependencies in a separate group for uv lockfile generation, currently only used for
# the 'old' environment CI test run
lockfile_extras = [
Expand All @@ -55,8 +55,6 @@ test = [
"pytest-rerunfailures",
"pytest-timeout >= 2.2",
"ruff >= 0.1",
"toml-sort",
"tomli; python_version < '3.11'",
"twine",
"vulture",
"wheel >= 0.21",
Expand Down
4 changes: 3 additions & 1 deletion tools/circleci_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ ONLY_BINARY="--only-binary \"numpy,dipy,scipy,matplotlib,pandas,statsmodels,netC

set -x
python -m pip install --upgrade "pip>=25.1" build
# rpy2 3.6.7 (or its deps) cause problems with our installed R version, so pin them
python -m pip install --upgrade --progress-bar off $ONLY_BINARY \
-ve .[full] \
--group=test \
--group=doc \
--group=doc-full \
"rpy2==3.6.6" "rpy2-rinterface==3.6.5" "rpy2-robjects==3.6.4" \
-r doc/sphinxext/related_software.txt \
"git+https://github.com/mne-tools/mne-bids.git" \
"git+https://github.com/mne-tools/mne-qt-browser.git" \
Expand Down
11 changes: 8 additions & 3 deletions tutorials/preprocessing/90_eyetracking_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
In this tutorial we will explore simultaneously recorded eye-tracking and EEG data from
a pupillary light reflex task. We will combine the eye-tracking and EEG data, and plot
the ERP and pupil response to the light flashes (i.e. the pupillary light reflex).

"""

# Authors: Scott Huberty <seh33@uw.edu>
Expand Down Expand Up @@ -230,7 +229,13 @@

# Skip baseline correction for now. We will apply baseline correction later.
epochs = mne.Epochs(
raw_et, events=et_events, event_id=event_dict, tmin=-0.3, tmax=3, baseline=None
raw_et,
events=et_events,
event_id=event_dict,
tmin=-0.3,
tmax=3,
baseline=None,
picks="all", # include eyetracking channels in the epochs
)
del raw_et # free up some memory
epochs[:8].plot(
Expand All @@ -251,4 +256,4 @@
# Finally, let's plot the evoked responses to the light flashes to get a sense of the
# average pupillary light response, and the associated ERP in the EEG data.

epochs.apply_baseline().average().plot(picks=occipital + pupil)
epochs.apply_baseline().average(picks="all").plot(picks=occipital + pupil)
Loading