Author Topic: Star Removal Using StarMask and DefectMap  (Read 13120 times)

Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Re: Star Removal Using StarMask and DefectMap
« Reply #15 on: 2017 November 11 15:23:20 »
Adam,

Quote
If there is interest, I can post my version of this tutorial

You bet there is +4

Mike

Offline ngc1535

  • PixInsight Old Hand
  • ****
  • Posts: 326
Re: Star Removal Using StarMask and DefectMap
« Reply #16 on: 2017 November 11 16:26:26 »
Great...I will work on creating a video. I will demonstrate Fabian Neyer's approach.
THanks,
Adam

Offline kolec

  • PixInsight Addict
  • ***
  • Posts: 100
Re: Star Removal Using StarMask and DefectMap
« Reply #17 on: 2017 November 11 23:34:23 »
Super

Offline pscammp

  • PixInsight Addict
  • ***
  • Posts: 116
Re: Star Removal Using StarMask and DefectMap
« Reply #18 on: 2017 November 12 07:24:22 »
Super +1

Paul

Offline Salvatore Giambruno

  • Newcomer
  • Posts: 33
Re: Star Removal Using StarMask and DefectMap
« Reply #19 on: 2017 November 17 12:49:58 »
Gerhard,

It sounds like you forgot to INVERT the star mask.  The mask stars should be black, the background white.

Sal

Hi,

by the way, Defect Map. It takes hours to execute this tool, although I have an I7 PC. What´s my fault?

Regards   Gerhard
--Sal

Offline Salvatore Giambruno

  • Newcomer
  • Posts: 33
Re: Star Removal Using StarMask and DefectMap
« Reply #20 on: 2017 November 17 12:53:57 »
Rob,

If I recall correctly, I recently tried to apply the DefectMap to an image that had an active mask and got an error message.  I think the DefectMap process can only be applied to "maskless" images.

i wonder if it makes sense to apply the DefectMask process thru a mask (perhaps a different one with smoother star edges) since all DM can do is treat pixels as good or bad with no "nuance". this might mitigate some of the harsh edges around large stars. need to try.

rob
--Sal

Offline Salvatore Giambruno

  • Newcomer
  • Posts: 33
Re: Star Removal Using StarMask and DefectMap
« Reply #21 on: 2017 November 17 13:05:06 »
Thanks for sharing, adam. 

Fabian's sounds like an interesting technique - I'll be sure to check it out as soon as I get a chance. 

I think you tried to explain why the sky background levels are different in the before/after images you posted as an example, but I'm not sure I understand the explanation.  Correct me if I am mistaken, but I believe you were trying to explain that the difference was not a shortcoming of Fabian's process, but that it turned out that way as a result of you rushing to prepare the example.

Hi Salvatore,

For the past few years Fabian Neyer has been demonstrating a technique of star removal that is based on practices that professionals use. He cites this paper of showing the intragalactic glow between members of the virgo cluster:

http://iopscience.iop.org/article/10.1088/0004-637X/720/1/569/pdf

The technique you demonstrate is something like a first order approximation of the idea. The full technique employs some other clever steps including using MLT to calculate the local sky value of stars at different scales. When you use the defect map, you are only using those pixels that are immediate neighbors to your regions. But varying the scale of MLT you can properly get better sky values (and therefore substitution) for the stars. In addition, and this is really clever- you can create a sky subtracted star images that you blur and then subtract from the real data in order to get rid of stellar halos and the wings of PSFs. This takes care of OldWexi's question.

(on a note of computing, Fabian's technique does not require the computational overhead of what the defect map does by looking at each neighbor pixel.)

I just completed an image that uses Fabian's technique. Below is a version of SH2-68 before and after star removal. (I did not see the black levels the same...just quickly grabbed). If there is interest, I can post my version of this tutorial (I will ask Fabian... but I think it isn't a problem). I added a few variations to Fabian's technique. It is a longer process, but the results are commensurate with the effort.


-adam
--Sal

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Star Removal Using StarMask and DefectMap
« Reply #22 on: 2017 November 17 14:33:57 »
Rob,

If I recall correctly, I recently tried to apply the DefectMap to an image that had an active mask and got an error message.  I think the DefectMap process can only be applied to "maskless" images.

i wonder if it makes sense to apply the DefectMask process thru a mask (perhaps a different one with smoother star edges) since all DM can do is treat pixels as good or bad with no "nuance". this might mitigate some of the harsh edges around large stars. need to try.

rob

hmm, it seems to have worked for me, but it seemed that i needed to tune the mask... it needs to have much softer edges than the mask i produced for DefectMap.

rob

Offline GJL

  • PixInsight Addict
  • ***
  • Posts: 102
Re: Star Removal Using StarMask and DefectMap
« Reply #23 on: 2017 November 18 01:18:11 »
+4

Gerhard

Offline mbel

  • Newcomer
  • Posts: 2
Re: Star Removal Using StarMask and DefectMap
« Reply #24 on: 2017 November 22 12:02:51 »
If there is interest, I can post my version of this tutorial (I will ask Fabian... but I think it isn't a problem). I added a few variations to Fabian's technique. It is a longer process, but the results are commensurate with the effort.

I am also interested to try it.

Offline ngc1535

  • PixInsight Old Hand
  • ****
  • Posts: 326
Re: Star Removal Using StarMask and DefectMap
« Reply #25 on: 2017 November 22 14:57:29 »
Hi Salvatore,

Thanks for writing. By the way, I felt a little bad about bringing up Fabian's example in your thread. I somewhat hijacked your post. Sorry about that.
Concerning the background, yes you are correct. The dark background was just my non-linear stretch that I actually used when I blended in the data. The background is unchanged in process of removing stars. I just didn't have the non-linear image of the stars removed with a lighter background that is all.

To everyone that might read this- I connected with Fabian...and I am working on making the video. However, he is in the process of reviewing my work (it is his implementation of this technique in PI after all)- and he is a busy guy! So it is still a work in progress... but very much in play.

-adam


Thanks for sharing, adam. 

Fabian's sounds like an interesting technique - I'll be sure to check it out as soon as I get a chance. 

I think you tried to explain why the sky background levels are different in the before/after images you posted as an example, but I'm not sure I understand the explanation.  Correct me if I am mistaken, but I believe you were trying to explain that the difference was not a shortcoming of Fabian's process, but that it turned out that way as a result of you rushing to prepare the example.

Hi Salvatore,

For the past few years Fabian Neyer has been demonstrating a technique of star removal that is based on practices that professionals use. He cites this paper of showing the intragalactic glow between members of the virgo cluster:

http://iopscience.iop.org/article/10.1088/0004-637X/720/1/569/pdf

The technique you demonstrate is something like a first order approximation of the idea. The full technique employs some other clever steps including using MLT to calculate the local sky value of stars at different scales. When you use the defect map, you are only using those pixels that are immediate neighbors to your regions. But varying the scale of MLT you can properly get better sky values (and therefore substitution) for the stars. In addition, and this is really clever- you can create a sky subtracted star images that you blur and then subtract from the real data in order to get rid of stellar halos and the wings of PSFs. This takes care of OldWexi's question.

(on a note of computing, Fabian's technique does not require the computational overhead of what the defect map does by looking at each neighbor pixel.)

I just completed an image that uses Fabian's technique. Below is a version of SH2-68 before and after star removal. (I did not see the black levels the same...just quickly grabbed). If there is interest, I can post my version of this tutorial (I will ask Fabian... but I think it isn't a problem). I added a few variations to Fabian's technique. It is a longer process, but the results are commensurate with the effort.


-adam

Offline kolec

  • PixInsight Addict
  • ***
  • Posts: 100
Re: Star Removal Using StarMask and DefectMap
« Reply #26 on: 2017 November 23 04:09:49 »
hi

I know that it is not perfekt , but I try Fabians metod ( from CEDIC 2015 + 2017)

http://astrofotky.cz/gallery.php?show=kolec/1511168392.jpg

kolec


Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Star Removal Using StarMask and DefectMap
« Reply #27 on: 2017 November 23 09:03:13 »
since PI can model star profiles with DynamicPSF, i wonder if there is a star removal method that could at least use PSFs to figure out what pixels need to be replaced. it seems like that could lead to a pretty accurate star removal.

rob

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Star Removal Using StarMask and DefectMap
« Reply #28 on: 2017 November 23 09:08:54 »
rob

That's an interesting thought ::)


Mike

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Star Removal Using StarMask and DefectMap
« Reply #29 on: 2017 November 23 09:58:03 »
Just for fun I took my 45mm shot of Cygnus and decided to see what the DefectMap could do. So first this is a simple image processing. ABE and then extract the red channel from the RGB. I use STF with HistogramTransformation for the stretch. Now the decided to try the ClassicStarMask script to generate the star mask. I then inverted the mask. Next I used Binarize with a very high setting of 0.97. This is the mask for the DefectMap to use.

I think it turned out very well for such a low resolution image. On the left is the full image and on the right is a 3:1 scaling of the section with Sadr.

Mike