link_particles: Function to link the particle coordinates through time

Description Usage Arguments Value

View source: R/Link_particles.R

Description

The function takes the XY-coordinates provided by the ImageJ ParticleAnalyzer and uses a standalone version of the ImageJ MOSAIC plugin ParticleLinker to create trajectories. This requires some creation of temporary files, which are subsequently deleted.

Usage

1
2
link_particles(to.data, particle.data.folder, trajectory.data.folder,
  linkrange = 1, disp = 10, start_vid = 1, memory = 512)

Arguments

to.data

path to the working directory

particle.data.folder

directory where the ParticleAnalyzer output is saved (as text files) (temporary)

trajectory.data.folder

directory where the ParticleLinker is saved (as text files) (temporary???)

linkrange

numeric value passed to the ParticleLinker specifying the range of adjacent frames which are taken into account when a trajectory is re-constructed

disp

numeric value that specifies the maximum displacement of a given particle between two frames

start_vid

numeric value to indicate whether the linking should be started with a video other than the first

memory

numeric value specifying the max amount of memory allocated to the ParticleLinker (defaults to 512)

Value

Returns a single text file per video containing the X- and Y-coordinates, the frame and a trajectory ID. The files are than automatically merged into a data.table with the movement metrics for each fix appended to the original data (NB: movement metrics often need two (e.g. step length), sometimes even three (e.g., turning angles) fixes; fixes for which metrics cannot be calculated are padded with NA). The movement parameters are the step length, the step duration, the step speed (step length/step duration), the gross displacement as the cumulative sum of the step lengths, the net displacement between the first fix of a given trajectory and the current fix and finally the relative angle (turning angle) and absolute angle (in radians). For details on these metrics, please refer to a dedicated textbook (e.g. Turch (1998): Quantitative Analysis of Movement: Measuring and Modeling Population Redistribution in Animals and Plants, Sinauer Associates, Sunderland).


pennekampster/bemovi documentation built on May 25, 2019, 12:46 a.m.