From 9ee0c96b0fa9ab2c838077f5e9da8746bbfd9b8b Mon Sep 17 00:00:00 2001 From: Shruti Bhale Date: Sun, 14 Dec 2025 17:07:28 +0530 Subject: [PATCH 1/7] DOC: Clarify that get_data includes bad channels by default --- mne/io/base.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mne/io/base.py b/mne/io/base.py index 314f981dcaf..4a0b983fee4 100644 --- a/mne/io/base.py +++ b/mne/io/base.py @@ -908,7 +908,14 @@ def get_data( Parameters ---------- - %(picks_all)s + picks : str | array_like | slice | None + Channels to include. Slices and lists of integers will be interpreted as + channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) + will pick channels of those types, channel name strings (e.g., + ['MEG0111', 'MEG2623']) will pick the given channels. Can also be the + string values "all" to pick all channels, or "data" to pick data + channels. None (default) will pick all channels. Note that channels in + ``info['bads']`` *will be included* by default. start : int The first sample to include. Defaults to 0. stop : int | None From 2c3cbf4a8094d5c1235b2d021493055d18f08dca Mon Sep 17 00:00:00 2001 From: Shruti Bhale Date: Sun, 14 Dec 2025 21:06:01 +0530 Subject: [PATCH 2/7] DOC: Move picks warning to global docdict in docs.py --- mne/io/base.py | 9 +-------- mne/utils/docs.py | 4 +++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mne/io/base.py b/mne/io/base.py index 4a0b983fee4..314f981dcaf 100644 --- a/mne/io/base.py +++ b/mne/io/base.py @@ -908,14 +908,7 @@ def get_data( Parameters ---------- - picks : str | array_like | slice | None - Channels to include. Slices and lists of integers will be interpreted as - channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) - will pick channels of those types, channel name strings (e.g., - ['MEG0111', 'MEG2623']) will pick the given channels. Can also be the - string values "all" to pick all channels, or "data" to pick data - channels. None (default) will pick all channels. Note that channels in - ``info['bads']`` *will be included* by default. + %(picks_all)s start : int The first sample to include. Defaults to 0. stop : int | None diff --git a/mne/utils/docs.py b/mne/utils/docs.py index 898fb9c34e1..3fc8583f7fd 100644 --- a/mne/utils/docs.py +++ b/mne/utils/docs.py @@ -3437,7 +3437,9 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75): _picks_str_names = """channel *name* strings (e.g., ``['MEG0111', 'MEG2623']`` will pick the given channels.""" _picks_str_values = """Can also be the string values ``'all'`` to pick - all channels, or ``'data'`` to pick :term:`data channels`.""" +all channels, or ``'data'`` to pick data channels. None (default) will +pick all channels. Note that channels in ``info['bads']`` *will be +included* by default.""" _picks_str = f"""In lists, {_picks_str_types} {_picks_str_names} {_picks_str_values} None (default) will pick""" From 5c9147588763f1bf322fb70175cd12d3e5a7b099 Mon Sep 17 00:00:00 2001 From: Shruti Bhale Date: Mon, 15 Dec 2025 23:25:57 +0530 Subject: [PATCH 3/7] Fix docstring parameter errors in docs.py --- mne/utils/docs.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mne/utils/docs.py b/mne/utils/docs.py index 3fc8583f7fd..898fb9c34e1 100644 --- a/mne/utils/docs.py +++ b/mne/utils/docs.py @@ -3437,9 +3437,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75): _picks_str_names = """channel *name* strings (e.g., ``['MEG0111', 'MEG2623']`` will pick the given channels.""" _picks_str_values = """Can also be the string values ``'all'`` to pick -all channels, or ``'data'`` to pick data channels. None (default) will -pick all channels. Note that channels in ``info['bads']`` *will be -included* by default.""" + all channels, or ``'data'`` to pick :term:`data channels`.""" _picks_str = f"""In lists, {_picks_str_types} {_picks_str_names} {_picks_str_values} None (default) will pick""" From 40a7c1ed039c10dce552f6a42da3e25982bd6796 Mon Sep 17 00:00:00 2001 From: Shruti Bhale Date: Wed, 17 Dec 2025 21:55:31 +0530 Subject: [PATCH 4/7] DOC: Add bad channels clarification to picks_all --- mne/utils/docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/utils/docs.py b/mne/utils/docs.py index 898fb9c34e1..1440340e887 100644 --- a/mne/utils/docs.py +++ b/mne/utils/docs.py @@ -3454,7 +3454,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75): {_picks_desc} {_picks_int} {_picks_str}""" picks_base_notypes = f"""picks : list of int | list of str | slice | None {_picks_desc} {_picks_int} {_picks_str_notypes}""" -docdict["picks_all"] = _reflow_param_docstring(f"{picks_base} all channels. {reminder}") +docdict["picks_all"] = _reflow_param_docstring(f"{picks_base} all channels. Bad channels are included by default.{reminder}") docdict["picks_all_data"] = _reflow_param_docstring( f"{picks_base} all data channels. {reminder}" ) From c89b2141bf9326aad344446e603048a33680d78f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 16:26:48 +0000 Subject: [PATCH 5/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mne/utils/docs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mne/utils/docs.py b/mne/utils/docs.py index 1440340e887..682ed55424e 100644 --- a/mne/utils/docs.py +++ b/mne/utils/docs.py @@ -3454,7 +3454,9 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75): {_picks_desc} {_picks_int} {_picks_str}""" picks_base_notypes = f"""picks : list of int | list of str | slice | None {_picks_desc} {_picks_int} {_picks_str_notypes}""" -docdict["picks_all"] = _reflow_param_docstring(f"{picks_base} all channels. Bad channels are included by default.{reminder}") +docdict["picks_all"] = _reflow_param_docstring( + f"{picks_base} all channels. Bad channels are included by default.{reminder}" +) docdict["picks_all_data"] = _reflow_param_docstring( f"{picks_base} all data channels. {reminder}" ) From ef870a58c93a8270d4655407bb8e44537d32364e Mon Sep 17 00:00:00 2001 From: Shruti Bhale Date: Sat, 20 Dec 2025 19:10:28 +0530 Subject: [PATCH 6/7] DOC: Fix missing space in picks_all --- mne/utils/docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/utils/docs.py b/mne/utils/docs.py index 682ed55424e..26919dbc968 100644 --- a/mne/utils/docs.py +++ b/mne/utils/docs.py @@ -3455,7 +3455,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75): picks_base_notypes = f"""picks : list of int | list of str | slice | None {_picks_desc} {_picks_int} {_picks_str_notypes}""" docdict["picks_all"] = _reflow_param_docstring( - f"{picks_base} all channels. Bad channels are included by default.{reminder}" + f"{picks_base} all channels. Bad channels are included by default. {reminder}" ) docdict["picks_all_data"] = _reflow_param_docstring( f"{picks_base} all data channels. {reminder}" From b0cc2cb4af3e5154ef31fedadf09db51d22a2603 Mon Sep 17 00:00:00 2001 From: Shruti Bhale Date: Wed, 24 Dec 2025 22:41:33 +0530 Subject: [PATCH 7/7] DOC: Add changelog entry --- doc/changes/dev/13543.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changes/dev/13543.doc.rst diff --git a/doc/changes/dev/13543.doc.rst b/doc/changes/dev/13543.doc.rst new file mode 100644 index 00000000000..7543c7a02d7 --- /dev/null +++ b/doc/changes/dev/13543.doc.rst @@ -0,0 +1 @@ +Clarify that ``get_data()`` includes bad channels by default. \ No newline at end of file