Author Topic: How to remove these defects?  (Read 3115 times)

Offline calan

  • Newcomer
  • Posts: 34
How to remove these defects?
« on: 2017 April 16 01:16:34 »
Is there a process or script that will remove these hot pixel "streaks"? This is after using CosmeticCorrection... it fixes some of the dark spots, but won't get these hot pixels.

This is an OSC image, live-stacked in another program, so this is what I have to work with.
« Last Edit: 2017 April 16 01:37:28 by calan »

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: How to remove these defects?
« Reply #1 on: 2017 April 16 05:31:38 »
Hi,

You say that your data has already been stacked outside of PixInsight - does that mean that yoou no longer have the original Lights?

What about calibration frames - do you have any Biases, Darks or Flats for the session?

Without these, you may struggle - PixInsight would not have any of the source data to use to attack these 'defects' at the pre-processing stage, leaving you having to work much, much harder at the post-processing stage. Judicious use of CloneStamp may help, but will be very labour-intensive and time-consuming if you have problems all over the image.
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline calan

  • Newcomer
  • Posts: 34
Re: How to remove these defects?
« Reply #2 on: 2017 April 16 19:15:50 »
You say that your data has already been stacked outside of PixInsight - does that mean that yoou no longer have the original Lights?

That is correct. This is a stack of hundreds of short exposures that was live-stacked while doing some near-real-time-viewing, and then saved as a FITS file. There was dark frame subtraction used, but apparently the poor tracking caused drift, thus leaving the hot pixel streaks.

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: How to remove these defects?
« Reply #3 on: 2017 April 16 20:31:31 »
While the best solution is to fix this in preprocessing here is a method using the Color Mask Script by RickS and the TGVInpaint tool by Carlos Milovic. Neither are part of the regular PixInsight distribution but they are very powerful. While the ColorMask script will work on any of the OS's that PI runs on this new TGV module only works on Windows and Linux machines.

What I did was use the Hue readout to determine the exact range of hue in those green pixels that needed to be removed. I then used those number as the start and end parameters in the colormask script. I set the script to Linear MAsk and a setting of 1 for the mask blur. This gives me a mask of just those pixels with that hue range. I then use curves to extremely brighten the mask. Then I invert the mask with the invert tool. The mask needs to be invertered for the Inpaint tool to work. Using the TGVInpaint tool I select the color mask I created and then apply to the tool to the image.

You repeat for the other colors. This takes some trail and error but once you get the hang of the script and the Inpaint tool you will find this works very fast.

https://pixinsight.com/forum/index.php?topic=7751.0  ColorMask

https://pixinsight.com/forum/index.php?topic=8970.0  TGV Module



Mike

Offline calan

  • Newcomer
  • Posts: 34
Re: How to remove these defects?
« Reply #4 on: 2017 April 16 21:34:05 »
While the best solution is to fix this in preprocessing here is a method using the Color Mask Script by RickS and the TGVInpaint tool by Carlos Milovic. Neither are part of the regular PixInsight distribution but they are very powerful. While the ColorMask script will work on any of the OS's that PI runs on this new TGV module only works on Windows and Linux machines.

What I did was use the Hue readout to determine the exact range of hue in those green pixels that needed to be removed. I then used those number as the start and end parameters in the colormask script. I set the script to Linear MAsk and a setting of 1 for the mask blur. This gives me a mask of just those pixels with that hue range. I then use curves to extremely brighten the mask. Then I invert the mask with the invert tool. The mask needs to be invertered for the Inpaint tool to work. Using the TGVInpaint tool I select the color mask I created and then apply to the tool to the image.

You repeat for the other colors. This takes some trail and error but once you get the hang of the script and the Inpaint tool you will find this works very fast.

https://pixinsight.com/forum/index.php?topic=7751.0  ColorMask

https://pixinsight.com/forum/index.php?topic=8970.0  TGV Module



Mike

Just what I was looking for. I had seen something mentioned about TVGInpaint, but couldn't find it. I'll figure out how to install them and give it a shot.

Thanks much Mike!

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: How to remove these defects?
« Reply #5 on: 2017 April 16 22:45:22 »
That's an interesting use of ColorMask, Mike!

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: How to remove these defects?
« Reply #6 on: 2017 April 16 23:28:14 »
Rick

When you have poor equipment you find interesting ways of using PixInsight, haha. Your script and Carlos's modules have been fantastic. I find new ways of using them all the time.



Mike

Offline calan

  • Newcomer
  • Posts: 34
Re: How to remove these defects?
« Reply #7 on: 2017 April 16 23:40:39 »
Rick

When you have poor equipment you find interesting ways of using PixInsight, haha. Your script and Carlos's modules have been fantastic. I find new ways of using them all the time. Mike

I hear that! I just have a simple ASI224MC OSC camera and an old LXD75 6" newt, sitting on an old deck in the wind. But with PixInsight, I've been able to get some pretty decent images from mediocre (and even horrible) data.


This is my latest... the beaten-to-death M42. I was amazed at how much I was able to tame the dynamic range, and how much detail I pulled out of it, especially in the trapezium area (compression artifacts for upload...sorry).

PI rocks.  :)
« Last Edit: 2017 April 16 23:56:52 by calan »