Removing purple star halos in Siril using Pixel Math

Last week I started using Siril and am very pleased with it so far.

I started using it for its Subtractive Chromatic Green Noise Reduction to produce better Hubble-palette images. As may be generally known the processing of data in this way causes stars to become purple, for which there are at least three solutions (see for instance this video). The quickest way is to apply SCNR, invert the image, again apply SCNR and invert the image back again. This, however, also removes the red fraction of the spectrum and thus removes valuable information. In PixInsight it is possible to use the following Pixel Math to reduce the magenta colour of the stars:

R : $T[0]
G : iif(min($T[0],$T[2])>$T[1],min($T[0],$T[2]),$T[1])
B : $T[2]

Where $T[0] is the original Red channel, $T[1] the green and $T[2] the blue channel.

Is it possible to have similar functionality in Siril? It seems that Pixel Math in Siril does not support min() and max() functions, but maybe I missed it…

Even better would be to have a default function similar to Subtractive Chromatic Green Noise Reduction for this specific issue.


1 Like

I’ll let @lock042 answer that :slight_smile:

note that you could tag your message with siril (not only processing) to make sure we find it easily in the future, it’s a forum for all free image processing software.

For now Siril Pixel Math only supports functions that are relative to pixels, not to the whole image.
Yet you can use statistics to get min, max and other useful functions and replace it by numerical value.

Hi @vinvin and @lock042,

I have changed the title of this topic, now includes Siril.
If I am right the min() and max() functions apply to a single pixel only in PixInsight:

MIN — Minimum value

Target pixels are replaced with operand pixels or values, only if the operand is less than the target:

T ¬ Min( T, P )

MAX — Maximum value

Target pixels are replaced with operand pixels or values, only if the operand is greater than the target:

T ¬ Max( T, P )

So what the math does is to check whether the green value for a certain pixel is smaller than the minimum value of red and blue. If so it is being replaced with the minium value that is found in the red and blue channels for that pixel, otherwise the green value is kept.


I use this Pixel Math to reduce purple halos in Siril 1.2.1 (after splitting channels to RGB):