PDA

View Full Version here: : A simple way of getting rid of dust donuts using PixInsight


codemonkey
18-05-2018, 12:54 PM
... well, sometimes.

First of all, this method has its limitations. It will work best on images with lots of background where the dust donuts are covering small scale structures. As luck would have it, that describes most of my galaxy images.

The basic premise is that the areas affected by vignetting and dust donuts will be darker than the background which should be of uniform brightness. Thus to make the dust donuts go away, all we need to do is identify those areas and make them as bright as the background. This is easily achieved using MultiscaleMedianTransform and a simple PixelMath formula.

The basic steps are:

1. Duplicate your image and rename it to "LS"
2. Apply MultiscaleMedianTransform to the "LS" image, using 7 layers and disabling them all except the "R" layer
3. Use PixelMath, apply the following formula to the original image: $T+(iif(LS < median(LS), median(LS)-LS, 0))

I've attached a few screenshots of the process.

As stated, this procedure has its limitations, but where it can be used it's easy and relatively quick.

gregbradley
18-05-2018, 03:59 PM
Wow, what a good tip. Dust donuts can be difficult to process out if not removed during flats.

Greg.

codemonkey
18-05-2018, 04:04 PM
Thanks Greg, hope it helps!

I used to have a flip-flat for the Esprit, but it wasn't big enough for the new scope and I haven't organised anything to do the job so I looked to synthetic solutions but couldn't find anything that worked for me on the net so I devised this.

multiweb
18-05-2018, 04:25 PM
That's pretty neat. :thumbsup:

RickS
18-05-2018, 06:19 PM
Nice technique, Lee :thumbsup:

Atmos
18-05-2018, 07:49 PM
Looks like it can work really well for large not too featured fields, as you say, galaxy fields. Wouldn't like to see it in a strong Ha region :P

I've got a bunch of images with a random tiny dust donut that I was thinking of using it on but I have a feeling there are too many features. Looks like a wonderful idea though :D

codemonkey
18-05-2018, 10:09 PM
Cheers guys.

Yeah, I can't imagine it doing very well on fields with lots of nebulosity, Colin. I often don't use flats on those anyway though because I often can't see the donuts in such fields.

The good thing about the technique is that it's so easy to try.

Shiraz
19-05-2018, 01:14 AM
nice work Lee - thanks very much for posting. Undoubtedly will use it at sometime in the future.

SimmoW
19-05-2018, 05:25 AM
Bookmarked for future emergency use! Thanks for posting.

Yes now all we need is an AI script that can fix more varied backgrounds in NB images. I would dread the naming of that!

codemonkey
19-05-2018, 09:06 AM
Thanks Ray and Simon, hope it proves useful :-)

troypiggo
21-05-2018, 12:23 PM
Nice! Thanks for sharing!

sil
21-05-2018, 01:28 PM
good tip there, good use of pixelmath too, a very powrful and underused too im my opinion.

strongmanmike
21-05-2018, 06:47 PM
Looks like a good technique Lee but how do you come up with such a pixel math formula?

Mike

codemonkey
21-05-2018, 08:49 PM
Thanks everyone :-)

Mike, I'm a software developer by trade so code and formulas like the one I posted are pretty intuitive for me.

I've also been using PixInsight for a while now and have learned some things along the way, like that $T means "the image you're applying this to" and that you can apply things conditionally much like you would in excel by using the expression "iif(some condition, expression when true, expression when false)"

I had tried a couple of other approaches before settling on this one as the others had detrimental effects on SNR or other aspects... turns out this one was easier than the others as well as better.

JimsShed
29-01-2019, 10:25 PM
You definitely get a gold star for this one. Thanks.

codemonkey
30-01-2019, 07:58 PM
No probs, Jim, hope it comes in handy!