I'm building a radiation detector that collects photons in CCD pixels and we can relate the energy of the photon from the intensity of the pixel. To test the detector, I took the following spectrum of Iron 55, which is expected to have a single peak at 6 keV:

enter image description here

The tail at lower values of the energy is interesting because it's not supposed to be there. Taking a closer look at pixels in this range, I see that they are clustered next to each other, with what seems to be energies from a single photon distributed into multiple neighboring pixels.

enter image description here

I am intrigued by the possibility of getting a cleaner spectrum by collecting these pixels together. I could try manually going through and clustering at each pixel, but I thought a more elegant way would be to deconvolve the image using a simple point spread function. In the result of this deconvolution I need 2 things to be true:

  1. the energy of the system should be conserved, so the sum of the pixels (the $L_1$ norm) should be conserved.
  2. there should be no negative pixel intensities, since those are unphysical.

I did that, using a Gaussian PSF with a half-pixel standard deviation. However, I find that I either need to violate condition 1 of my requirements, or condition 2 of my requirements. Just using the gaussian PSF with $L_1$ norm 1, which conserves the energy, gives me a plot like this:

enter image description here

The white pixels are negative, unphysical values. At this point I'm stumped, but also obsessed with this problem, because it seems like it should have a clean solution. Any advice?

  • $\begingroup$ How are you doing the deconvolution? Possible issues: a Gaussian PSF is a good assumption, but it might not be exact enough; the estimated size of the PSF might be off; there is noise in the system that throws off trivial deconvolution methods. Take a look at iterative solvers, and add a non-negativity constraint. There are lots of things to try, but it's hard to give advice without knowing what you've tried. $\endgroup$ Apr 27, 2018 at 1:56
  • $\begingroup$ Do you always have a single blob like this? Or multiple ones but nicely separated? If so, try fitting a Gaussian to the data, instead of deconvolving. $\endgroup$ Apr 27, 2018 at 1:57
  • $\begingroup$ Without knowing the experimental set up its hard to understand why the extra photons are where they are, but would not a better /complimentary solution be to look at your experiment and eliminate them at source? $\endgroup$
    – porphyrin
    May 1, 2018 at 8:27
  • $\begingroup$ @porphyrin they're not extra photons, they are a single photon being read by multiple pixels either via some process on the CCD chip whether that is imperfect absorption/scattering or voltage leaking across pixels. Would be hard to eliminate without designing very specialized equipment which could be a multi-year project by itself $\endgroup$
    – Mike Flynn
    May 1, 2018 at 22:57
  • $\begingroup$ Do you mean that as the photon is so energetic that some energy is removed by absorption at a ccd pixel then the remaining energy (as a photon ?) is scattered in some way and detected again but now with lower energy. This would be consistent with your spectrum. $\endgroup$
    – porphyrin
    May 2, 2018 at 6:43

1 Answer 1


There is some work on resolving point sources from their smoothed signal called super-resolution, along with some elegant methods to solve it using convex-programming. The idea is that if you know that your signal consists of spikes (single points of energy), you can resolve them from the smoothed signal, even when the smoothing causes interference between spikes.

I used this method in my PhD to find the amplitude of 1D spikes from low-pass filtered signals, using the research published here (not mine). I didn't look at 2D signals like yours, but I recall that some work has been done on it, so you might be able to find some code.

For your method, I'm guessing the negative pixels occur because the smearing isn't exactly modelled by your PSF

What about something simple:

  • Assume that the smear occurs within a 3 x 3 radius.
  • Convolve the image with a 3 x 3 filter of all ones. This will add all the values in that area.
  • Find the points of local maxima in a 3 x 3 radius in the original image.
  • Replace the value of those points with those of the convolved image and zero the rest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.