Skip to content

Commit

Permalink
use 1 criterion for identifying data MEG channels + more explicit code
Browse files Browse the repository at this point in the history
  • Loading branch information
dengemann committed Apr 29, 2016
1 parent aeb1654 commit 19d20d8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mne/io/bti/bti.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,13 @@ def _get_bti_info(pdf_fname, config_fname, head_shape_fname, rotation_x,
# Note that 'name' and 'chan_label' are not the same.
# We want the configured label if out IO parsed it
# except for the MEG channels for which we keep the config name
bti_ch_names = [c.get('chan_label' if c['yaxis_label'] != 'T' else 'name',
c['name']) for c in bti_info['chs']]
bti_ch_names = list()
for ch in bti_info['chs']:
# we have always relied on 'A' as indicator of MEG data channels.
ch_name = ch['name']
if not ch_name.startswith('A'):
ch_name = ch.get('chan_label', ch_name)
bti_ch_names.append(ch_name)

neuromag_ch_names = _rename_channels(
bti_ch_names, ecg_ch=ecg_ch, eog_ch=eog_ch)
Expand Down

0 comments on commit 19d20d8

Please sign in to comment.