Bad Segments Removed After Importing

Hi,

After my last update of Brainstorm (01.04.2021) I noticed a recent change. When I import the raw file and select 'Accept trial', the bad segments are removed. It is only the events that is removed so the segments are not marked as bad anymore. I am working on continuous files (resting state data) and in my pipeline, I make use of this information to exclude bad segments from further analysis. I found a way to circumvent this problem by exporting the bad segments from the raw file. However, I am not sure whether this change would effect anything else. Thank you for your help.

Best regards,
Levent

Indeed, I changed this behavior in this commit: https://github.com/brainstorm-tools/brainstorm3/commit/4756493756a7119b0fa02329d1f90a69a88f9643#diff-c80b8824a869fa9f14bb5711e147a87af6bb61199e61a515fac44510f209ac9e

This was to respond to this forum request (making the trials usable by bst_psd.m after clicking "Accept trials"): Error using Uniform Epoch time

However, with your message, I realize that destroying completely the information is not a good solution.
I propose an intermediate solution: clicking on "Accept trials" now removes the tag "BAD" from all the event names (equivalent of the menu "Events > Mark group as bad/good"). If you need these bad segments to be "bad" again, you still have them in the file and just need to add the tag "bad" again to them.
Update Brainstorm to get this fix: https://github.com/brainstorm-tools/brainstorm3/commit/93c994632db01a7248ca16162380810f3c4fc780

Does it make sense?
Does it help you with your problem?

Hi Francois,

Thank you for the response. I have not tried it yet but it seems like it should be fine now. I will write back in case there is a problem.

Best regards,
Levent

Yes! I think that solution would be better
soud wiser
:slight_smile: