I ran into something recently in generating point spread functions for deconvolution of microscopy images, and wanted to share / spark a larger discussion (per recommendations and details in this imagej-ops github issue).
Basically, I wanted to test different implementations of this algorithm by @Jizhou_LI et. al so I tried the python version, the imagej-ops java version, and as a baseline, the same kernels from PSFGenerator.
For a Gibson-Lanni kernel (aka PSF) with nearly default arguments in all 3 implementations I was finding results that looked like this, when viewed nearly orthogonal to the z-axis:
Gibson-Lanni kernels with “Particle Position” = 2um
What came to light to in the github issue was that imagej-ops automatically crops and recenters kernels while other implementations do not, which is why the results above appear so different. As part of the Gibson-Lanni model though there is a Particle Position parameter (pZ in python/java) that can be set to 0 as a test to negate the centering differences with imagej-ops as seen here, where the kernels from all three implementations are equal:
Gibson-Lanni kernels with “Particle Position” = 0um
Questions that arise from this are:
- Is there any reason to ever not re-center a PSF as imagej-ops does? It seems like if you don’t do this, applying the PSF in deconvolution will then translate the results away from their center in an unintuitive way which may not be a big deal when working with large volumes and lots of empty space in the margins, but sounds dangerous if there are important parts of the signal near borders.
- How big should a PSF be such that you can be reasonably certain that important parts of it are not being cut off as they are in the first example above by PSFGenerator?
If anyone has any thoughts/advice it would be much appreciated!