Question about three parameters to estimate PSF with 'Diffraction PSF 3D' plugin



Hello everyone,

This post is to see if someone could help me to clarify three input parameters of the Diffraction PSF 3D Plugin (longitudinal spherical aberration, image pixel spacing and slice spacing (z)). Below are some details:

I am trying to use the Diffraction PSF 3D and create an estimated PSF for the Images I am working with, which are 3D images obtained with a Confocal Laser Scanning Microscope.

On the ‘Specify PSF’ window, there are some parameters I need to set. I tried to read through some documentation ( but I am not sure of what to input in three parameters:

  • Longitudinal spherical aberration at max. aperture, same units
  • Image pixel spacing, same units (ccd cell spacing / magification) (I used 20 initially, 20x lens though I am not sure of it)
  • slice spacing (z), same units ( Also used 20 initially)

The screenshot of the “Specify PSF window” has the parameters of the lenses and medium (NA 0.75, IR 1.000, Magnification 20x) and excitation wavelength (the sample used eGFP with lambda 488 nm)

I understand that the longitudinal spherical aberration is the type of aberration that affects the light distribution in the axial direction. Unfortunately, I am not sure what is the proper way to calculate it or if I have the information that I need to calculate it.


I really appreciate if someone who knows more about deconvolution could help me on this. In case additional information is needed I will provide what I can as fast as I can.



Hi @leandroscholz

I don’t know this plugin in detail. I am not sure how Longitudinal Spherical Aberration is computed.
I might be able to help you with a couple of things… (I am a programmer/signal processing guy, not a microscopist, so a good microscopist may be able to give you better advice on filling out the scope parameters)

  1. Image Pixel Spacing, is the image pixel size (usually between 100 and a few hundred nanometers)
  2. Slice spacing is the distance between z-planes, ussually a few hundred nanometers, most often it is ~2-3 times bigger than the pixel spacing. That’s because lateral resolution is better than axial, and the slice spacing is chosen based on resolution.
  3. The above two parameters might be in the meta data of your image
  4. Does this plugin have a “confocal” mode?? I don’t see one. If it is a widefield PSF you will have to square the PSF to use it with a confocal image.
  5. You also might want to look at the Big Lab PSF plugin. It has a Gibson Lanni model, and the parameters that determine the SA in the Gibson Lanni model are more intuitive (sample refractive index, and distance from coverslip). I don’t think PSF Generator has a confocal modality, so again you’d have to square it, to use with a confocal image.


@bnortham Thanks for the reply! So, in the end, some of the terms (1 and 2) from your answers were much simpler than I thought. They just used names I didn’t know were exatcly synonyms.

I don’t think so.

This plugin option seems to be more complete. I will look at it.
What I will probably do is obtain a PSF and then use the iterative deconvolve 3D plugin.

I have an additional question: When you say square it, what operation do you mean? (Sorry if the question is too simple).

Thanks again!


Multiply the PSF by itself see this thread Richardson Lucy TV deconvolution

Also you may want to try a measured PSF using beads. Deconvolution from true psf with beads

There is also some deconvolution utilties in image-scripting, they appear under Templates->Deconvolution on the script editor. I added a script to extract the measured PSF from beads but I’m not sure if that is being distributed yet (@ctrueden when was the last time imagej-scripting was released?).

I also recommend DeconvolutionLab2. Which I haven’t actually used myself, but I used Deoncolution Lab 1, and it was good, so the sequel must be better right??


Check out this page:

It shows the release status of all components. The imagej-scripting component was last released 2017-05-24@16:09:49, and last updated 2017-10-05@23:29:16, and its current status is “Cut” which means a new release needs to be created to bring things back up to date with the current master branch.

Actually, due to the recent Travis updates, nearly all components now need a new release to make that page happy.

I am cutting release 0.7.0 of imagej-scripting now. Stay tuned! Release 0.7.0 of imagej-scripting now exists! @bnorthan Henceforth, it is now possible for you to cut your own releases of this (or any) component by using the script as described on the wiki.

Note that the page does not update automatically after every release, but only nightly. And actually at the moment, not even nightly—I still need to hook it up to a Travis nightly cron job.


Hi, I just wanted thank you again @bnorthan and update on this thread what I did. For some time I set aside this activity but now I am happy to say that i was successful in deconvolving my datasets!

I used PSF Generator and DeconvolutionLab2 . I created 3 different Confocal PSF’s (squared them since the result of the PSF generator is for widefield microscopy).

In the beginning, I was having some difficulties to understand if the pixel resolution of the images had to be exactly the same of the image to be deconvolved. It appeared to me that this is not necessary, at least when using deconvolutionlab2, but I am not sure about it. The reason I think so is because the deconvolution results were much better with the PSF’s with better resolution.

I tested 3 different PSF’s, Born & Wolf, Richards & Wolf and Gibson & Lanni (GL). although I tested GL, I could not get 2 of the parameters: (1) the index of refraction of the sample, which is agar culture medium. I did some research and I saw some notes that the IR of agar is near the IR of water (2) the particle position z, which was not clear to me so I left the defauls value of 2000nm)

I ran Richardson-Lucy Total Variation and the results were not good when I set the lambda to 0,1 and with 10 iterations. I ran again with 200 iterations and it was a lot better, but the pixel intensities were much lower than the original. So I wondered: is that common? If I run 2000 Iterations or so, would the pixel intensities improve (be higher?)?

Here are maximum intensity projections of the results:

Born & Wolf (same pixel resolution) 200 iterations 0,1 lambda

Born & Wolf (improved pixel resolution 10x smaller) RLTV 200 iterations 0,1 lambda

In any case, I am reading more about it and I’m going to do some more tests. Thanks again for the help!



Hi @leandroscholz

The pixel spacing of the PSF should be the same as the pixel spacing in the original image. If you use a PSF with “better” resolution (smaller pixel spacings), the resulting deconvolution will be artificially thinned (high frequencies will be amplified), and may look better to the human eye, but isn’t necessarily a better representation of the true sample.

You could set particle position to be the position of the middle slice of the image. In reality the PSF varies with depth, however using the PSF at the middle slice is a good approximation.

200 iterations should be enough. Especially for a confocal image (because it will have less blur to begin with). The sum of intensities should be approximately the same before and after deconvolution (allowing for minor differences due to edge handling). Bright intensities should be much higher in the deconvolved. For example, in the below screen shot, the deconvolved image has larger peaks. In this case the peaks in the deconvolved image are smoother because of the regularization.

Check to see if the total sum of intensities in your PSF is ~1. If it is not 1, that would explain why you are seeing lower intensities in the deconvolved image. If that is the case try normalizing the PSF, such that the total sum of intensities is 1.

If you are interested here is the imagej-ops script I used to generate the figure…

// @OpService ops
// @UIService ui
// @ConvertService convert
// @DatasetService data
// @Dataset img
// @Dataset psf

import net.imglib2.type.numeric.real.FloatType

import ij.IJ


// normalize psf
sumpsf=new FloatType(sumpsf.getRealFloat());
psf=ops.math().divide(psf, sumpsf);

//deconvolved=ops.deconvolve().richardsonLucy(img, psf, null, null, null, null, null, 30, false, true)
//"deconvolved", deconvolved)

deconvolved=ops.deconvolve().richardsonLucyTV(img, psf, null, null, null, null, null, 30, false, true, 0.002)"deconvolved RLTV", deconvolved)