Author Topic: Deconvolution strategies  (Read 23964 times)

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Deconvolution strategies
« on: 2012 March 28 03:13:44 »
Hi,

I have added this new tutorial to my web. If you have any comments or questions, please contact me!

http://www.manuelj.com/Tutorials/Deconvolution

Regards,
Manuel.

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: Deconvolution strategies
« Reply #1 on: 2012 March 28 05:03:15 »
Very useful, thank you for sharing !

How do you create your 2 masks ?
- 1rst one with bright stars only
- 2nd one with High SNR
Do you use StarMask function or another one ?

Why don't you use a generated PSF star for the deconvolution ?

Thank you, it is really helpful to understand another way to process ! And how deep can be PI processing steps

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: Deconvolution strategies
« Reply #2 on: 2012 March 28 05:49:58 »
Very useful, thank you for sharing !

How do you create your 2 masks ?
- 1rst one with bright stars only
- 2nd one with High SNR
Do you use StarMask function or another one ?

Why don't you use a generated PSF star for the deconvolution ?

Thank you, it is really helpful to understand another way to process ! And how deep can be PI processing steps

Hi,

I left open for the implementation to use, but in my case:

1) bright stars -> star mask
2) high SNR -> clone and histogram transform

I don't use the generated PSF because it tends to be greater than the manually calculated StdDev, so it tends to create ringing artifacts.

Regards,
Manuel.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Deconvolution strategies
« Reply #3 on: 2012 March 28 06:20:29 »
Thanks! Will study this soon.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Deconvolution strategies
« Reply #4 on: 2012 March 28 17:03:01 »
This looks really excellent. At the end you seem to suggest that deconv should be executed on linear images. I think that's correct. If so perhaps you could add that at the beginning of the tutorial?
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: Deconvolution strategies
« Reply #5 on: 2012 March 29 02:34:30 »
This looks really excellent. At the end you seem to suggest that deconv should be executed on linear images. I think that's correct. If so perhaps you could add that at the beginning of the tutorial?

Thanks!, I'll add that.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Deconvolution strategies
« Reply #6 on: 2012 March 29 04:37:32 »
Hola Manuel,

Nice tutorial. I see you are using average PSF parameters taken from the Average Star Data dialog. This is not recommended for deconvolution. A more robust and accurate PSF can be obtained by clicking the Export synthetic PSF button of DynamicPSF. The synthetic PSF image can be selected on the Deconvolution tool as an external PSF. Let me know if this works better for you.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: Deconvolution strategies
« Reply #7 on: 2012 March 29 06:17:45 »
Hola Manuel,

Nice tutorial. I see you are using average PSF parameters taken from the Average Star Data dialog. This is not recommended for deconvolution. A more robust and accurate PSF can be obtained by clicking the Export synthetic PSF button of DynamicPSF. The synthetic PSF image can be selected on the Deconvolution tool as an external PSF. Let me know if this works better for you.

No, that's what I use, the synthetic PSF image has a bigger StdDev (around 1.80) than my sweet spot one (around 1.20-1.30).

Although DPSF helps me to calculate the rotation angle and the amount of tilting of my stars

Regards,
Manuel.

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
Re: Deconvolution strategies
« Reply #8 on: 2012 March 29 11:46:19 »
Manuel, that's a well done tutorial that will be widely appreciated.

A couple of  comments.

1. In step 2 where you show the "High SNR Mask", applied to the image, the mask is inverted so it will have the opposite effect you are trying to achieve. Red pixels are protected and black unprotected so as shown, the background ie the lowest SNR area is getting most of the decon effect and the highest SNR areas in the galaxy where you want most of the deconvolution is protected. Just invert the mask so the background is red and the galaxy white.

2. To control deringing, I have found that perhaps the most important setting is the "Global Dark" The default value of 0.1 is always too high. I generally find 0.01 to 0.03 is the range required.

3. Philippe. To create the bright star mask to be used as the Local Support image in the deringing section, use the Star Mask tool with the default settings and apply it to the linear image you are going to deconvolve. This was the recommendation Juan made in a mini tutorial on decon he posted some time ago. In the resulting mask I find that a number of the stars are grey rather than white which means they will only be partially  protected. I will sometimes create this mask with Binarize checked in the Star Mask tool. The resulting mask will have the same stars but they'll be mostly white and therefore provide better protection. BTW, I find that this mask which selects the largest and brightest stars is also useful later in processing when you want to work on just these stars. The larger and brighter stars frequently are the ones you want to change with the Morph Transform tool. So, I always save this mask and use it for things in addition to decon.

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Deconvolution strategies
« Reply #9 on: 2012 March 30 01:15:21 »
Manuel,

Quote
No, that's what I use, the synthetic PSF image has a bigger StdDev (around 1.80) than my sweet spot one (around 1.20-1.30).

This is usually the expected result. The sweet spot of your telescope is a laboratory-determined spatial resolution limit. To deconvolve real deep sky images you don't want to use your sweet spot as a PSF model, but usually something larger. Or maybe we have different concepts of what the sweet spot is about---and in such case please correct me.

The PSF model that you use with deconvolution should be an accurate representation of the true point spread function that has damaged your image as a result of atmospheric turbulence, optical imperfections, tracking errors and other accidents. The profile of this function is usually larger than the sweet spot of your optical system, and in your case (focal length, pixel size) its dimensions are basically dominated by your seeing conditions.

Also bear in mind that FWHM values are in general not compatible among different PSF model functions. For example, if your PSF has a Moffat profile with a relatively large beta parameter (say from 4 to 8), then FWHM values will be systematically larger than those that you'd find by adjusting a Gaussian profile (shape parameter = 2 in the parametric function). However, a Moffat function will probably model your true PSF better than a Gaussian because the Moffat has extended 'tails' that tend to represent better the actual shape of a typical star profile, especially on oversampled images.

Average parameters are very sensitive to outliers, which are due to uncertainties caused by limited signal to noise ratio. Rotation angle and aspect ratio are two particularly sensitive and uncertain parameters.

The synthetic PSF model is more accurate and much more robust than a function reconstructed from average fitted parameters. This is because the synthetic PSF image is generated by projecting all measured PSF functions over a black background. The process is similar to what you'd obtain by taking an exposure of each measured star with an ideal sensor (zero noise, enough full well as to accumulate all star images without saturation) centered at the same pixel. Provided that a sufficient number of representative stars have been correctly measured on the image, a synthetic PSF should be better than anything that you can find by manually tweaking function parameters.
« Last Edit: 2012 March 30 01:21:01 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Deconvolution strategies
« Reply #10 on: 2012 March 30 06:23:00 »
So it sounds like Manual could show us two images, one processed with a synthetic PSF and one with one derived from the image. It could be that the synthetic PSF gives better results.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: Deconvolution strategies
« Reply #11 on: 2012 March 31 07:06:03 »
So it sounds like Manual could show us two images, one processed with a synthetic PSF and one with one derived from the image. It could be that the synthetic PSF gives better results.

Manuel!!!

http://www.manuelj.com/Other/Projects/i-Psf2Rz5/0/O/Image29.jpg

I really prefer my version, it has the most round stars, and looks more natural to me. The DPSF version has black halos, and correcting them with global dark creates bright artifacts. What would you choose? :)

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Deconvolution strategies
« Reply #12 on: 2012 March 31 07:15:46 »
Hi Manu(a)el!

Please cloud you share the settings of the deconvolution processes (or a process icon)? Have you applied the same deconvolution process to all the images? What do you mean by "global dark adjusted"?


Regards,
Vicent.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Deconvolution strategies
« Reply #13 on: 2012 March 31 07:44:49 »
I agree with your assessment Manuel.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline ManuelJ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • ManuelJ Photography
Re: Deconvolution strategies
« Reply #14 on: 2012 March 31 12:49:49 »
Hi Manu(a)el!

Please cloud you share the settings of the deconvolution processes (or a process icon)? Have you applied the same deconvolution process to all the images? What do you mean by "global dark adjusted"?


Regards,
Vicent.

Yes, my captain!.

I applied the same settings for all deconvolutions, except the P.deringingDark, which was 0.03 on the last image. This is the value where dark rings starts to disappear.

var P = new Deconvolution;
P.algorithm = Deconvolution.prototype.RichardsonLucy;
P.numberOfIterations = 50;
P.deringing = true;
P.deringingDark = 0.0000;
P.deringingBright = 0.0000;
P.deringingSupport = true;
P.deringingSupportAmount = 0.70;
P.deringingSupportViewId = "star_mask";
P.toLuminance = true;
P.psfMode = Deconvolution.prototype.Parametric;
P.psfSigma = 1.30;
P.psfShape = 2.00;
P.psfAspectRatio = 0.49;
P.psfRotationAngle = 35.00;
P.psfMotionLength = 5.00;
P.psfMotionRotationAngle = 0.00;
P.psfViewId = "PSF";
P.psfFFTSizeLimit = 15;
P.useRegularization = true;
P.waveletLayers = [ // noiseThreshold, noiseReduction
   [3.00, 1.00],
   [2.00, 0.30],
   [1.00, 0.70],
   [1.00, 0.70],
   [1.00, 0.70]
];
P.noiseModel = Deconvolution.prototype.Gaussian;
P.numberOfWaveletLayers = 2;
P.scalingFunction = Deconvolution.prototype.B3Spline5x5;
P.convergence = 0.0000;
P.rangeLow = 0.0000000;
P.rangeHigh = 0.0000000;
P.iterations = [ // count
   [50],
   
  • ,
  • [0]
    ];