Author Topic: how to prevent from the spaghetti artefacts from deconvolution  (Read 1145 times)

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
    • View Profile
Hello,

I'm trying to apply a deconvolution to my L channel (synthetic, linear) (right after DBE and color calibration) and I'm getting those famous spaghetti artefacts.
Please find attached 3 (very close-up, original resolution is w=10850 h=7210) screenshots. One without deconvolution, one with 10 iterations and one with 50 iterations.

As you can see on the 50 iterations, there are spaghetti "donuts" around stars. On the 10 iterations it's not that bad I guess.

What I don't understand is why I'm getting those spaghetti and how to prevent from them. Even with 20 iterations i'm already seeing them, whereas in most tutorial, ppl are running 40-50 iterations without issues? (I'm also far from getting the drastic improvements i'm seeing in most tutorial, but that's another matter. Maybe deconvolution doesn't like drizzle?).

I fine-tuned my parameters on small previews with 10 iterations. Global deringing set to 0.005, local deringing enabled (the spaghetti are not coming from the local deringing, I double-checked I'm still getting them without this feature enabled), and wavelet regularization enabled.

Maybe I'm too picky... after all, given the resolution of the image, when I'm not zooming that much, I can't see those artefacts at all, but I'm afraid those will get amplified later on during the non-linear parts. And maybe they will show if I'm printing the image at some point?

Anyway, any help/hints/thought about that matter would be appreciated.

Offline ngc1535

  • PixInsight Old Hand
  • ****
  • Posts: 304
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #1 on: 2018 February 11 15:55:04 »
Hi,

i have seen these artifacts produced with ill-matched global deringing parameters- but usually when I have things set correctly I don't.
However, perhaps the pertinent question is- are you using a (luminance) mask as well? You did not mention this. Presumably there isn't anything in the background to "sharpen" and you should protect it. For deconvolution you usually need three things- a good PSF model, a local support image, and a (luminance object ) mask.

-adam

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #2 on: 2018 February 11 23:19:23 »
thanks, I'll try playing with the global deringing parameter, but I'm afraid to lessen the deconvolution improvements (which are already quite small). I'll give it a try.

I'm already using a global mask to protect the core of the very/saturated bright/big stars (the ones which have a tendency to have donuts/dark cores). For the general background protection I'm just using the wavelet regularization parameters as often advised in many tutorials.

As a side note, it's might not be obvious from the screenshots, but this is a quite bright area i'm showing here, it's very close to the main dark lanes of M31. Thus, a background mask wouldn't help I think.

Offline ngc1535

  • PixInsight Old Hand
  • ****
  • Posts: 304
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #3 on: 2018 February 11 23:55:48 »
I think the argument for further protection of the background (meaning constraining where the sharpening occurs) is really about SNR.
In my philosophy there exists a threshold in every image below which deconvolution is not warranted/appropriate. If more sharpening/contrast is
desired for those features- the only solution is to take more images to improve the S/N if possible and "earn" the privilege to sharpen that data.
If you can't get there through regularization in the wavelet space- I think a minimum of an object mask (lightness mask in PI paralance) is really a good solution.
It isn't like it is a poorer/lazy solution or something.

So you have seen an example of oversampled data being deconvovled with many (50+) iterations by using only regularization and no mask? I would be interested in seeing it if you come across it.

-adam

P.S. A funny thing about M31 is (and M33 and a few others) is that the best data looks noisy because of the nearness. So many tiny features down the limit of what a system can resolve looks like noise compared to other galaxies for which all that is seen is the smooth glow of starlight.

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1176
    • View Profile
    • astrobin
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #4 on: 2018 February 12 00:42:33 »
Just thought I'd share a post about Deconvolution from Juan. I think his opinion on his code is worth reading.
https://pixinsight.com/forum/index.php?topic=10882.msg67753#msg67753



Adam,

Your point on noise and the nearness of some galaxies is so spot on. I first realized this when I processed some Hubble images of M82 and M51. Our hobby equipment and general location issues makes these features seem like noise but it isn't.
https://www.astrobin.com/full/80947/0/?real=&mod=
https://www.astrobin.com/full/82222/0/?image_list_page=4&nc=&real=&mod=


Mike

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #5 on: 2018 February 12 01:05:46 »
yeah, maybe i shouldn't use deconvolution at all on M31 (big object, drizzle...)...
I'm not sure anymore, but I don't know how to objectively decide that from the data. Is there any metric I could use?

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #6 on: 2018 February 12 02:02:58 »
Me again, I'd need your expertise/advices  O:)

Here are two larger field of view, one without deconvolution, and one with the 10 iterations (which seems to be close to the sweet spot to prevent from too many spaghetti artefacts).

given these two screenshots, would you keep the deconvolution and work from there, or would you skip/drop the deconvolution? (and more generally, what do you think about the results I'm getting with my deconvolution?)

deconvolution seems to slightly improve the results, but maybe I would get the same result with denoising and contrasts later on without the risk of added artefacts? what do you think?

I know I could try to fork the processing and try both with and without deconvolution, but my computer is really really slow, I'd therefore like to prevent from taking useless paths if possible ;-)

Offline macnmotion

  • Member
  • *
  • Posts: 61
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #7 on: 2018 February 12 06:39:20 »
It seems to me that there is definitely a benefit using deconvolution. However it's also pretty clear that your masing isn't great. You're getting dark ringing around the stars, so your settings probably aren't so great. The deconvolution process takes quite a bit of time to prepare, but that time is worth it. As others have said above, I would recommend really digging into the masking and protection settings which will allow you to derive the most benefits from deconvolution.

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #8 on: 2018 February 17 05:22:48 »
to close this topic, here are the result with better masking.

Thanks a lot for the help.

I'm only doing 10 iterations because I don't really like how the artefacts look like with more iterations.

I'm attaching a crop, without deconvolution, deconvolution with my old masking/settings, and the deconvolution with the new masking/settings.

I'm now indeed masking the background with a stretched/black clipped version of the image, and I slightly adjusted the global dark parameter (going from 0.005 to 0.0065).

Thanks again.

Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 480
    • View Profile
    • Billions and Billions
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #9 on: 2018 March 04 08:12:05 »
I find about 30 iterations to be my max (0.4" resolution), sometimes going as high as 50 but no more. Spaghetti (I call them worms!) is nicely controlled with a bit of Global Bright Deringing- try a setting of ~0.0025 to tame the pasta. You can then increase iterations. This isn't a matter of masking. I frequently deconvolve w/o using a range mask. If your regularization settings are good, deconvolution won't adversely affect areas of weaker signal. The tutorials at IP4AP.com and my book Inside PixInsight address the fine points of DPSF and Deconvolution quite thoroughly.
Best always, Warren

Warren A. Keller
www.ip4ap.com

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
    • View Profile
Re: how to prevent from the spaghetti artefacts from deconvolution
« Reply #10 on: 2018 March 04 12:30:36 »
thanks, I'll try the global bright.
NB: funny coincidence, I had your book at my 2nd place and I just got it back today. I'll read again that part, it's been a while  O:)