Wrangle, Analyze, and Visualize Animal Movement Data
Convert data from another format into a viewr object
Bind viewr objects
Calculate minimum distance to lateral and end walls in a box-shaped ex...
Calculate minimum distance to lateral and end walls in a V-shaped expe...
Remove file_sub_traj entries that do not span the full region of inter...
Batch clean viewr files
All-in-one function to clean imported objects
Convert degrees to radians
Remove trajectories entirely, based on velocity thresholds
Interpolate gaps within trajectories
Find the "elbow" of a curve.
Gather data columns into key-value pairs
Compute an angle in 2D space
Compute an angle in 3D space
Compute the cross product of two 3D vectors
Compute distance between a point and a line
Retain trajectories that span a selected region of interest
Extract header info from imported viewr object
Estimate the spatial frequency of visual stimuli from the subject's pe...
Recompute trajectory-specific velocities
Get instantaneous velocity for subjects
Estimate visual angles from a subject's perspective in an experimental...
Batch import and clean files
Import + clean_viewr()
Batch import of files for either Motive or Flydra (but not a mix of bo...
Inserts treatment and experiment information
pathviewr: Wrangle, Analyze, and Visualize Animal Movement Data
Pipe operator
Plot trajectories and density plots of position by subject
Plot each trajectory within a viewr object
Quick version of separate_trajectories()
Convert radians to degrees
Import data from a MAT file exported from Flydra software
Import data from a CSV exported from Optitrack's Motive software
"Center" the tunnel data, i.e. translation but no rotation
Relabel the dimensions as length, width, and height
Remove any duplicates or aliased frames within trajectories
Remove any rows which show sharp shifts in velocity that are likely du...
Rename subjects in the data via pattern detection
Rescale position data within a viewr object
Remove subjects by trajectory number
Rotate a tunnel so that perches are approximately aligned
Bin data along a specified axis
Select a region of interest within the tunnel
Separate rows of data into separately labeled trajectories.
Redefine frames and time stamps on a per-trajectory basis
Rotate and center a tunnel based on landmarks
Trim out artifacts and other outliers from the extremes of the tunnel
Visualize the consequence of using various max_frame_gap values
Tools to import, clean, and visualize movement data, particularly from motion capture systems such as Optitrack's 'Motive', the Straw Lab's 'Flydra', or from other sources. We provide functions to remove artifacts, standardize tunnel position and tunnel axes, select a region of interest, isolate specific trajectories, fill gaps in trajectory data, and calculate 3D and per-axis velocity. For experiments of visual guidance, we also provide functions that use subject position to estimate perception of visual stimuli.
Useful links