Skip to content

Commit

Permalink
Remove jinja2 and pooch from sys_info (mne-tools#12411)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McCloy <[email protected]>
  • Loading branch information
2 people authored and snwnde committed Mar 20, 2024
1 parent b97e579 commit fda7431
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
10 changes: 8 additions & 2 deletions mne/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,6 @@ def sys_info(
"numpy",
"scipy",
"matplotlib",
"pooch",
"jinja2",
"",
"# Numerical (optional)",
"sklearn",
Expand Down Expand Up @@ -701,6 +699,14 @@ def sys_info(
"sphinx-gallery",
"pydata-sphinx-theme",
"",
"# Infrastructure",
"decorator",
"jinja2",
# "lazy-loader",
"packaging",
"pooch",
"tqdm",
"",
)
try:
unicode = unicode and (sys.stdout.encoding.lower().startswith("utf"))
Expand Down
17 changes: 12 additions & 5 deletions mne/utils/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3332,7 +3332,7 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
difference will be preserved.
"""

docdict["reject_drop_bad"] = """
docdict["reject_drop_bad"] = """\
reject : dict | str | None
Reject epochs based on **maximum** peak-to-peak signal amplitude (PTP)
or custom functions. Peak-to-peak signal amplitude is defined as
Expand All @@ -3354,10 +3354,17 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
Custom rejection criteria can be also be used by passing a callable,
e.g., to check for 99th percentile of absolute values of any channel
across time being bigger than 1mV. The callable must return a good, reason tuple.
Where good must be bool and reason must be str, list, or tuple where each entry is a str.::
reject = dict(eeg=lambda x: ((np.percentile(np.abs(x), 99, axis=1) > 1e-3).any(), "> 1mV somewhere"))
across time being bigger than :unit:`1 mV`. The callable must return a
``(good, reason)`` tuple: ``good`` must be :class:`bool` and ``reason``
must be :class:`str`, :class:`list`, or :class:`tuple` where each entry
is a :class:`str`::
reject = dict(
eeg=lambda x: (
(np.percentile(np.abs(x), 99, axis=1) > 1e-3).any(),
"signal > 1 mV somewhere",
)
)
.. note:: If rejection is based on a signal **difference**
calculated for each channel separately, applying baseline
Expand Down

0 comments on commit fda7431

Please sign in to comment.