AllenNeuralDynamics / aind-dynamic-foraging-data-utils

Tools for the analysis of behavior and neural data from the dynamic foraging task
MIT License
2 stars 0 forks source link

Trial start/stop time do not tile time #35

Closed alexpiet closed 1 month ago

alexpiet commented 2 months ago

Something that feels strange to me is that the start and stop times of trials do not fully tile time. By that I mean there is a ~16ms gap between when one trial stops and the next starts. Its unclear to me whether this is (1) intentional, (2) a necessary artifact of some Bonsai/Harp process, (3) a bug in how we define the trials.

Example:

Screenshot 2024-08-28 at 10 46 38 AM

Its very handy to have the trials tile time, because then you can reliably index any timestamp to the current trial. If trials don't tile time, then there are timepoints that are in "no trial" which is annoying. The obvious work around is just to use the start times of each trial. But I wanted to discuss whether this was intentional or not. @hanhou @XX-Yin @ZhixiaoSu

XX-Yin commented 2 months ago

The ~16ms gap is expected, but not intentional. It's mainly caused by the communication time between bonsai and the python GUI.

hanhou commented 2 months ago

The obvious work around is just to use the start times of each trial.

Yes, let's do this.