Dcoef-methods: Dcoef

Description Usage Arguments Details Value Examples

Description

Caclulate diffusion coefficient (Dcoef) for trajecotries.

Usage

1
2
3
Dcoef( MSD=NULL,trackll=NULL,dt=6,filter=c(min=7,max=Inf),rsquare=0.8,resolution=0.107,
       binwidth=NULL,method=c("static","percentage","rolling.window"),
       plot=F,output=F,t.interval=0.01,profile=NULL)

Arguments

MSD

Mean Square Displacement calculated using msd() function. Either MSD or trackll can be passed into Dcoef for calculation of diffusion coefficient.

trackll

Track list output from readDiatrack().

dt

Time intervals.

filter

a vector specifies the minimum and max length of trajecotries to be analyzed. Take only trajectories that has number of frames greater than (>=) min and less than (<) max.

rsquare

rsquare filter on Dcoef results. Default to be 0.8. Set value to 0 if rsquare filter is not desired.

resolution

ratio of pixel to <c2><b5>M.

binwidth

binwidth used for histogram. Default NULL, automatically assign binwidth.

method

"static", uses time lags 2~5 to calculate diffusion coefficient; "percentage", uses (tierd) percentage (default 0.25) of time lags (see Details). "rolling.window", time lags uses for Dcoef follows a rolling window with specified window size (default 4).

plot

A parameter for plotting. Default FALSE, no plot; If TRUE, automatically plots "histogram" with count information, binwidth can be set through parameter binwidth; as well as "density" with density/frequency.

output

An Logical indicate if output should be generated. See Values for detail.

t.interval

time interval between frames, default 0.010 s (10ms).

profile

Location of preference file. By default (NULL), it is stored at : system.file("extdata","PREF","profile.csv",package="smt"). User can provide preference file by specifying the location of the file, e.g. profile="/Users/shengliu/Desktop/profile.csv".

lag.start

time lag used as start of dt for compute Dcoef. Default 2.

lag.end

Time lag used as end of dt for compute Dcoef. Default 2.

Details

Generic parameters (parameter applied to all methods, such as resolution etc) are set in the function. Method dependent parameters (such as lag.start, lag.end for method = "static"), are stored in profile.csv in PREF folder under extdata. To change preference parameter, can either programably or manually go to folder system.file("extdata","PREF","profile.csv",package="smt"), and change the profile.csv.

method for calculating Dcoef:

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# compare files
folder=system.file("extdata","SWR1",package="smt")
trackll=readDiatrack(folder)
MSD=msd(trackll=trackll)
Dcoef(MSD=MSD,method="static",plot=TRUE)

# compare folders
folder1=system.file("extdata","SWR1",package="smt")
folder2=system.file("extdata","HTZ1",package="smt")
trackll2=compareFolder(c(folder1,folder2))
Dcoef(trackll=trackll2,method="percentage",plot=TRUE)
Dcoef(trackll=trackll2,method="rolling.window",plot=TRUE)

snjy9182/smt documentation built on May 24, 2019, 7:19 a.m.