PYME.Analysis.points.astigmatism.astigTools module

PYME.Analysis.points.astigmatism.astigTools.lookup_astig_z(fres, astig_calibrations, rough_knot_spacing=75.0, plot=False)

Generates a look-up table of sorts for z based on sigma x/y fit results and calibration information. If a molecule appears on multiple planes, sigma values from both planes will be used in the look up.


fres : dict-like

Contains fit results (localizations) to be mapped in z

astig_calibrations : list

Each element is a dictionary corresponding to a multiview channel, which contains the x and y PSF widths at various z-positions

rough_knot_spacing : Float

Smoothing is applied to the sigmax/y look-up curves by fitting a cubic spline with knots spaced roughly at intervals of rough_knot_spacing (in nanometers). There is potentially rounding within the step-size of the astigmatism calibration to make knot placing more convenient.

plot : bool

Flag to toggle plotting


z : ndarray

astigmatic Z-position of each localization in fres

zerr : ndarray

discrepancies between sigma values and the PSF calibration curves