I do my astrophotography with a 14-bit DSLR, and find that I usually have several bright stars with blown-out "magenta" cores in my images. The magenta comes from out-of-range values being created in the debayering process, way early on during stacking. With a 14-bit camera all my raw pixels should be 0.25 or less in the normalized PixInsight data range, but in my blown-out cores I see values much higher.
The Repaired HSV Separation script doesn't work well for me. It helps, but star cores are still blown out. It also puts a break in the image history since it creates a new repaired image.
ColorClip replaces out-of-range pixels with the mean of neighboring in-range pixels. This can be done early in the linear phase, so dynamic range during stretching is maximized. It does a decent job of replacing blown-out cores with the color immediately outside the blown-out region and results in more natural-looking stars. The threshold is adjustable, with 0.25 the default (for 14-bit cameras).
I hope people find this useful. You can get the script at https://github.com/CarpeCimex/ColorClip . Please let me know if you find bugs or problems. It's my first Java script so I'm sure there are some beginner gaffes in there.
The Repaired HSV Separation script doesn't work well for me. It helps, but star cores are still blown out. It also puts a break in the image history since it creates a new repaired image.
ColorClip replaces out-of-range pixels with the mean of neighboring in-range pixels. This can be done early in the linear phase, so dynamic range during stretching is maximized. It does a decent job of replacing blown-out cores with the color immediately outside the blown-out region and results in more natural-looking stars. The threshold is adjustable, with 0.25 the default (for 14-bit cameras).
I hope people find this useful. You can get the script at https://github.com/CarpeCimex/ColorClip . Please let me know if you find bugs or problems. It's my first Java script so I'm sure there are some beginner gaffes in there.