The image to be repaired is M74_LRGB which was kindly provided by MariusD69. The artifact to be repaired is the bright horizontal streak about half way between M74 and the top of the image.
TECHNIQUE:
1) Make a copy of your original image (M74_LRGB in my case) and name it Blurred.
2) Use CloneStamp to remove the Nebula or Galaxy and any bright stars from Blurred as shown below.
3) Use Convolution to blur Blurred and increase StdDev until all stars have just blended into the background as shown below. Don't overdo.
4) Open the GAME script and select the original image. With the original image shown in the window select Binary Masks under Export Masks. Click the +Add button and a small ellipse will appear on the image with four "handles" around the edges and one handle in the center. The four handles around the edge of the ellipse can be "dragged to stretch/rotate the ellipse. The handle in the center of the ellipse can be dragged to move the entire ellipse. Adjust the ellipse until it surrounds the region to be "repaired" as shown in the image below. When ready click the OK button to create the mask. I named the mask SM (Streak Mask).
5) The created mask will have sharp boundaries with everything inside the ellipse being 1 and everything outside the mask being zero as shown in the image below.
Use Convolution on the mask to soften the edges as shown in the image below. Rename this blurred image as BSM (Blurred Streak Mask)
6) Use the StarMask process to create a star mask of the original image. I used a Smoothness = 1 to make sure the star mask didn't include any of the artifact. Subtract this star mask from BSM. The resulting mask (I named it BSM_NS, for Blurred Streak Mask_No Stars) will select the region to be repaired but will protect the stars. The result is shown below.
7) The picture below shows the PixelMath expression to use to repair the image. In the expression you would replace M74_LRGB with the name of your image. In the Destination portion of PixelMath I chose to create a new image and named it Repaired. Once everything is entered into PixelMath click the square button at the bottom left corner of the PixelMath window to create the repaired image.
The result is shown below.
Further Thoughts for advanced
GAME Script: The GAME script can be downloaded from the link below.
http://www.skypixels.at/pixinsight_scri ... dvstarmask
Hope this proves useful for you.
Steve