#NEWLINE# def _create_event_ch( self , events , n_samples = None ) : #NEWLINE# #INDENT# 'Create the event channel' #NEWLINE# if ( n_samples is None ) : #NEWLINE# #INDENT# n_samples = ( ( self . last_samp - self . first_samp ) + 1 ) #NEWLINE# #UNINDENT# events = np . array ( events , int ) #NEWLINE# if ( ( events . ndim != 2 ) or ( events . shape [ 1 ] != 3 ) ) : #NEWLINE# #INDENT# raise ValueError ( '[n_events x 3] shaped array required' ) #NEWLINE# #UNINDENT# self . _event_ch = _synthesize_stim_channel ( events , n_samples )