def test_needs_eeg_average_ref_proj():
 raw = read_raw_fif(raw_fname)
 assert_true(_needs_eeg_average_ref_proj(raw.info))
 raw.set_eeg_reference()
 assert_true((not _needs_eeg_average_ref_proj(raw.info)))
 raw = read_raw_fif(raw_fname, preload=True)
 eeg = [raw.ch_names[c] for c in pick_types(raw.info, meg=False, eeg=True)]
 raw.drop_channels(eeg)
 assert_true((not _needs_eeg_average_ref_proj(raw.info)))
 raw = read_raw_fif(raw_fname)
 raw.info['custom_ref_applied'] = True
 assert_true((not _needs_eeg_average_ref_proj(raw.info)))

def test_needs_eeg_average_ref_proj ( ) : raw = read_raw_fif ( raw_fname ) assert_true ( _needs_eeg_average_ref_proj ( raw . info ) ) raw . set_eeg_reference ( ) assert_true ( ( not _needs_eeg_average_ref_proj ( raw . info ) ) ) raw = read_raw_fif ( raw_fname , preload = True ) eeg = [ raw . ch_names [ c ] for c in pick_types ( raw . info , meg = False , eeg = True ) ] raw . drop_channels ( eeg ) assert_true ( ( not _needs_eeg_average_ref_proj ( raw . info ) ) ) raw = read_raw_fif ( raw_fname ) raw . info [ 'custom_ref_applied' ] = True assert_true ( ( not _needs_eeg_average_ref_proj ( raw . info ) ) )
test checking whether a recording needs an eeg average reference .