Calculates the angular speed in rad/frame by comparing the angle of velocity vectors calculated across
flyturn(trx, framelag = 6)
a track data frame (only requires CTrax output variables)
the number of frames to derive across; defaults to 6
For each timepoint t the speed vector is calculated between
t, and then between
The angles are extracted from these two vectors and subtracted to yield the change in angle over
This creates a lot of problems when the angles are close to the discontinuity of 2pi and needs sorting out.
Currently this leaves
framelag NAs at the beginning and end of each track. This causes all sorts of problems
and may be best addressed somehow in the future.
Realistic data observation suggests that any angles over pi/2 are either artefacts or discontinuity errors, but at the moment they are not
A numeric vector matching the structure of
trx containing the angular speed value for each object and timepoint, or
NAs when it can't be calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.