def addNecessaryChanlsForEpoch(oEpoch: mne.Epochs): numEvents = len(oEpoch.events) temp = oEpoch.times.reshape(1, 1, -1) realTime_data = temp for i in range(1, numEvents): realTime_data = np.concatenate([realTime_data, temp]) # realTime_data = oEpoch.times.reshape(1,1,-1) info_realTime = create_info(['realTime'], oEpoch.info['sfreq'], ['stim']) realTime_raw = mne.EpochsArray(realTime_data, info_realTime) oEpoch.add_channels([realTime_raw], force_update_info=True) return oEpoch