I have watched the video and I like the idea a lot. One question, you have to generate a starless image first. How do to stars created by this process compare to the stars only image created by StarNet/StarXterminator? I don’t have the chance to check it out yet so curious how the stars would differ.
At a high level, the big difference is that ScreenStars offers the "reverse stretch" method which can be better at preserving star colours, especially when the stars are added back onto an image in a different colour palette - e.g. RGB stars onto a NB starless image.
However, there are some more subtle differences which some may wish to understand - if you don't like maths or are just interested in the headlines, I recommend you stop reading at this point!
StarNet generates a star mask by simple subtraction, ie star_mask = original - starless.
StarXTerminator has two options, if unscreen stars isn't checked the stars image is created by subtraction in exactly the same way as StarNet; if unscreen stars is checked they are removed using the formula (original - starless)/(1.005 - starless).
The 1.005 in the SXT formula is a "fudge factor" designed to give some protection when SXT is used on images with clipped nebulosity.
In designing the screen stars script we wanted:
Objective 1: to ensure that if you create a stars only image and then recombine with the same starless image then you will get back to where you started (and broadly this is the case, subject to a caveat I will mention later); and
Objective 2: to offer the new "reverse stretch" option that neither SN nor SXT offer.
To achieve the first of these objectives using the SXT formula the recombination would have to use the formula: 1.005*stars+starless*(1-stars). When screening back onto an image other than the starless image you used to create the stars in the first place (as you usually will do) this could lead to clipping which we consider to be undesirable. In ScreenStars, therefore, we remove stars using the true inverse of the conventional screen blending formula, i.e. we remove using the formula: (original - starless)/(1 - starless).
So ScreenStars "stars only" images can be screened back using the conventional screening formula: stars + starless - stars*starless, or in PixelMath you can use combine(stars, starless, op_screen()).
If using linear data and numbers are small the 1.005 fudge factor can distort calculations, hence rc-astro recommends not checking the unscreen option in SXT when using linear data. However, in ScreenStars we do not use this 1.005 fudge factor and so the same issues do not occur. Furthermore when the pixel values in the linear starless image are very small, the denominator of (1 - starless) is very close to 1 and so there is very little difference between unscreening and simple subtraction.
For ScreenStars, therefore we use the unscreening formula for both linear and non-linear data. And, in keeping with Objective 1, adding stars back is always done by the conventional screening formula whether linear or not. This avoids potential top end clipping when adding stars to a brighter image than the stars were removed from.
So, I said there was a caveat to Objective 1 and that is that the unscreening formula: (original - starless)/(1- starless) can yield a negative result if the pixel value in the original image is smaller than the pixel value in the starless image. This can happen surprisingly frequently and not just in areas of bright nebulosity. In this case the "stars image" pixel value is truncated to zero so screen blending wouldn't quite get you back where you stared. If this were super important to you the work around would be to form a modified starless image using PixelMath as follows: min(original, starless). However, this is unlikely to be an issue in practice.
Formula Reference
I know that some people get confused with the mathematical equations for screening and unscreening so, as a final point, here are some formulae as a helpful reference:
Screen blending formulae
The following four formulae are effectively mathematically identical:
1 - (1 - starless)*(1 - stars)
starless + stars - starless* stars
In PixelMath:
~((~starless)*(~stars))
combine(starless, stars, op_screen())
Unscreening formulae
The following four formulae are effectively mathematically identical:
1 - (1 - original)/(1 - starless)
(original - starless)/(1 - starless)
In PixelMath:
~((~original)/(~starless))
rescale(original, starless, 1)
note the unscreening formulae involve a division by (1 - starless) which could be zero so this may need to be caught.
That is almost certainly far more detail than you wanted but I thought it may help to have chapter and verse to refer to.