original_docstring:  Epoch the signal around an event and divide the epochs between different conditions. 
          For example, select epochs for subject response and divide them between match and mismatch conditions.
      ----------
      recording: dict
          contains EEG channels, info, events and timestamps
      time_column: str
          Column name in 'events' with timestamps to base the epochs on. 
      category_column: str
          name of the column in the 'events' with the categorical variable to divide the epochs between different conditions. 
      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 an event and divide the epochs between different conditions.
  For example, select epochs for subject response and divide them between match and mismatch conditions.
  
  dict
  contains EEG channels, info, events and timestamps
  time_column: str
  Column name in 'events' with timestamps to base the epochs on.
  category_column: str
  name of the column in the 'events' with the categorical variable to divide the epochs between different conditions.
  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 an event and divide the epochs between different conditions . For example select epochs for subject response and divide them between match and mismatch conditions . dict contains EEG channels info events and timestamps time_column : str Column name in ' events ' with timestamps to base the epochs on . category_column : str name of the column in the ' events ' with the categorical variable to divide the epochs between different conditions . 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 Split_Epochs(recording, time_column, category_column,  back, forth):
      """ Epoch the signal around an event and divide the epochs between different conditions. 
          For example, select epochs for subject response and divide them between match and mismatch conditions.
      ----------
      recording: dict
          contains EEG channels, info, events and timestamps
      time_column: str
          Column name in 'events' with timestamps to base the epochs on. 
      category_column: str
          name of the column in the 'events' with the categorical variable to divide the epochs between different conditions. 
      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 = {code: [] for code in events['code'].unique()}
      
      for idx, event in events.iterrows():
          event_index = np.argmin(np.abs(recording['timestamp'] - np.datetime64(idx)))
          all_slices[event['code']].append(data_matrix[:, event_index - back : event_index + forth])
      
      return all_slices
code_tokens: def Split_Epochs ( recording , time_column , category_column , back , forth ) : events = prepare_events ( recording , time_column , category_column ) data_matrix = np . array ( [ recording [ key ] for key in recording [ 'eeg_names' ] ] ) all_slices = { code : [ ] for code in events [ 'code' ] . unique ( ) } for idx , event in events . iterrows ( ) : event_index = np . argmin ( np . abs ( recording [ 'timestamp' ] - np . datetime64 ( idx ) ) ) all_slices [ event [ 'code' ] ] . append ( data_matrix [ : , event_index - back : event_index + forth ] ) return all_slices
short_docstring: Epoch the signal around an event and divide the epochs between different conditions.
short_docstring_tokens: Epoch the signal around an event and divide the epochs between different conditions .
comment: """ Epoch the signal around an event and divide the epochs between different conditions. 
          For example, select epochs for subject response and divide them between match and mismatch conditions.
      ----------
      recording: dict
          contains EEG channels, info, events and timestamps
      time_column: str
          Column name in 'events' with timestamps to base the epochs on. 
      category_column: str
          name of the column in the 'events' with the categorical variable to divide the epochs between different conditions. 
      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