Skip to content

Commit

Permalink
Correctly handle reading when BIDS channel order differs from Raw
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechenberger committed Sep 26, 2023
1 parent 2de8536 commit 93b08b4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mne_bids/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,7 @@ def _handle_channels_reading(channels_fname, raw):
f"set channel names."
)
else:
for bids_ch_name, raw_ch_name in zip(ch_names_tsv, raw.ch_names.copy()):
if bids_ch_name != raw_ch_name:
raw.rename_channels({raw_ch_name: bids_ch_name})
raw.rename_channels(dict(zip(raw.ch_names, ch_names_tsv)))

# Set the channel types in the raw data according to channels.tsv
channel_type_bids_mne_map_available_channels = {
Expand Down

0 comments on commit 93b08b4

Please sign in to comment.