Skip to content

Commit

Permalink
Update mne/io/base.py
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McCloy <[email protected]>
  • Loading branch information
cbrnr and drammock authored Dec 11, 2024
1 parent b591cad commit ea6fd3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mne/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea6fd3f

Please sign in to comment.