calculate square displacement of a track/trajectory as a function of time/step. data.frame has two column, x and y also calculate dx, dy bivariate squareDispCpp is the cpp version of squareDisp

squareDisp(track,dt=1,resolution=0.107)
squareDispCpp(track,dt=1,resolution=0.107)

Arguments

track

track dataframe with x and y coordinates.

dt

time step size(in frames).

resolution

resolution value, default is 0.107.

Value

  • list of square displacements(dx^2 + dy^2) for varying dt values from 1 to dt

Examples

folder1=system.file('extdata','SWR1',package='sojourner') folder2=system.file('extdata','HTZ1',package='sojourner') trackll=compareFolder(folders=c(folder1,folder2), input=3)
#> #> Reading ParticleTracker file: SWR1_WT_140mW_image6.csv ... #> #> mage6 read and processed. #> #> Process complete. #> #> Merging of folder SWR1 complete. #> #> ... #> #> Reading ParticleTracker file: HTZ1_140mW_WT.csv ... #> #> mW_WT read and processed. #> #> Process complete. #> #> Merging of folder HTZ1 complete. #> #> ...
#use default filter with min=7 filtered.trackll=filterTrack(trackll)
#> applying filter, min 7 max Inf
track.dt=squareDisp(filtered.trackll[[1]][[1]],dt=6)