original_docstring:  Epoch the signal around two different events.
          For example, select epochs for the delay period and for the response period.
      ----------
      recording: dict
          contains EEG channels, info, events and timestamps
      time_column_A, time_column_B: str, str
          Column names in 'events' with timestamps to base the epochs on. 
      back, forth: int, int
          size of the epoch in the number of samples going back and forth from the timestamp of the event. 
      
      Returns
      -------
      epochs: dict
          Epoched signal organized in a dictionary.
          Keys are event names, values are epochs (np.arrays)
      
docstring: Epoch the signal around two different events.
  For example, select epochs for the delay period and for the response period.
  
  dict
  contains EEG channels, info, events and timestamps
  time_column_A, time_column_B: str, str
  Column names in 'events' with timestamps to base the epochs on.
  back, forth: int, int
  size of the epoch in the number of samples going back and forth from the timestamp of the event.
  
  Returns
  
  dict
  Epoched signal organized in a dictionary.
  Keys are event names, values are epochs (np.arrays)
docstring_tokens: Epoch the signal around two different events . For example select epochs for the delay period and for the response period . dict contains EEG channels info events and timestamps time_column_A time_column_B : str str Column names in ' events ' with timestamps to base the epochs on . back forth : int int size of the epoch in the number of samples going back and forth from the timestamp of the event . Returns dict Epoched signal organized in a dictionary . Keys are event names values are epochs ( np . arrays )
code: def Different_Epochs(recording, time_column_A, time_column_B,  back, forth):
      """ Epoch the signal around two different events.
          For example, select epochs for the delay period and for the response period.
      ----------
      recording: dict
          contains EEG channels, info, events and timestamps
      time_column_A, time_column_B: str, str
          Column names in 'events' with timestamps to base the epochs on. 
      back, forth: int, int
          size of the epoch in the number of samples going back and forth from the timestamp of the event. 
      
      Returns
      -------
      epochs: dict
          Epoched signal organized in a dictionary.
          Keys are event names, values are epochs (np.arrays)
      """
      
      # Prepare events by selecting a column with times of an event and a category column, when it is divided for some comparison, ex. match vs missmatch trials
      #events = prepare_events(recording, time_column, category_column)
      data_matrix = np.array([recording[key] for key in recording['eeg_names']])
      all_slices = {event: [] for event in [time_column_A, time_column_B]}
      print([time_column_A, time_column_B])
      for time_col in [time_column_A, time_column_B]:
          for event in recording['events'][time_col]:
              event_index = np.argmin(np.abs(recording['timestamp'] - np.datetime64(event)))
              all_slices[time_col].append(data_matrix[:, event_index - back : event_index + forth])
  
      return all_slices
code_tokens: def Different_Epochs ( recording , time_column_A , time_column_B , back , forth ) : data_matrix = np . array ( [ recording [ key ] for key in recording [ 'eeg_names' ] ] ) all_slices = { event : [ ] for event in [ time_column_A , time_column_B ] } print ( [ time_column_A , time_column_B ] ) for time_col in [ time_column_A , time_column_B ] : for event in recording [ 'events' ] [ time_col ] : event_index = np . argmin ( np . abs ( recording [ 'timestamp' ] - np . datetime64 ( event ) ) ) all_slices [ time_col ] . append ( data_matrix [ : , event_index - back : event_index + forth ] ) return all_slices
short_docstring: Epoch the signal around two different events.
short_docstring_tokens: Epoch the signal around two different events .
comment: """ Epoch the signal around two different events.
          For example, select epochs for the delay period and for the response period.
      ----------
      recording: dict
          contains EEG channels, info, events and timestamps
      time_column_A, time_column_B: str, str
          Column names in 'events' with timestamps to base the epochs on. 
      back, forth: int, int
          size of the epoch in the number of samples going back and forth from the timestamp of the event. 
      
      Returns
      -------
      epochs: dict
          Epoched signal organized in a dictionary.
          Keys are event names, values are epochs (np.arrays)
      """$SEP$# Prepare events by selecting a column with times of an event and a category column, when it is divided for some comparison, ex. match vs missmatch trials$SEP$#events = prepare_events(recording, time_column, category_column)