There are two problems with the maximal alignment approach:
- it is still a bit slow (though much faster than the iterative method).
- it decouples wx and wy, and the simulated annealing allows for some generally small but arbitrary jiggle in the z position of these curves relative to eachother – which is bad, (jiggle relative to z itself doesn’t matter since we recenter the z position to be zero as wx=wy anyway).
A Superior fix:
The recentering points out a fundamental point that lets us automatically compute the correct alignment –> we know exactly when each bead crosses center focus — this is the z position where it’s wx and wy curves cross (so wx=wy). Simply align the curves for all beads relative to the crossing point for that bead. Then all the wy and and wx curves should naturally align to eachother as well (since the only reason they don’t align is actually this shift, as we argued in the previous 3 posts on this subject.
This method is clearly superior:
- it is trivial to implement
- lightening fast, (well, thunder fast: matlab’s fit() to fit the optics equations is still a bit slow.
- more accurate that either the iterative or the SA approach.
Still to think about
Now maybe we should add something to discard double beads etc that have actually screwed up widths. We could fit once and then window the data and fit again, like the iterative code used to do.