Add example for annotating behavioural events with BORIS#865
Add example for annotating behavioural events with BORIS#865HollyMorley wants to merge 10 commits intoneuroinformatics-unit:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #865 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 36 38 +2
Lines 2205 2284 +79
=========================================
+ Hits 2205 2284 +79 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
Hi @niksirbi and @sfmig.
I have implemented the Observations > Add frame indexes step in the example and it does work as expected on this dataset. However, I still have some uncertainty on exactly how frame indices are assigned - it seems this is delegated to the media player but my understanding is limited beyond this! Given the automatically generated frame indices were equal to my original approach of Let me know your thoughts! :) |
|
Thanks for the example, and for doing the digging into the frame issue @HollyMorley! I've assigned this PR to myself for review, and I'll come back with comments when I've formed a full picture. |



Description
What is this PR
Why is this PR needed?
This PR adds an example demonstrating how one could generate and integrate per-timepoint behavioural event labels alongside pose tracking data in
movement. Event labels are a common component in behavioural analyses, whether derived from manual annotation tools such as BORIS (Behavioural Observation Research Interactive Software) or automated classifiers. Gait phase is a good example of such a label, as identifying stance and swing phases on a per-frame and per-limb basis is required for computing typical stride parameters such as stride length, duty factor, and cadence, or for analysing full-body dynamics that are inherently modulated by gait phase.What does this PR do?
Adds a new example to the gallery using a 3D locomoting mouse dataset (
DLC_single-mouse_DBTravelator_3D).The example is named "Annotate and load events with BORIS" and demonstrates how to:
.csvfile and attach the resulting gait phase labels as non-dimension coordinates on thetimedimension.ds.sel()with boolean masks, including combining conditions across multiple limbs and multiple phases simultaneously.timedimension.Note:
DLC_single-mouse_DBTravelator_2D) is loaded solely to download the video file required for annotation in BORIS. ***EDIT: update alters this to download only the video file using pooch.References
Relates to #821, which adds the "Annotate time with events of interest" example demonstrating the non-dimension coordinate pattern that this PR builds on.
How has this PR been tested?
This example has been run locally.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
It is an update to the documentation.
Checklist: