Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape onset latency figure #161

Open
5 tasks
sannatitus opened this issue Apr 12, 2024 · 1 comment
Open
5 tasks

Escape onset latency figure #161

sannatitus opened this issue Apr 12, 2024 · 1 comment

Comments

@sannatitus
Copy link
Collaborator

sannatitus commented Apr 12, 2024

On 12/4/24 Troy requested a figure describing latency in escape onset. We are suspicious that only a few crabs are escaping from the stimulus, while other crabs trigger escape because of their conspecifics. Chatting with Sofia & Nik, we think the best way to approach this is to compare velocity (displacement of a bounding box's centroid between frame t and t+1) against time to identify which crab(s) began escape first (acceleration will likely be too noisy).

"Caveats:

  • distances are not "true magnitude", since we don't correct for 3D (yet). Speed will be based on translation on the image plane (rather than on the ground), so animals that are far will appear to move less in the same amount of time (hence will seem slower).
  • we will likely need to pay attention to filtering/smoothing: we probably will need to smooth the trajectories a bit to have a not too noisy velocity vector, but this may affect the measured latency. A good option may be a SG filter, which preserve a bit more high freq components"

To achieve this:

  1. @nikk-nikaznan & @sfmig to provide preliminary or mock tracking data
  2. @sannatitus to compose pilot script to:
  • locate bounding box centroid
  • determine centroid displacement of bounding boxes with identical tracking IDs across frames - movement package may be helpful
  • for each tracking ID, compute velocity at each t+1 frame (Sofia says copute velcity vector with python functionality, 'then the norm of that vector for the speed' - maybe @sfmig can clarify later what she means by norm of that vector, i.e., presuming no acceleration?)
  • graph velocity over time to compare all tracking IDs
  • identify whether some individuals initiated escape prior to others (if a response gap is not naturally observed from Vmax delays among crabs, we may need to define speed threshold considered as escape onset and compute onset delay in ms for all individuals from the first identified escapee). potentially insiring source 1 & 2.
@sfmig
Copy link
Collaborator

sfmig commented Jun 14, 2024

Working on the following PRs in movement:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants