PixInsight Tutorial: Inside Starnet++ [Deep Sky] Processing techniques · Alberto Ibañez · ... · 16 · 1115 · 7

H.Alfa 11.36
...
·  18 likes
Hi everyone,

I just released a new article about this wonderful process and I wanted to share here some details that I think that could be interesting for the community.

Link to the article:
https://aiastro.wordpress.com/2020/12/02/inside-starnet-wip/

The article explores 2 main subjects:

-An analysis of the standard procedure with the goal of better preparing our images to get the most from the process.
2020-06-14_22h07_10.png

-A workflow proposal to refine the result on the starless image and its corresponding starmask. This cleaning workflow allows to apply a more agressive postprocessing.
image-11.png

During the investigation I developed some interesting techniques that I think that worth to mention:

Pixel Transference

As most of you probably know, starnet++ literally subtracts the stars from our image. That means that we can express the result as a methematical expression like the following:

L_NLT = L_sn0 + L_st0

where

L_NLT = Original image (Non Linear Transformed)
L_sn0 = Starless image
L_st0 = Starmask image (here I use the term starmask for simplification, but it would be more precise to call it "star-only image" )

Note that the notation is completely arbitrary.

This simple expression opens a wide range of advanced operations. The simpler one, that I assume that almost everyone uses, would be that we don't need to reapply starnet in starmask mode to produce our starmask. Intead of this, we simply subtract the starless image from the original one:
image-37.png
Note that Rescale result is unchecked. This is mandatory for our purposes.

This is nice an efficient, but there are many more things that we can do taking profit of that procedure. Let's see some examples that are fully covered on the article.

Details Recovery
Sometimes starnet considers bright DSO structures as stars, removing them totally, or partially. We normally may want to recover them, and this can be done by following the following workflow.
image-43.png
We use the starless image to produce the starmask, on which we must look for unwanted details, that we remove with clonestamp and then transfer this details to an improved starless image by subtracting the improved starmask from the original.

Absolute starmask
I think that everyone has noticed that on the starmask produced by starnet++, some of the stars are muted, that means, their cores brightness are not 1.000.

sin-titulo-1.png
Left: Measurement of the brightness just aside of a star, before the application of starnet++ (K=0.846)
Right: Measurement of the brightness of the core of the star after starnet++ application (K=0.269)


This is not a bug or an issue, but a consecuence of the stated above: the pairing between starless and starmask is a simple subtraction. As a consecuence, the amount of lacking brightness on a core star is exactly the amount of brighness of the nebulosity behind it (on the starless image). I call this that starnet produces a relative starmask.
This fact makes very difficult, or directly impossible, to use the starmask as is, as a mask for star reduction, noise reduction and many other processed that involve the need to protect the stars.
To solve this particularity we can tranfer the remaining brightness from the starless image by using a bypass mask and simply add the starless image to the starmask. This operation equalizes all the star cores, without bloating them more than necessary.

Sin título-1-Recuperado.png
Left: Relative starmask
Right: Absolute starmask


Image Slicing (not covered on the article)
The transferring technique described here has many possibilities and you can go as far as your imagination can go.
As an example, I was exploring the following procedure, that I didn't included in the article (I'm still exploring).

From our original image, apply starnet and pair, now we have:

L_NLT = Original
L_sn0 = Starless 0
L_st0 = Starmask 0

Now we recover details from the galaxy, as shown before, and redo the pairing:

L_NLT = Original
L_sn0 = Starless 1
L_st0 = Starmask 1

Next we fix the halos from the starless image (let's call it L_sn1) BUT we don't pair to L_NLT. Instead of this, we do:

L_sn0 - L_sn1

The result will be only the halos! Let's call it L_halo.
Now is important to note that:

L_NLT = L_st0 + L_sn1 + L_halo

Now we can open L_sn1 in Photoshop and clonestamp the galaxy. This will be L_sn1_noglx, and we can do:

L_sn1 - L_sn1_noglx

...and the result will be only the galaxy that can be called L_glx. We again can rewrite the general expression as:

L_NLT = L_st0 + L_sn1_noglx + L_glx + L_halo

...and so on. The only limitiation is the ability of the user to properly isolate each element, but what is extremely powerful and important to note is that the above expressions are not approximations or concepts. They are mathematically exact.
It is important to note that this assumes no intemediate processing, specially brightness changes.

Hope you found it interesting. As always, comments and questions are welcome.

Alberto.
Edited ...
Like
mxcoppell 8.31
...
·  2 likes
This is cool!
Like
H.Alfa 11.36
...
·  2 likes
Thank you!

I made a mistake on the formulas on the Image Slicing procedure that I need to fix. Sorry!
I rewrite the updated text here:

Image Slicing (not covered on the article)
The transferring technique described here has many possibilities and you can go as far as your imagination can go.
As an example, I was exploring the following procedure, that I didn't included in the article (I'm still exploring).

From our original image, apply starnet and pair, now we have:

L_NLT = Original
L_sn0 = Starless 0
L_st0 = Starmask 0

Now we recover details from the galaxy, as shown before, and redo the pairing:

L_NLT = Original
L_sn1 = Starless 1
L_st1 = Starmask 1

L_NLT = L_st1 + L_sn1

Next we fix the halos from the starless image (let's call it L_sn2) BUT we don't pair to L_NLT. Instead of this, we do:

L_sn1 - L_sn2

The result will be only the halos! Let's call it L_halo.
Now is important to note that:

L_sn1 = L_sn2 + L_halo

so

L_NLT = L_st1 + L_sn2 + L_halo

Now we can open L_sn1 in Photoshop and clonestamp the galaxy. This will be L_sn2_noglx, and we can do:

L_sn2 - L_sn2_noglx

...and the result will be only the galaxy that can be called L_glx.

L_sn2 = L_sn2_noglx + L_glx

So we can rewrite the general expression as:

L_NLT = L_st1 + L_sn2_noglx + L_glx + L_halo
Like
mxcoppell 8.31
...
·  1 like
Next we fix the halos from the starless image (let's call it L_sn2) BUT we don't pair to L_NLT. Instead of this, we do:

L_sn1 - L_sn2

The result will be only the halos! Let's call it L_halo.
Now is important to note that:

L_sn1 = L_sn2 + L_halo

so

L_NLT = L_st1 + L_sn2 + L_halo

Alberto, this is indeed great stuff.

I've been studied your WP post got some questions.

The first one is about the latest comment you just posted (as quoted) - What is "L_sn2", it's definitely not L_NLT.

Another question about the "CLEANNING1: HALOS" section in the WP post. The discussion switched from L to RGB. I got lost on RGB_stm - is it star mask generated from RGB combined result?

If you could demo the whole process in a video that would great!

Thanks!
-Min
Like
H.Alfa 11.36
...
·  2 likes
Thank you Min! I'm so glad that you liked.

I've been checking my WP article and as you pointed I really did a mess! the RGB notation should be L. I'm fixing it.
The problem is that I started this tutorial months ago, and wrote the procedure for RGB, but latelly I considered better to work with a grayscale image to simplify and forgot to check the whole write up.

Thank you for noticing it!

Regarding your question about the slicing procedure, sorry, I don't know if I understood your question. If so, please let me know.
I understood that you're asking, What is L_sn2? In that case is the starless image on which we removed the halos.

Maybe I shouldn't use numbers for the notation. I used them because it describes a general procedure, that can be iterative.

Let me explain another example, with descriptive notation:

From our original image, apply starnet and pair, now we have:

L_NLT = Original
L_sn = Starless, produced by starnet++
L_st = Starmask, produced by pairing (Pixelmath)

...this fulfills the formula

[1] L_NLT = L_st + L_sn

L_sn
contains halos, that we don't want, so we process a clone of L_sn, remove the halos and rename as L_sn_nohalo
So L_sn_nohalo is a starless image without halos

Now we use Pixelmath to do L_sn - L_sn_nohalo and the resulting image is only the halos, this can be renamed as L_sn_onlyhalo and this fulfills...

[2] L_sn = L_sn_nohalo + L_sn_onlyhalo

Combining formulas [1] and [2] we get:

L_NLT = L_st + (L_sn_nohalo + L_sn_onlyhalo)

So we have sliced the image in 3 parts, and it can be totally recovered  in a simple PixelMath operation.
But, what if we do L_NLT - L_sn_nohalo ? The result will be a starmask WITH halos (that by the way, can be useful also).

... I think it's more clear now, isn't it?
Like
mxcoppell 8.31
...
·  1 like
Alberto,

Thanks for clarifying this. The equation now looks very clear.

I need to practice the step 3 (HALO) in your WP tutorial. Could you share a zoomed-in version of how the L-sn-onlyhalo should look like?

Part 5 (cleaning up in PS) is simply brilliant!

Thanks!
-Min
Like
H.Alfa 11.36
...
·  4 likes
Hi Min,

Great!

Of course, here's the screenshot:

2021-01-24_13h03_23.png

The photoshop cleaning is wonderful, yes. I have to thank to @Kevin Morefield  as he was who suggested this step in this topic on CN:

https://www.cloudynights.com/topic/733338-starnet-artefacts/

Best Regards.
Edited ...
Like
grsotnas 4.82
...
@Alberto Ibañez

First off, thank you very much for the thorough tutorial, it really 'opened possibilities' for post-processing starnet images I had not thought before! Very detailed, illustrated and informative! Especially on the halo reduction, that is something I will try to incorporate and experiment to really push the nebulosity in crowded stellar fields = D

I'm a huge admirer of your work, and the beautiful image used to illustrate the tutorial was also a perfect example!

Best regards,
Gabriel
Like
mxcoppell 8.31
...
Alberto Ibañez:
The photoshop cleaning is wonderful, yes. I have to thank to @Kevin Morefield  as he was who suggested this step in this topic on CN:

https://www.cloudynights.com/topic/733338-starnet-artefacts/

I have to admit that I stopped by the very CN post many times but totally missed Kevin's idea!
Like
H.Alfa 11.36
...
Thank you @Gabriel R. Santos (grsotnas) !
I'm delighted that you like my work, and happy that you found the article interesting!

Best Regards
Like
morefield 11.07
...
·  2 likes
The photoshop cleaning is wonderful, yes. I have to thank to @Kevin Morefield  as he was who suggested this step in this topic on CN:

https://www.cloudynights.com/topic/733338-starnet-artefacts/


Glad you got some use out of the idea!  I pretty much use the photoshop fill method every time I use Starnet++.  However, I’m reading this post carefully as it seems like it might produce an even better star selection.  I trying picture now to use this PI process to do the fill in PS.
Like
nekitmm 2.41
...
·  2 likes
Fantastic tutorial, Alberto! You put some real work into it!
Like
H.Alfa 11.36
...
Kevin Morefield:
The photoshop cleaning is wonderful, yes. I have to thank to @Kevin Morefield  as he was who suggested this step in this topic on CN:

https://www.cloudynights.com/topic/733338-starnet-artefacts/


Glad you got some use out of the idea!  I pretty much use the photoshop fill method every time I use Starnet++.  However, I’m reading this post carefully as it seems like it might produce an even better star selection.  I trying picture now to use this PI process to do the fill in PS.

Thank you Kevin. Happy that you found the procedure interesting. The idea is quite preliminar and I'm still investigating how to refine some of the steps, specially the absolute starmask. It is key for many further procedures.

Best Regards.
Like
H.Alfa 11.36
...
Nikita Misiura:
Fantastic tutorial, Alberto! You put some real work into it!

Thank you so much Nikita for your nice comment. And thank you for the support you gave me while writting this workflow.

Stay safe my friend!
Like
jpridder86 2.41
...
Hi Alberto. This is a great tutorial. I'm stepping through the writeup posted on your blog. In the stretching section, after black and white point clipping you propose an 18% stretch vs. the default 25% of STF. But then in your article at the point where MTF is applied you state this:
I used a value sightly bigger than the suggested because as seen before, results in a stretch sightly less agressive than the proposed by SFT and it gave better results in this image.

I believe you mean that the value should be slightly "smaller" than suggested, correct? And the MTF value (if we're going with 18%) should be: (0.18/0.25)*STF_midpoint.

Correct?
Like
H.Alfa 11.36
...
·  2 likes
Jeff Ridder:
Hi Alberto. This is a great tutorial. I'm stepping through the writeup posted on your blog. In the stretching section, after black and white point clipping you propose an 18% stretch vs. the default 25% of STF. But then in your article at the point where MTF is applied you state this:
I used a value sightly bigger than the suggested because as seen before, results in a stretch sightly less agressive than the proposed by SFT and it gave better results in this image.

I believe you mean that the value should be slightly "smaller" than suggested, correct? And the MTF value (if we're going with 18%) should be: (0.18/0.25)*STF_midpoint.

Correct?

Hi Jeff,

Thank you! Glad you found it interesting.
Regarding your question, I made some mistakes while writting the tutorial, but in this case is as written: The smaller the number in the MTF function, the higher the stretch in the image, so to reduce the stretch you have to make this number bigger than the recommended by STF (taking into account that a value of 0.5 means no changes). In any case, what I really do is to adjust the stretch using Histogram Transformation in Real-Time, looking to the image and to the histogram "placement" until I find the desired level visually, and then I take note of the Midtones value on the Histogram Transformation instance to paste it on the PixelMath expression.

Please note that my recommendations has to be taken as a guideline, not a fixed value. My optical system suffers from halos and inherent bloated stars because my telescope it is not a "real APO" refractor, so I have to modify the original recommendation in order to achieve the best results, so is a trial and error procedure.

I hope you can find the best value for you!

Best Regards
Like
jpridder86 2.41
...
·  1 like
Hi Jeff,

Thank you! Glad you found it interesting.
Regarding your question, I made some mistakes while writting the tutorial, but in this case is as written: The smaller the number in the MTF function, the higher the stretch in the image, so to reduce the stretch you have to make this number bigger than the recommended by STF (taking into account that a value of 0.5 means no changes). In any case, what I really do is to adjust the stretch using Histogram Transformation in Real-Time, looking to the image and to the histogram "placement" until I find the desired level visually, and then I take note of the Midtones value on the Histogram Transformation instance to paste it on the PixelMath expression.

Please note that my recommendations has to be taken as a guideline, not a fixed value. My optical system suffers from halos and inherent bloated stars because my telescope it is not a "real APO" refractor, so I have to modify the original recommendation in order to achieve the best results, so is a trial and error procedure.

I hope you can find the best value for you!

Best Regards

Thanks much! Can't say I'm an expert yet, but this procedure greatly improved this image. Tadpoles & Flaming Star Mosaic in SHO ( Jeff Ridder ) - AstroBin
Like
 
Register or login to create to post a reply.