Skip to the content.

libratools

libratools is a Python package for processing animal movement trajectories in the form of a series of locations (as x, y coordinates) with times. It is designed primarily for quantitative biology research projects that involve processing high-throughput tracking data.

libratools does not provide functionality to label trajectories; it operates on existing trajectories which are sequences of (x, y, time) coordinates. It can be used with any x, y, times data but is specifically built for trajectories collected using the loopbio motif video recording system and labelled with BioTracker, a computer vision framework for visual animal tracking. It does, however, provide some functionality to generate random trajectories for simulation or testing of analyses.

Installation and Setup

The package can be installed from GitHub using:

$ pip install -e . --user.

How to use libratools

libratools is itself made up of several modules which each contain specific functions to handle tasks associated with loading, pre-processing, and post-processing trajectories. These can be combined in one or more scripts to handle pre-processing and post-processing tasks. For a detailed overview of each function, see each sub-module's page below.

Sub-modules

libratools.lbt_datasets

The libratools.lbt_datasets module includes utilities to load, manipulate and save trajectory datasets.

libratools.lbt_experiment

The libratools.lbt_experiment module contains functions related to various experimental procedures, such as defining and assigning a treatment value.

libratools.lbt_impute

The libratools.lbt_impute module includes methods for detecting and imputing missing values.

libratools.lbt_inspect

The libratools.lbt_inspect module includes functions for inspecting a trajectory dataset.

libratools.lbt_metrics

The libratools.lbt_metrics module includes performance metrics, pairwise metrics and distance computations to summarize a dataset.

libratools.lbt_outlier_detection

The libratools.lbt_outlier_detection module includes methods for detecting point and subsequence outliers.

libratools.lbt_utils

The libratools.lbt_utils module includes various utilities and private functions.

Questions or suggestions?

libratools is an open-source project, users are welcome to reach out with suggestions to improve the source code and encourage contributions.

Please read CONTRIBUTING.md for details on code conventions, and the process for submitting changes via pull requests. For major changes, please open an issue first to discuss what you would like to change.