aolabNeuro / brain-python-interface

Other
4 stars 2 forks source link

end of experiment being truncated on ecube #49

Open leoscholl opened 3 years ago

leoscholl commented 3 years ago

the final event code and between 20-30 clock cycles are consistently being truncated from the end of the experiment in the ecube digital recordings.

my theory: when we command servernode to end the recording, it hasn't yet received those 20-30 cycles, due to a ~150ms delay probably due to latency between the ecube and servernode.

solution: introduce at least that much delay at the end of the experiment before commanding the ecube to stop recording. better solution: have whitematter introduce a feature that triggers recording start/stop on a given digital input

leoscholl commented 3 years ago

sort of fixed in 0300d11c5b96b4a3144384fce0a1f2ef5dd6bd42 by adding a delay before stopping ecube recording. however, the 'EXP_END' event is now not being saved to the HDF file because it has already been closed.

And can't put the 'EXP_END' event on the same cycle as startNone because that's the same cycle as the previous end* which might have a sync event, too.

Might need to inject another state at the end of the experiment to push the event? Seems difficult, there must be a better way

leoscholl commented 3 years ago

tried again in 832e8b5913ebbec49cfed49576b96606c82e9256, but now missing the EXP_END event in internal sync events record.

leoscholl commented 2 years ago

this is quite a big problem in some cases, there is 8 seconds missing from the end of a recent experiment!