sl2pm.track_rbc module

sl2pm.track_rbc module#

sl2pm.track_rbc.mle_fit(linescan, alpha, sigma, mu, p0='ols', plasma_before_rbc=True, sigma_blur=1, delta_s=3, s_max=800, minimize_options=None)[source]#

Fit a line-scan with MLE. By default, uses initial parameters values estimated with the OLS fitting.

sl2pm.track_rbc.neg_loglike(p, linescan, alpha, sigma, mu, plasma_before_rbc=True, delta_s=4, s_max=1000)[source]#

Negative log-likelihood for localizing RBCs.

sl2pm.track_rbc.ols_fit(linescan, plasma_before_rbc=True, sigma_blur=1.5)[source]#

Quick-and-dirty RBCs localization by fitting line-scans with ordinary least-squares (OLS) optimization. Uses Gaussing blurring (STD=sigma_blur) of the image to reduce noise.

sl2pm.track_rbc.p0_ols(linescan, alpha, plasma_before_rbc=True, sigma_blur=1.5)[source]#

Intitial guess for parameters using ordinary least squares (OLS) fit. Uses Gaussing blurring (STD=sigma_blur) of the image to reduce noise.

sl2pm.track_rbc.rbc_speed(t, x, x_err)[source]#

Estimate a RBC’s speed (mm/sec) from a series of its locations, xo, and their uncertainties, x_err.