def equalize_epoch_counts(epochs_list, method='mintime'):
 if (not all((isinstance(e, BaseEpochs) for e in epochs_list))):
  raise ValueError('All inputs must be Epochs instances')
 for e in epochs_list:
  if (not e._bad_dropped):
   e.drop_bad()
 event_times = [e.events[:, 0] for e in epochs_list]
 indices = _get_drop_indices(event_times, method)
 for (e, inds) in zip(epochs_list, indices):
  e.drop(inds, reason='EQUALIZED_COUNT')

def equalize_epoch_counts ( epochs_list , method = 'mintime' ) : if ( not all ( ( isinstance ( e , BaseEpochs ) for e in epochs_list ) ) ) : raise ValueError ( 'All inputs must be Epochs instances' ) for e in epochs_list : if ( not e . _bad_dropped ) : e . drop_bad ( ) event_times = [ e . events [ : , 0 ] for e in epochs_list ] indices = _get_drop_indices ( event_times , method ) for ( e , inds ) in zip ( epochs_list , indices ) : e . drop ( inds , reason = 'EQUALIZED_COUNT' )
equalize the number of trials in multiple epoch instances .