turned back to the 6 order fit
@@ -33,8 +33,8 @@ def calibrate_z(locs, info, d, magnification_factor, path=None):
# Fits calibration curve to the mean of each frame
mean_sx = _np.array([_np.mean(locs.sx[locs.frame == _]) for _ in frame_range])
mean_sy = _np.array([_np.mean(locs.sy[locs.frame == _]) for _ in frame_range])
- cx = _np.polyfit(z_range, mean_sx, 1, full=False)
- cy = _np.polyfit(z_range, mean_sy, 1, full=False)
+ cx = _np.polyfit(z_range, mean_sx, 6, full=False)
+ cy = _np.polyfit(z_range, mean_sy, 6, full=False)
polyx = _np.poly1d(cx)
polyy = _np.poly1d(cy)
