Skip to content

Commit

Permalink
Add note in reference and change logger
Browse files Browse the repository at this point in the history
  • Loading branch information
withmywoessner committed Nov 2, 2023
1 parent b341448 commit 35fc066
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 2 additions & 3 deletions mne/_fiff/meas_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,9 @@ def set_montage(
functions.
.. warning::
Applying a montage will only set locations of channels that exist
at the time it is applied. This means when
:doc:`re-referencing
at the time it is applied. This means when :doc:`re-referencing
</auto_tutorials/preprocessing/55_setting_eeg_reference>`
make sure to apply the montage after calling
make sure to apply the montage only after calling
:func:`mne.add_reference_channels`
"""
# How to set up a montage to old named fif file (walk through example)
Expand Down
13 changes: 12 additions & 1 deletion mne/_fiff/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ def add_reference_channels(inst, ref_channels, copy=True):
-------
inst : instance of Raw | Epochs | Evoked
Data with added EEG reference channels.
Notes
-----
.. warning::
When :doc:`re-referencing
</auto_tutorials/preprocessing/55_setting_eeg_reference>`
, make sure to apply the montage using :func:`mne.io.Raw.set_montage`
only after calling this function. Applying a montage will only set
locations of channels that exist at the time it is applied.
"""
from ..epochs import BaseEpochs
from ..evoked import Evoked
Expand Down Expand Up @@ -239,7 +248,9 @@ def add_reference_channels(inst, ref_channels, copy=True):
ref_dig_array = np.full(12, np.nan)
logger.info(
"Location for this channel is unknown; consider calling "
"set_montage() again if needed."
"set_montage() after adding new reference channels if needed. "
"Applying a montage will only set locations of channels that "
"exist at the time it is applied."
)

for ch in ref_channels:
Expand Down

0 comments on commit 35fc066

Please sign in to comment.