Esempio n. 1
0
 def _create_epochs(events_dict=None,
                    info: mne.Info = None,
                    data=None,
                    event_number=0,
                    t_min=0):
     # Convert values to volts
     data = data * 1.0e-6
     n_epochs = data.shape[0]
     n_samples = data.shape[2]
     events = np.column_stack(
         (np.arange(0, n_epochs * n_samples, n_samples),
          np.zeros(n_epochs, dtype=int), np.full((n_epochs, ),
                                                 event_number)))
     epochs = EpochsArray(data, info, events=events, event_id=events_dict)
     epochs = epochs.shift_time(t_min, relative=False)
     return epochs