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
2 changes: 1 addition & 1 deletion mne_nirs/io/fold/_fold.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _generate_montage_locations():

Data is returned in the same format as the eeg_positions library.
"""
# standard_1020 and standard_1005 are in MNI (fsaverage) space already,
# standard_1020 and colin27_1005 are in MNI (fsaverage) space already,
# but we need to undo the scaling that head_scale will do
name = "colin27" if check_version("mne", "1.13") else "standard"
montage = mne.channels.make_standard_montage(
Expand Down
4 changes: 3 additions & 1 deletion mne_nirs/io/fold/tests/test_fold.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from mne.channels.montage import transform_to_head
from mne.datasets.testing import data_path, requires_testing_data
from mne.io import read_fiducials, read_raw_nirx
from mne.utils import check_version
from numpy.testing import assert_allclose

from mne_nirs.io import fold_landmark_specificity
Expand Down Expand Up @@ -57,7 +58,8 @@ def test_channel_specificity(monkeypatch, tmp_path, fold_files):
res = fold_channel_specificity(raw, **kwargs)
assert len(res) == 2
assert res[0].shape == (n_want, 14)
montage = make_standard_montage("standard_1005", head_size=0.09700884729534559)
name = "colin27" if check_version("mne", "1.13") else "standard"
montage = make_standard_montage(f"{name}_1005", head_size=0.09700884729534559)
fids = read_fiducials(
Path(mne.__file__).parent / "data" / "fsaverage" / "fsaverage-fiducials.fif"
)[0]
Expand Down
5 changes: 4 additions & 1 deletion mne_nirs/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@ def test_examples(fname, requires_pyvista):
test_file_path = examples_path() + fname
with open(test_file_path) as fid:
code = fid.read()
exec(code, locals(), locals())
# Use a single namespace dict (not separate globals/locals) so that names
# defined at module level in the example (e.g. imports) are visible
# inside functions the example itself defines.
exec(code, {"__name__": "__main__"})
4 changes: 2 additions & 2 deletions mne_nirs/visualisation/_plot_3d_montage.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def plot_3d_montage(
vp.GetOrigin()
)
actor = brain.plotter.add_text(
name,
ch_pos,
text=name,
position=ch_pos,
font_size=font_size,
color=(0.0, 0.0, 0.0),
**add_text_kwargs,
Expand Down