def _picks_by_type_old(info, meg_combined=False, ref_meg=False, exclude='bads'): """Use the old, slower _picks_by_type code.""" picks_list = [] has = [_contains_ch_type(info, k) for k in _DATA_CH_TYPES_SPLIT] has = dict(zip(_DATA_CH_TYPES_SPLIT, has)) if has['mag'] and (meg_combined is not True or not has['grad']): picks_list.append( ('mag', pick_types(info, meg='mag', eeg=False, stim=False, ref_meg=ref_meg, exclude=exclude)) ) if has['grad'] and (meg_combined is not True or not has['mag']): picks_list.append( ('grad', pick_types(info, meg='grad', eeg=False, stim=False, ref_meg=ref_meg, exclude=exclude)) ) if has['mag'] and has['grad'] and meg_combined is True: picks_list.append( ('meg', pick_types(info, meg=True, eeg=False, stim=False, ref_meg=ref_meg, exclude=exclude)) ) for ch_type in _DATA_CH_TYPES_SPLIT: if ch_type in ['grad', 'mag']: # exclude just MEG channels continue if has[ch_type]: picks_list.append( (ch_type, pick_types(info, meg=False, stim=False, ref_meg=ref_meg, exclude=exclude, **{ch_type: True})) ) return picks_list
def _picks_by_type_old(info, meg_combined=False, ref_meg=False, exclude='bads'): """Use the old, slower _picks_by_type code.""" picks_list = [] has = [_contains_ch_type(info, k) for k in _DATA_CH_TYPES_SPLIT] has = dict(zip(_DATA_CH_TYPES_SPLIT, has)) if has['mag'] and (meg_combined is not True or not has['grad']): picks_list.append( ('mag', pick_types(info, meg='mag', eeg=False, stim=False, ref_meg=ref_meg, exclude=exclude)) ) if has['grad'] and (meg_combined is not True or not has['mag']): picks_list.append( ('grad', pick_types(info, meg='grad', eeg=False, stim=False, ref_meg=ref_meg, exclude=exclude)) ) if has['mag'] and has['grad'] and meg_combined is True: picks_list.append( ('meg', pick_types(info, meg=True, eeg=False, stim=False, ref_meg=ref_meg, exclude=exclude)) ) for ch_type in _DATA_CH_TYPES_SPLIT: if ch_type in ['grad', 'mag']: # exclude just MEG channels continue if has[ch_type]: picks_list.append( (ch_type, pick_types(info, meg=False, stim=False, ref_meg=ref_meg, exclude=exclude, **{ch_type: True})) ) return picks_list