Description Usage Arguments Details Value See Also
Defines whether a single animal is moving according to:
1 2 3 4 5 6 | max_velocity_detector(data, time_window_length,
velocity_correction_coef = 0.003, masking_duration = 6)
max_velocity_detector_legacy(data, velocity_threshold = 0.006)
virtual_beam_cross_detector(data, time_window_length)
|
data |
data.table::data.table containing behavioural variables of a single animal (no id).
It must have the columns |
time_window_length |
number of seconds to be used by the motion classifier. This corresponds to the sampling period of the output data. |
velocity_correction_coef |
an empirical coefficient to correct velocity with respect to variable framerate. |
masking_duration |
number of seconds during which any movement is ignored (velocity is set to 0) after a stimulus is delivered (a.k.a. interaction). |
velocity_threshold |
uncorrected velocity above which an animal is classified as ‘moving’ (for the legacy version). |
Validated and corrected subpixel velocity (max_velocity_detector), the most rigorous
Uncorrected subpixel velocity (max_velocity_detector_legacy)
Crossing a virtual beam in the middle of the region of interest (virtual_beam_cross_detector)
max_velocity_detector is the default movement classification for real-time ethoscope experiments. It is benchmarked against human-generated ground truth.
These functions are rarely called directly, but typically used is in the context of sleep_annotation.
an object of the same type as data
(i.e. data.table::data.table or behavr::behavr) with additional columns:
moving
Logical, TRUE iff. motion was detected.
beam_crosses
The number of beam crosses
(when the animal crosses x = 0.5 – that is the midpoint of the region of interest) within the time window
max_velocity
The maximal velocity within the time window.
The resulting data is sampled at a period equals to time_window_length
.
sleep_annotation – which requieres a motion detector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.