<s> """<STR_LIT>""" <EOL> import mne <EOL> from mne import io <EOL> from mne . event import define_target_events <EOL> from mne . datasets import sample <EOL> import matplotlib . pyplot as plt <EOL> print ( __doc__ ) <EOL> data_path = sample . data_path ( ) <EOL> raw_fname = data_path + '<STR_LIT>' <EOL> event_fname = data_path + '<STR_LIT>' <EOL> raw = io . read_raw_fif ( raw_fname ) <EOL> events = mne . read_events ( event_fname ) <EOL> include = [ ] <EOL> raw . info [ '<STR_LIT>' ] += [ '<STR_LIT>' ] <EOL> picks = mne . pick_types ( raw . info , meg = '<STR_LIT>' , eeg = False , stim = False , eog = True , <EOL> include = include , exclude = '<STR_LIT>' ) <EOL> reference_id = <NUM_LIT:5> <EOL> target_id = <NUM_LIT:32> <EOL> sfreq = raw . info [ '<STR_LIT>' ] <EOL> tmin = <NUM_LIT:0.1> <EOL> tmax = <NUM_LIT> <EOL> new_id = <NUM_LIT> <EOL> fill_na = <NUM_LIT> <EOL> events_ , lag = define_target_events ( events , reference_id , target_id , <EOL> sfreq , tmin , tmax , new_id , fill_na ) <EOL> print ( events_ ) <EOL> print ( lag [ lag != fill_na ] ) <EOL> tmin_ = - <NUM_LIT> <EOL> tmax_ = <NUM_LIT> <EOL> event_id = dict ( early = new_id , late = fill_na ) <EOL> epochs = mne . Epochs ( raw , events_ , event_id , tmin_ , <EOL> tmax_ , picks = picks , baseline = ( None , <NUM_LIT:0> ) , <EOL> reject = dict ( mag = <NUM_LIT> ) ) <EOL> early , late = [ epochs [ k ] . average ( ) for k in event_id ] <EOL> times = <NUM_LIT> * epochs . times <EOL> title = '<STR_LIT>' <EOL> plt . clf ( ) <EOL> ax = plt . subplot ( <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:1> ) <EOL> early . plot ( axes = ax ) <EOL> plt . title ( title % '<STR_LIT>' ) <EOL> plt . ylabel ( '<STR_LIT>' ) <EOL> ax = plt . subplot ( <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:2> ) <EOL> late . plot ( axes = ax ) <EOL> plt . title ( title % '<STR_LIT>' ) <EOL> plt . ylabel ( '<STR_LIT>' ) <EOL> plt . show ( ) </s>
