ETG4000 not ETG 7000, with 50 events rather than 100

You seem a bit surprised that it “double triggers”, so the first thing I would say is look back at the script that ran the experiment stimuli, and make sure you understand what it’s doing / why it double-triggered when you didn’t expect it to. That way you can be sure than any “fixes” at the analysis stage are fixing the right problem.

If you’re certain that every event got triggered twice and you want to always ignore the second one, you can do it efficiently like this:

events = events[::2]

If you’re not sure, you could do some safety checks first: if you expect (from your experimental design) a known amount of time between consecutive identical triggers (like if they’re always exactly 1 second apart, or always between 1.5 and 1.75 seconds) then you could assert that first before deleting the alternating event rows. Or you could make sure that there’s always the same trigger value in each pair of rows. You can get the even and odd rows as separate arrays like this:

odd_rows = events[1::2]  # indices 1, 3, 5, ...
even_rows = events[::2]  # indices 0, 2, 4, ...
1 Like