slitflow.trj.msd module
- class Each(info_path=None)[source]
Bases:
TableMean Square Displacement of each trajectory.
- Parameters:
- Returns:
Mean square displacement with time interval
- Return type:
Examples
Calculate MSDs of each trajectory.
# D2 is from the trj.random.Walk2DCenter example D3 = sf.trj.msd.Each() D3.run([D2], {"group_depth": 2, "split_depth": 0}) print(D3.data[0]) img_no trj_no interval msd # 0 1 1 0.0 0.000000 # 1 1 1 0.1 0.057107 # 2 1 1 0.2 0.032046 # 3 1 1 0.3 0.063900 # ... # 33 2 3 0.3 0.146120 # 34 2 3 0.4 0.222287 # 35 2 3 0.5 0.310305
- static process(reqs, param)[source]
Mean Square Displacement of each trajectory.
- Parameters:
reqs[0] (pandas.DataFrame) – Table containing X,Y-coordinate of trajectories. Required column;
trj_no,x_(length_unit),y_(length_unit).param["interval"] (float) – Time interval of trajectory.
- Returns:
Mean square displacement with time interval
- Return type:
- class FitAnom(info_path=None)[source]
Bases:
TableFitting parameters fitted from MSD with 4Dt^a.
If fitting is failed, this class returns initial values; D=value calculated from initial slope, alpha=0.5.
- Parameters:
reqs[0] (Table) – MSD Table. Required param;
interval,length_unit. Required column;msd.param["step"] (int) – Step number for fitting from interval=0.
param["log_d"] (bool, optional) – Whether to add log10 scale for D. Defaults to False.
param["group_depth"] (int) – Data split depth for fitting.
param["split_depth"] (int) – File split depth number.
- Returns:
Table containing the list of fitting parameters.
- Return type:
- static process(reqs, param)[source]
Fitting parameters fitted from MSD with 4Dt^a.
If fitting is failed, this class returns initial values; D=value calculated from initial slope, alpha=0.5.
- Parameters:
reqs[0] (pandas.DataFrame) – MSD table containing
intervalandmsdcolumns.param["step"] (int) – Step number for fitting from interval=0.
param["interval"] (float) – Time interval in second.
param["log_d"] (bool, optional) – Whether to add log10 scale for D.
- Returns:
List of fitting parameters
- Return type:
- class ModelAnom(info_path=None)[source]
Bases:
TableModel curve of MSD with 4Dt^a.
- Parameters:
reqs[0] (FitAnom) – Table containing fitting parameters of MSD with anomalous diffusion. Required columns;
diff_coeff,alpha. Required params;length_unit,param["x_lims"] (list of float) – Minimum and maximum position of x-axis.
param["step"] (float) – Step size of x-axis for the model curve.
param["group_depth"] (int) – Data split depth.
param["split_depth"] (int) – File split depth number.
- Returns:
Model curve Table
- Return type:
- static process(reqs, param)[source]
Model curve of MSD with 4Dt^a.
- Parameters:
reqs[0] (pandas.DataFrame) – Fitting parameters of MSD with anomalous diffusion. Required columns;
diff_coeff,alpha.param["x_lims"] (list of float) – Minimum and maximum position of x-axis.
param["step"] (float) – Step size of x-axis for the model curve.
- Returns:
Model curve table
- Return type:
- class FitSimple(info_path=None)[source]
Bases:
TableDiffusion coefficients from MSD fitted with a simple 4Dt.
- Parameters:
- Returns:
Table containing the list of diffusion coefficient
- Return type:
- static process(reqs, param)[source]
Diffusion coefficients from MSD fitted with a simple 4Dt.
- Parameters:
reqs[0] (pandas.DataFrame) – MSD table. Required columns;
interval,msd.param["step"] (int) – Step number for fitting from interval=0.
- Returns:
List of diffusion coefficient
- Return type:
- class ModelSimple(info_path=None)[source]
Bases:
TableModel curve of MSD with 4Dt.
- Parameters:
reqs[0] (FitSimple) – Table containing fitting parameters. Required column;
diff_coeff. Required params;length_unit.param["x_lims"] (list of float) – Minimum and maximum position of x-axis.
param["step"] (float) – The step size of x-axis of the model curve.
param["group_depth"] (int) – Data split depth to calculate model.
param["split_depth"] (int) – File split depth number.
- Returns:
Model curve Table
- Return type:
- class DfromDeltaV(info_path=None)[source]
Bases:
TableDiffusion coefficients from differential velocity with simple 4Dt.
- Parameters:
reqs[0] (Table) – Trajectory Table. Required columns;
x_(length_unit),y_(length_unit). Required params;length_unit.param["calc_cols"] (list of str) – Column names to calculate diffusion coefficients.
param["group_depth"] (int) – Data split depth.
param["split_depth"] (int) – File split depth number.
- Returns:
Diffusion coefficient of each trajectory
- Return type:
- static process(reqs, param)[source]
Diffusion coefficients from differential velocity with simple 4Dt.
- Parameters:
reqs[0] (pandas.DataFrame) – Trajectory Table. Required columns;
x_(length_unit),y_(length_unit).param["calc_cols"] (list of str) – Column names to calculate diffusion coefficients.
- Returns:
Diffusion coefficient of each trajectory
- Return type:
- class FitConfSaxton(info_path=None)[source]
Bases:
TableFitting parameters fitted from MSD with Saxton confined model.
This model is approximation of Appendix B B14 equation in Saxton, M.J., 1993. Biophys. J. 64, 1766-1780. Only n=1 is used from the summation in the equation.
If fitting is failed, this class returns initial values; D=value calculated from initial slope, alpha=0.5.
- Parameters:
- Returns:
Table containing the list of fitting parameters
- Return type:
- static process(reqs, param)[source]
Fitting parameters fitted from MSD with Saxton confined model.
If fitting is failed, this class returns initial values; D=value calculated from initial slope, r=final value of MSD.
- Parameters:
reqs[0] (pandas.DataFrame) – MSD table. Required columns;
interval,msd.param["step"] (int) – Step number for fitting from interval=0.
param["interval"] (float) – Time interval in second.
- Returns:
List of fitting parameters
- Return type:
- class ModelConfSaxton(info_path=None)[source]
Bases:
TableModel curve of MSD with Saxton confined model.
- Parameters:
reqs[0] (FitConfSaxton) – Table containing fitting parameters of MSD with confined diffusion. Required columns;
diff_coeff,r. Required params;length_unit.param["x_lims"] (list of float) – Minimum and maximum position of x-axis.
param["step"] (float) – Step size of x-axis for the model curve.
param["group_depth"] (int) – Data split depth.
param["split_depth"] (int) – File split depth number.
- Returns:
Model curve Table
- Return type:
- static process(reqs, param)[source]
Model curve of MSD with Saxton confined model.
- Parameters:
reqs[0] (pandas.DataFrame) – Fitting parameters of MSD with confined diffusion. Required columns;
diff_coeff,r.param["x_lims"] (list of float) – Minimum and maximum position of x-axis.
param["step"] (float) – Step size of x-axis for the model curve.
- Returns:
Model curve table
- Return type: