Data import functionsFunctions for creating ‘viewr’ objects from external data |
|
---|---|
Import data from a CSV exported from Optitrack's Motive software |
|
Import data from a MAT file exported from Flydra software |
|
Convert data from another format into a viewr object |
|
Utility functionsFunctions for wrangling and cleaning ‘viewr’ objects |
|
Extract header info from imported viewr object |
|
Relabel the dimensions as length, width, and height |
|
Gather data columns into key-value pairs |
|
Rescale position data within a |
|
Rename subjects in the data via pattern detection |
|
Trim out artifacts and other outliers from the extremes of the tunnel |
|
Rotate a tunnel so that perches are approximately aligned |
|
Rotate and center a tunnel based on landmarks |
|
"Center" the tunnel data, i.e. translation but no rotation |
|
Select a region of interest within the tunnel |
|
Quick version of separate_trajectories() |
|
Separate rows of data into separately labeled trajectories. |
|
Retain trajectories that span a selected region of interest |
|
Bin data along a specified axis |
|
Remove trajectories entirely, based on velocity thresholds |
|
Interpolate gaps within trajectories |
|
Remove subjects by trajectory number |
|
Inserts treatment and experiment information |
|
Redefine frames and time stamps on a per-trajectory basis |
|
Remove file_sub_traj entries that do not span the full region of interest |
|
Remove any duplicates or aliased frames within trajectories |
|
Remove any rows which show sharp shifts in velocity that are likely due to tracking errors |
|
Analytical functionsFunctions for quantitative analysis |
|
Find the "elbow" of a curve. |
|
Get instantaneous velocity for subjects |
|
Recompute trajectory-specific velocities |
|
Calculate minimum distance to lateral and end walls in a box-shaped experimental tunnel |
|
Calculate minimum distance to lateral and end walls in a V-shaped experimental tunnel |
|
Estimate visual angles from a subject's perspective in an experimental tunnel |
|
Estimate the spatial frequency of visual stimuli from the subject's perspective in an experimental tunnel. |
|
Compute distance between a point and a line |
|
Compute the cross product of two 3D vectors |
|
Convert radians to degrees |
|
Convert degrees to radians |
|
Compute an angle in 2D space |
|
Compute an angle in 3D space |
|
Plotting functionsFunctions for plotting ‘viewr’ objects |
|
Visualize the consequence of using various max_frame_gap values |
|
Plot each trajectory within a viewr object |
|
Plot trajectories and density plots of position by subject |
|
All-in-one functionsComplete data import and cleaning pipelines |
|
All-in-one function to clean imported objects |
|
Import + clean_viewr() |
|
Batch analysis functionsFunctions for the analysis of multiple files or |
|
Batch import of files for either Motive or Flydra (but not a mix of both) |
|
Batch clean viewr files |
|
Batch import and clean files |
|
Bind viewr objects |