def _add_events(raw, participant="S1"): events_conditions = pd.read_csv("../data/" + participant + "/" + participant + ".csv") events_conditions = events_conditions["Category_Arousal"] events = _check_events(raw) events, event_id = nk.events_to_mne(events["Onset"], conditions=events_conditions) raw.add_events(events, "Foto") return (raw, events, event_id)
def test_events_to_mne(): signal = np.cos(np.linspace(start=0, stop=20, num=1000)) events = nk.events_find(signal) events, event_id = nk.events_to_mne(events) assert event_id == {"event": 0}