You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
how can i plot the events on top of the eeg versus time plot ?
i found the events/versus sample using find events. but when i divide versus the sampling rate i don't have at all the same values in time than the eeg. there must be an offset.
I'ld like to plot some eeg data with the "events" on top of it.
if you have events you can time in seconds with
events_times = (events[:, 0] - raw.first_samp) / raw.info['sfreq']
time of 0s will be beginning of the file.
HTH
@massich you have been working on these things quite a bit recently, could you make a plot_timing.py tutorial or something similar to cover these topics in the next two weeks to make it into 0.17?
If the events, are binary mapped events then 3 should not be visual/left but both audios. (but I guess, that this depends on the vendor and this vendor they are not independent bits).
They seem related yes. mask is a binary mask (behavior dependent on what mask_type is) and the resulting events[:, 2] are the detected event numbers.
The error you hit is because you supplied an event_id that is not in the events that you supplied. In theory we should have an option to handle this the same way we do with on_missing in Epochs.
Activity
agramfort commentedon May 12, 2018
jona-sassenhagen commentedon May 12, 2018
To be precise, we recommend
raw, events = raw.resample(new_sfreq, events=events)pdeman commentedon May 12, 2018
Thanks but in this particular case I don't plot using mne.
I would need to find the time for raws recording and time for events in the same unit.
agramfort commentedon May 13, 2018
pdeman commentedon May 13, 2018
ok thanks
larsoner commentedon May 13, 2018
At some point we should add a tutorial that discusses:
find_events, with event maskingeventscolumn valuesraw.first_samp, what it is, how it changes with.crop, how to get event times relative to the start of the instanceAnnotationsandorig_timeI'll re-open and re-title this issue so we do this at some point.
[-]plot events on top of eeg[/-][+]DOC: time of events and first_samp[/+]larsoner commentedon Oct 4, 2018
@massich you have been working on these things quite a bit recently, could you make a
plot_timing.pytutorial or something similar to cover these topics in the next two weeks to make it into 0.17?massich commentedon Oct 4, 2018
yes
larsoner commentedon Nov 5, 2018
Moving to 0.18, not a blocker
massich commentedon Nov 9, 2018
Regarding the events and masking, there are several things I don't understand.
See this:
If the events, are binary mapped events then 3 should not be visual/left but both audios. (but I guess, that this depends on the vendor and this vendor they are not independent bits).
Then if I do this, this works.
So far so good.
But this breaks:
massich commentedon Nov 9, 2018
@larsoner are all these the things you were referring when you were talking about event columns and masking? in points 1 and 2?
larsoner commentedon Nov 9, 2018
They seem related yes.
maskis a binary mask (behavior dependent on whatmask_typeis) and the resultingevents[:, 2]are the detected event numbers.The error you hit is because you supplied an
event_idthat is not in theeventsthat you supplied. In theory we should have an option to handle this the same way we do withon_missinginEpochs.agramfort commentedon Nov 9, 2018
larsoner commentedon May 13, 2019
@drammock can you see if this is taken care of yet, and if not, add to the documentation todo?