def _get_epochs():
 raw = read_raw_fif(raw_fname)
 raw.add_proj([], remove_existing=True)
 events = read_events(event_name)
 picks = _get_picks(raw)
 picks = picks[np.round(np.linspace(0, (len(picks) - 1), n_chan)).astype(int)]
 picks = np.concatenate([[2, 3, 4, 6, 7], picks])
 epochs = Epochs(raw, events[:5], event_id, tmin, tmax, picks=picks)
 epochs.info['bads'] = [epochs.ch_names[(-1)]]
 return epochs

def _get_epochs ( ) : raw = read_raw_fif ( raw_fname ) raw . add_proj ( [ ] , remove_existing = True ) events = read_events ( event_name ) picks = _get_picks ( raw ) picks = picks [ np . round ( np . linspace ( 0 , ( len ( picks ) - 1 ) , n_chan ) ) . astype ( int ) ] picks = np . concatenate ( [ [ 2 , 3 , 4 , 6 , 7 ] , picks ] ) epochs = Epochs ( raw , events [ : 5 ] , event_id , tmin , tmax , picks = picks ) epochs . info [ 'bads' ] = [ epochs . ch_names [ ( - 1 ) ] ] return epochs
get epochs .