def test_bad_proj():
 raw = read_raw_fif(raw_fname, preload=True)
 events = read_events(event_fname)
 picks = pick_types(raw.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')
 picks = picks[2:9:3]
 _check_warnings(raw, events, picks)
 raw.pick_channels([raw.ch_names[ii] for ii in picks])
 _check_warnings(raw, events)
 raw.info.normalize_proj()
 _check_warnings(raw, events, count=0)
 raw = read_raw_fif(raw_fname, preload=True).pick_types(meg=False, eeg=True)
 raw.set_eeg_reference()
 _check_warnings(raw, events, count=0)
 raw.info['bads'] = raw.ch_names[:10]
 _check_warnings(raw, events, count=0)

def test_bad_proj ( ) : raw = read_raw_fif ( raw_fname , preload = True ) events = read_events ( event_fname ) picks = pick_types ( raw . info , meg = True , stim = False , ecg = False , eog = False , exclude = 'bads' ) picks = picks [ 2 : 9 : 3 ] _check_warnings ( raw , events , picks ) raw . pick_channels ( [ raw . ch_names [ ii ] for ii in picks ] ) _check_warnings ( raw , events ) raw . info . normalize_proj ( ) _check_warnings ( raw , events , count = 0 ) raw = read_raw_fif ( raw_fname , preload = True ) . pick_types ( meg = False , eeg = True ) raw . set_eeg_reference ( ) _check_warnings ( raw , events , count = 0 ) raw . info [ 'bads' ] = raw . ch_names [ : 10 ] _check_warnings ( raw , events , count = 0 )
test dealing with bad projection application .