aolabNeuro / brain-python-interface

Other
4 stars 2 forks source link

Pause state #132

Closed katherineperks closed 1 year ago

katherineperks commented 1 year ago

Pause is no longer synced immediately, but on the next cycle. Pausing at any point during the task ends the current trial and resuming sends bmi3d to the "wait" state of the next trial. The interrupted trial will not have a corresponding "TRIAL_END" event because it did not reach an end state (i.e. penalty or reward). Instead, "PAUSE_START" is sent upon pausing and "PAUSE_END" upon resuming. To find the number of trials played, both "TRIAL_END" and "PAUSE_START" (or "PAUSE_END") events must be counted.

katherineperks commented 1 year ago

I added a check in experiment.py to use the old method of sending a PAUSE sync event immediately if the current experiment has no pause state. Otherwise, pausing will send a PAUSE_START sync event and resuming will send a PAUSE_END sync event.