My question is how can we use find_events and its argument to get the right
number of events. Right now, I am modifying the parameter min_duration to
arbitrary values until I get the number of events that is close to what I
expect. Is there a better way to do this?
did you follow the advice in my previous mail? It all depends on what exactly you send, so the best way to determine the parameters is to inspect the actual trigger channel. I don't know how your trigger signal looks like, and there's no general solution. However, I've found that resetting the trigger signal to 0 after an event was sent out really help keep things simple. If you don't do this, Biosemi will add the current trigger value to the previous one.
Thanks for the reply. Yes, I did try your suggestion of changing
consecutive and min_duration parameters. Biosemi triggers are 24 bits long,
and the automatic trigger is contained in the upper 8 bits. I will try
masking the upper 8 bits using the mask argument of find_events.