Description Usage Arguments Details Value
Uses speed and location information to classify entries into stand
, run
or edge
events.
1 |
trx |
a track data frame |
sep |
the discriminant speed value between runs and stands. Set at e^-1 on the basis of eyeballed data. |
edge |
the number of pixels from the rim of the arena to be categorised as edge. |
morph |
the window for morphological operations |
runlag |
the |
The classification is based on the columns speed
(output of flymoves
or safemoves
) and radius
(output of trxgarnish
).
If these are not already included, they will be calculated ad hoc. Rows with NAs (with the exception of turn
, which is tolerated as it is not used for calculations but has more NAs than anything else)
are removed, then each point is categorised as either edge or not (by a threshold pixel distance edge
)
and either run or not (by a threshold pixel/frame speed sep
). Short running/standing bouts are eliminated
by morphological opening and closing over a window of morph
frames. Then, each entry is categorised as either
edge
, run
or stand
in the classifier variable whatis
- note that there is currently no distinction between
runs and stands in the edge region.
Note: currently the opening/closing is not run by id, so there is a bit of spillage between consecutive tracks, but it should only affect ~4 frames on each side. It would still be best to run the function via ave.
a track data frame that includes the boolean columns isedge
and isrun
and the factor column whatis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.