Skip to content

Commit

Permalink
diffusion: fix rare invalid value warning
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepVanlier committed Jul 17, 2024
1 parent 28eb430 commit 521c948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lumicks/pylake/kymotracker/detail/msd_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def estimate_diffusion_constant_simple(
to_time = 1.0 / (2.0 * time_step)
return DiffusionEstimate(
value=slope * to_time,
std_err=np.sqrt(var_slope) * to_time,
std_err=np.sqrt(np.abs(var_slope)) * to_time,
num_lags=max_lag,
num_points=len(coordinate),
localization_variance=intercept / 2.0,
Expand Down

0 comments on commit 521c948

Please sign in to comment.