PyDDM.ddm_analysis_and_fitting.get_tau_vs_q_fit
PyDDM.ddm_analysis_and_fitting.get_tau_vs_q_fit¶
-
get_tau_vs_q_fit
(fit_results, use_new_tau=True, use_tau2=False, forced_qs=None, update_good_q_range=True)¶ From decay time (tau) vs wavevector (q), gets effective diffusion coeff and scaling exponent
This function looks at tau vs q and fits tau(q) to a powerlaw. From this we can determine an effective diffusion coefficient (or velocity). This function will also try to estimate a ‘good’ range of q values for which a power law relationship holds. To do so, it uses a linear model estimator. 1
- Parameters
fit_results (xarray Dataset) – Dataset containing fit results. Must have ‘q’ as a coordinate and have ‘Tau’ (and/or ‘Tau2’) as a parameter.
use_new_tau (bool, optional) – If True (default), uses the stretching exponent to find more representative decay time for each q value.
use_tau2 (bool, optional) – If False (default), uses ‘Tau’. This is the case if there is just one decay time in the model used.
forced_qs (list or None, optional) – If None (default), then the range of good q values for which a power law relationship holds will be estimated. If not None, must be a list of number. The first number would be the smallest index of q values and the second, the largest index.
update_good_q_range (bool, optional) – If True (default), then the range of good q values for which a power law relationship is observed will be updated using a linear model estimator.
- Returns
good_q_range (list) – List of two numbers. Low and high indices of ‘good’ q values.
slope (float) – Slope of log tau vs log q. If -2, then dynamics are diffusive. If -1, then dynamics are ballistic. If less than -2, dynamics are subdiffusive.
effective_diffconst (float) – The effective diffusion coefficient
MSD_alpha (float) – Estimated power in the relationship MSD ~ (lagtime)^power
MSD_effective_diffconst (float) – Estimated coefficient in relationship MSD = (coeff)(lagtime^power)
diffusion_coeff (float) – Diffusion coefficient found by forcing a tau ~ q^-2 power law
diffusion_coeff_std (float) – Standard deviation of previous value
velocity (float) – Velocity found by forcing a tau ~ q^-1 power law
velocity_std (float) – Standard deviation of previous value
References