From ea6fd3f48053bc7aafdfc6ed051d1df5d6369ed7 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 11 Dec 2024 22:01:40 +0100 Subject: [PATCH] Update mne/io/base.py Co-authored-by: Daniel McCloy --- mne/io/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mne/io/base.py b/mne/io/base.py index 9c751245166..3d185ae6eab 100644 --- a/mne/io/base.py +++ b/mne/io/base.py @@ -1553,7 +1553,9 @@ def rescale(self, scale, *, verbose=None): else: for ch_type, ch_scale in scale.items(): if ch_type not in self.get_channel_types(): - raise ValueError(f"Invalid channel type: {ch_type}") + raise ValueError( + f'Channel type "{ch_type}" is not present in the Raw file.' + ) else: self.apply_function( lambda x: x * ch_scale, picks=ch_type, channel_wise=False