-
Notifications
You must be signed in to change notification settings - Fork 3
fixSubpix
This applies only to legacy C++ tracker (not multiscale).
If you do not have access to the original image data, it is still possible to recover decent subpixel resolution from the coordinate file only by doing (pseudo code) for each coordinate
pixel = round(x)
subpix = x - pixel
subpix = subpix * abs(subpix) / (0.23 * 0.23) * 0.5
x = pixel + subpix
Note that if you have 3D data and that the voxel size was (even slightly) different between X and Z, you have one more step to perform along Z
lattice_z = z / ZXratio
pixel = round(lattice_z)
subpix = lattice_z - pixel
subpix = subpix * abs(subpix) / (0.23 * 0.23) * 0.5
z = (pixel + subpix) * ZXratio
However, if you still have access to image data, I strongly suggest you re-run the (updated) tracker on it.
For the story, this bug (and the way to fix existing output) was discovered thanks to this paper:
Burov S, Figliozzi P, Lin B, Rice SA, Scherer NF, Dinner AR. Single-pixel interior filling function approach for detecting and correcting errors in particle tracking. Proc Natl Acad Sci. 2017;114(2):221-226. doi:10.1073/pnas.1619104114.