Author Topic: using PixelMath to get rid of magenta stars in SHO/Hubble palette narrowband  (Read 29457 times)

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
You can put the file in the zip anywhere , as long as you remember where. :) in PI, right click and choose "load process icon" and navigate to the file. A process icon called " magenta_ star_reduction " should appear. Just drag n drop that on your image. Double click to see the actual PM window with formulae etc.

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Troy,

Thanks loads  :embarassed:

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Ok. Greatly simplified the formulae, and it targets the magenta specifically which is great. Will work best on images before you do any colour shifting to get the teals and golds, as it relies on the relationship between R and B. It simply boosts the G value to the minimum of R and B.

R: $T[0]
G: iif(min($T[0],$T[2])>$T[1],min($T[0],$T[2]),$T[1])
B: $T[2]

Images below show it's effect on a colour wheel. Note the previous versions of the formula affected much more of the colour wheel.

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Troy,

Great stuff, and I even know how to write that in PixelMath  :o

Best,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline niteman1946

  • PixInsight Addict
  • ***
  • Posts: 234
Works very well.
Thanks Troy.

Mark

Offline lenbo

  • Newcomer
  • Posts: 9
Got a chance to test. Works great! Thanks much.   Len
Len

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Excellent!  I'm so glad others are finding it useful.

Offline Kinch

  • Newcomer
  • Posts: 44
I must admit I don't drop in on the forum very often......but to find this gem! Brilliant....saves a lot of work and messing around (not knowing what I am doing....and in another program at that!).

Thank you so much for sharing!

Kinch.

Offline Josh Lake

  • PixInsight Old Hand
  • ****
  • Posts: 424
Super useful, Troy, thanks so much! I'll definitely add this to my bag of tricks. Anyone feel like putting this together into a script or process?  ;)

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Josh, there's a zip file in post #1. In it there is a saved process icon that you can load, then just drag and drop on your image.

Offline Josh Lake

  • PixInsight Old Hand
  • ****
  • Posts: 424
Perfect! Serves me right for jumping to the second page... I was just looking for your most up-to-date formulation. Nicely done!

Offline jtalbot

  • PixInsight Enthusiast
  • **
  • Posts: 78
    • http://www.starscapeimaging.com
Troy,

Works very well.  Thanks for your work.

Jon
Clear Skies

Jon

Offline mstriebeck

  • Member
  • *
  • Posts: 58
First of all: thanks a lot - this is superhelpful!!!

I only found one problem that I don't know how to fix: if I have a bright star in front of a darker region, this makes the halo of the star really noisy. Here is an image before applying this formula: http://2.bp.blogspot.com/-kHl7WhMoY4w/VAz9-0v5T-I/AAAAAAADM5E/XPeVoUAT4YI/s1600/star%2Bpre%2Bmagenta%2Breduction.JPG
And here is it afterwards: http://1.bp.blogspot.com/-G7XFEdDSwZI/VAz9-1tJjTI/AAAAAAADM5I/UYxErqCPgYA/s1600/star%2Bpost%2Bmagenta%2Breduction.JPG

I tried to do something with masks, but it seems as if the problem is that the magenta halo fades into the background and just replacing those pixels creates some noise.

Any ideas are appreciated!

Thanks
     MarkS

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
G'day.  What the PixelMath formula does is desaturate (make gray) the magenta part of the spectrum, and this has worked on your image.  What you're calling noise is colours that are more blue than magenta, and they are remaining untouched by the formula.  That's why you're getting deep blues and grays appearing like noise.  I fear that changing the formula too much will start affecting other areas of the image that you don't want to change (eg nebulosity).

I'll have a play with the formulae to see if we can add some factor to increase or decrease how much of the reds and blues get affected.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
here's a version that will kill cyan. i've sometimes had problems with cyan halos when dealing with certain refractors and lenses...

rob