Add process to merge adjacent event into a continious event - #945
Add process to merge adjacent event into a continious event#945Edouard2laire wants to merge 2 commits into
Conversation
|
Context: https://neuroimage.usc.edu/forums/t/merge-and-combine-events/57939 Which of the two is being solved with this PR? |
|
The first one:
I am currently cleaning the code I have for the second one, Let me know if you want an example file |
|
In the forum, I provided a step-by-step solution for this with the current event processes If needed, I can add a modification in the current "Merge overlapping extended events" to remove the one-sample issue, e.g., a checkbox to allow merging consecutive, 0-sample gap, extended events For changes like this, discussing on the forum first lets us agree on the approach before any code |
The proposed steps are quite complicated, whereas this is only one process which also ensures that there is no bad segment in the continuous event and ensures a minimum duration for the segment. The idea is that the user (me in this case) would then segment the file based on the continuous event to then analyse each segment individually. Kind og like for MEG we do 'generate stable head'; but here, with a stable period for each sleep stage.
Could be nice, but is it possible to remove bad period / only merge if the created events is longuer than a desired duration ?
Yes i agree. Here i went directly to code as the code was already written from a long time ago; i just cleanned it. If it's too specific for brainstorm; i can always move it to a custom plugin now that it's clean :) The cleaning of the other process involves very similar code so it was nice to start by this one :) Regars, |
As discussed in the forum, this process is here to merge consecutive adjacent events into larger continuous events.
Additionnaly:
Here is the GUI:
Do you want me to put the other process to classify events in this PR or submit another one?