repairGaps {celltrackR} | R Documentation |
Process Tracks Containing Gaps
Description
Many common motility analyses, such as mean square displacement plots, assume that object positions are recorded at constant time intervals. For some application domains, such as intravital imaging, this may not always be the case. This function can be used to pre-process data imaged at nonconstant intervals, provided the deviations are not too extreme.
Usage
repairGaps(x, how = "split", tol = 0.05, split.min.length = 2)
Arguments
x |
the input tracks object. |
how |
string specifying what do with tracks that contain gaps. Possible values are:
|
tol |
nonnegative number specifying by which fraction each step may deviate
from the average step duration without being considered a gap. For instance, if
the average step duration (see |
split.min.length |
nonnegative integer. For |
Value
A tracks
object with gaps fixed according to the chosen method.
Examples
## The Neutrophil data are imaged at rather nonconstant intervals
print( length( Neutrophils ) )
print( length( repairGaps( Neutrophils, tol=0.01 ) ) )