Narrowband Magenta Star Correction

There are times when processing narrowband data into an image, your stars have a weird shade of magenta / pink instead of white. There is a pixel math calculation that will solve this.
To create the calculation / program in Pixel Math, you first need to understand that PixInsight uses the following notation to define the separate RGB color channels. RGB in Pixel Math is defined as:
T(0) = Red channel / pixels
T(1) = Green channel / pixels
T(2) = Blue channel / pixels
Knowing this, the calculations can be made a follows. First, uncheck “Use single RGB/K expression”. This will allow you to create separate expressions in the Red, Green and Blue channels.

For the Red channel, insert this expression

For the Green channel, insert this expression

For the Blue channel, insert this expression

Create a process icon from this and save it to your process icons. You’ll now be able to correct narrowband stars that have the magenta / pink shade instead of white.