Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): update preprocessing tutorial for using inst.pick() instead of pick_types() #12326

Merged
merged 18 commits into from
Jan 25, 2024
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
1 change: 1 addition & 0 deletions doc/changes/devel/12326.other.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated the text in the preprocessing tutorial to use :class:`mne.io.Raw.pick()` instead of the legacy :class:`mne.io.Raw.pick_types()`, by :newcontrib:`btkcodedev`.
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little surprised that these cross-refs worked; regardless, it's more accurate to mark these with the :meth: role since they're links to methods (not classes). The parentheses will get added automatically.

Suggested change
Updated the text in the preprocessing tutorial to use :class:`mne.io.Raw.pick()` instead of the legacy :class:`mne.io.Raw.pick_types()`, by :newcontrib:`btkcodedev`.
Updated the preprocessing tutorial to use :meth:`mne.io.Raw.pick` instead of the legacy :meth:`mne.io.Raw.pick_types`, by :newcontrib:`btkcodedev`.

2 changes: 2 additions & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@

.. _Bruno Nicenboim: https://bnicenboim.github.io

.. _btkcodedev: https://github.com/btkcodedev

.. _buildqa: https://github.com/buildqa

.. _Carlos de la Torre-Ortiz: https://ctorre.me
Expand Down
5 changes: 3 additions & 2 deletions tutorials/preprocessing/15_handling_bad_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@
fig.suptitle(title, size="xx-large", weight="bold")

# %%
# Note that we used the ``exclude=[]`` trick in the call to
# :meth:`~mne.io.Raw.pick_types` to make sure the bad channels were not
# Note that the method :meth:`~mne.io.Raw.pick()` default
Copy link
Member

Choose a reason for hiding this comment

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

FYI parentheses get added automatically when you use the :meth: role

Suggested change
# Note that the method :meth:`~mne.io.Raw.pick()` default
# Note that the method :meth:`~mne.io.Raw.pick` default

# arguments includes ``exclude=()`` which ensures that bad
# channels are not
# automatically dropped from the selection. Here is the corresponding example
# with the interpolated gradiometer channel; since there are more channels
# we'll use a more transparent gray color this time:
Expand Down