From e0aa5feb7b2dcb6704242fd9ad4b5fd1e7b97b0d Mon Sep 17 00:00:00 2001 From: Robert Luke <748691+rob-luke@users.noreply.github.com> Date: Mon, 13 Dec 2021 21:54:00 +1100 Subject: [PATCH] Add fNIRS support to coregistration gui (#10122) --- mne/gui/_coreg.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mne/gui/_coreg.py b/mne/gui/_coreg.py index d7ac1b04dfd..46086b32b84 100644 --- a/mne/gui/_coreg.py +++ b/mne/gui/_coreg.py @@ -772,23 +772,24 @@ def _add_head_shape_points(self): def _add_eeg_channels(self): if self._eeg_channels: eeg = ["original"] - picks = pick_types(self._info, eeg=(len(eeg) > 0)) + picks = pick_types(self._info, eeg=(len(eeg) > 0), fnirs=True) if len(picks) > 0: - eeg_actors = _plot_sensors( + actors = _plot_sensors( self._renderer, self._info, self._to_cf_t, picks, - meg=False, eeg=eeg, fnirs=False, warn_meg=False, - head_surf=self._head_geo, units='m', + meg=False, eeg=eeg, fnirs=["sources", "detectors"], + warn_meg=False, head_surf=self._head_geo, units='m', sensor_opacity=self._defaults["sensor_opacity"], orient_glyphs=self._orient_glyphs, scale_by_distance=self._scale_by_distance, project_points=self._project_eeg, surf=self._head_geo) - eeg_actors = eeg_actors["eeg"] + sens_actors = actors["eeg"] + sens_actors.extend(actors["fnirs"]) else: - eeg_actors = None + sens_actors = None else: - eeg_actors = None - self._update_actor("eeg_channels", eeg_actors) + sens_actors = None + self._update_actor("eeg_channels", sens_actors) def _add_head_surface(self): bem = None