Author Topic: Deconvolution  (Read 4707 times)

Offline phcjpp

  • Newcomer
  • Posts: 44
    • Wimbledon Astronomy
Deconvolution
« on: 2014 February 10 05:05:47 »
Hi Guys,

I have been using PI for a couple of years now but was recently introduced to CCDStack for deconvolution purposes. I, like many on this forum, fight a near daily battle to get PI deconv to work well - it can literally take hours of work to get a decent deconvolution (quite a bit of that on the star mask in some cases). In CCDStack I simply selected iterations (60 say) and clicked the 'GO' button - that is - works every time. It even tells you the improvement in FWHM at the end of the process (which is nice). I am sure there is an argument as to the flexibility of PI but am I missing something in understanding why the CCDStack method is so much easier to use ? Could PI make a 'simple deconv' available as an option ?

And to be clear this is not me trying to start a flame war! I am genuinely interested.

Many Thanks
Chris

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Deconvolution
« Reply #1 on: 2014 February 10 10:20:27 »
Quote
fight a near daily battle to get PI deconv to work well

This may imply one or more of the following:

- You are trying to deconvolve low SNR data. In this case deconvolution does not make any sense, in general.

- You are trying to deconvolve good data but without an accurate PSF model. DynamicPSF is the tool of choice for PSF modelling in PixInsight.

- You don't use deringing parameters correctly. If properly used, creating a local deringing support with StarMask (only when necessary) is a matter of minutes (seconds if your computer is on the fast side).

- Our Deconvolution tool is poor. Quite a few images out there seem to speak differently, but it might be that we are really bad at these things.

So, could you please upload one of the images that you want to deconvolve, so we can try to understand what happens?

Quote
tells you the improvement in FWHM at the end of the process (which is nice)

We have the DynamicPSF tool, along with the FWHMEccentricity and SubframeSelector scripts, whose analysis capabilities and performance may result more interesting than a "telling the improvement" thing.

Anyway, please use whatever tool that fits your needs.
« Last Edit: 2014 February 10 11:10:46 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Deconvolution
« Reply #2 on: 2014 February 10 11:49:59 »
I am interested in this conversation as a relatively new user I found deconvolution very difficult until I compiled from several sources the following checklist (The tabs are lost in the formatting, but there are sections here):



8.   Deconvolute
a.   Dynamic PSF
i.   50-80 stars (SELECT ALL)
ii.   Moffat only
iii.   Save output image for use later
b.   Star Mask
i.   First Panel
1.   0.02 noise
2.   6-7 scale
ii.   Next Panel (Structure Growth)
1.   2
2.   2
3.   3
iii.   Next Panel (Mask Generation)
1.   16
2.   Do not Check Invert (Black background)
3.   It is VERY important to build a suitable local support for deringing: I usually use a StarMask that covers well the brightest stars with 10-15 pixel of smoothness and truncation at about 0.75. Then I finally fine trim deringing with a very small (usually less than 0.002) amount of global deringing. As a first step I try deconvolution without deringing, than I try to build the mask in such a way that all the "rings" around stars are covered.  Bye Edo
c.   Luminance Mask
i.   Clone Image
ii.   STF and Histogram to non-linear
iii.   Shadows moved just to left of first light?
iv.   Apply to image (Do not invert?)…..(Red background)
d.   Deconvolution itself
i.   Select Previews (Dark, light, stars)
ii.   Apply L-mask and background should be red
iii.   External PSF image file
iv.   Algorithm
1.   Regularized
2.   Iterations 25-50
v.   Deringing
1.   Dark 0.005->0.01->0.07 if rings show up around stars
2.   Use star mask





Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline phcjpp

  • Newcomer
  • Posts: 44
    • Wimbledon Astronomy
Re: Deconvolution
« Reply #3 on: 2014 February 10 12:07:44 »
Hey jerryyyyy,

You kinda supported me there - I too follow a similar workflow and in the end I will get a good result. The funny thing is I can get a similar result by pressing 1 button in CCDStack :) hence my interest

Juan - I actually already went though a deconv process in a separate thread a while back and got quite some excellent help with the star mask.

http://pixinsight.com/forum/index.php?topic=6001.msg40728#msg40728

I am perfectly happy to build a PSF and star masks and local support masks then spend a while playing with global dark settings to get a result but I was interested to understand why it is not just a button press. E.g colour calibration is essentially a button press as are many of the other powerful routines within PI. I find it interesting that the star mask when built as described in that link also becomes (sort of) a button press - formulaic if you like.

Again my aim here was not to stir things up but rather to understand the differences in approach.

Many thanks
Chris

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Deconvolution
« Reply #4 on: 2014 February 10 14:13:08 »
Our tool implements the regularized Richardson-Lucy and Van Cittert deconvolution algorithms described by Starck and Murtagh in several books:

J.L. Starck and F. Murtagh, Astronomical Image and Data Analysis, Springer, 2006, second edition.

J.L. Starck and F. Murtagh, Astronomical Image and Data Analysis, Springer, 2002.

J.L. Starck, F. Murtagh, and A. Bijaoui, Image Processing and Data Analysis: The Multiscale Approach, Cambridge University Press, Cambridge (GB), 1998.

Regularized deconvolution uses wavelets to separate significant structures from the noise at each iteration, so that only significant structures are enhanced while the noise is suppressed or attenuated.

Our implementation adds two deringing algorithms to prevent and fix undershoot artifacts generated around jump discontinuities:

- Global deringing works at the end of the deconvolution process by detecting undershoot structures and recovering them with original data.

- Local deringing works at each iteration by detecting and cancelling growth of undershoot regions, guided by a support image.

Finally, the regularization section of the Deconvolution tool allows you to fine tune the wavelet decomposition for noise detection and suppression. If properly used, these parameters remove the need to use a lightness mask to protect background areas in most cases.

Our Deconvolution tool is a flexible and rigorous  implementation of quite sophisticated image processing algorithms. It is orders of magnitude more complex than the ColorCalibration tool, and definitely is not a one-button solution. If you are interested, you can take a look at the source code of the BackgroundNeutralization and ColorCalibration tools, which are part of our open-source PCL development framework. You'll see that these processes are actually quite simple.

We don't have a one-button solution for deconvolution, mainly because we are not interested in one-button things. We prefer powerful and flexible implementations that provide full control over the relevant elements of each process.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline bhwolf

  • Member
  • *
  • Posts: 53
Re: Deconvolution
« Reply #5 on: 2014 February 12 12:46:50 »
I really haven't done much with deconvolution, but powerful and flexible is not exclusive of simplicity.  Take auto-STF.  I find it does a fantastic job in one press.  Like most people (I would think) I often take auto-STF to the histogram, and tweak from there when going non-linear.   I'm not suggesting where you should or shouldn't spend your development time, but just stating an algorithm that dials things in could make the tool more powerful, not less. 

Offline mads0100

  • PixInsight Addict
  • ***
  • Posts: 116
Re: Deconvolution
« Reply #6 on: 2014 February 12 17:50:27 »
I follow Jerome's process and it works pretty well for me.  At first it took awhile to figure out what made a difference (de-ringing with the very low numbers works good for me). It's not one stop easy, but the results are fantastic.