Skip to content

Commit aa51d8b

Browse files
authored
Merge branch 'main' into doc-ref-channel-clarification
2 parents 5d8f145 + 893b784 commit aa51d8b

20 files changed

Lines changed: 801 additions & 178 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix :func:`mne.preprocessing.nirs.beer_lambert_law` to support explicitly provided ``sd_distances`` during Beer-Lambert conversion. When valid source-detector distances are already present in ``raw.info``, overriding them now emits a warning, and when all inferred distances are invalid and no explicit distances are provided, a ``ValueError`` is raised instead of silently producing zero concentrations, by :newcontrib:`Kalle Makela`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add ``overrides`` parameter to :func:`mne.io.read_raw_brainvision` for reading non-spec-compliant ``.vhdr`` files where the header contradicts the actual layout (e.g. renamed BIDS siblings, missing ``MarkerFile=``, truncated ``[Channel Infos]``). Accepts a dict with keys ``data_fname``, ``marker_fname``, ``n_channels``, ``sfreq``, ``ch_names``, ``units_fallback``, ``data_orientation``, ``data_format``, and ``binary_format``; see the function docstring for details. Missing or empty ``MarkerFile=`` is now also tolerated natively (per the BV Core Data Format spec). When ``MarkerFile=`` names a path that does not exist (common after BIDS renames), :func:`mne.io.read_raw_brainvision` now falls back to the co-located ``<stem>.vmrk`` next to the ``.vhdr`` and warns, instead of raising :class:`FileNotFoundError`, by `Bruno Aristimunha`_.

doc/changes/dev/13885.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug with :meth:`mne.preprocessing.ICA.plot_properties` when using ``reject`` in :meth:`mne.preprocessing.ICA.fit`, by `Eric Larson`_.

examples/preprocessing/find_ref_artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
on the reference channels are removed.
2525
2626
This technique is fully described and validated in :footcite:`HannaEtAl2020`
27-
2827
"""
2928
# Authors: Jeff Hanna <jeff.hanna@gmail.com>
3029
#
@@ -78,6 +77,7 @@
7877
ica_kwargs = dict(
7978
method="picard",
8079
fit_params=dict(tol=1e-4), # use a high tol here for speed
80+
random_state=99,
8181
)
8282
all_picks = mne.pick_types(raw_tog.info, meg=True, ref_meg=True)
8383
ica_tog = ICA(n_components=60, max_iter="auto", allow_ref_meg=True, **ica_kwargs)

examples/preprocessing/muscle_ica.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@
4848

4949
# %%
5050
# By inspection, let's select out the muscle-artifact components based on
51-
# :footcite:`DharmapraniEtAl2016` manually.
52-
#
53-
# The criteria are:
51+
# :footcite:`DharmapraniEtAl2016` manually. The criteria are:
5452
#
5553
# - Positive slope of log-log power spectrum between 7 and 75 Hz
5654
# (here just flat because it's not in log-log)

mne/_fiff/pick.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ def _picks_to_idx(
12381238
extra_repr = ", treated as range({n_chan})"
12391239
else:
12401240
picks = none # let _picks_str_to_idx handle it
1241-
extra_repr = f'None, treated as "{none}"'
1241+
extra_repr = f', treated as "{none}"'
12421242

12431243
#
12441244
# slice

0 commit comments

Comments
 (0)