Author Topic: Masking in PixelMath: I can't make it work  (Read 234 times)

Offline rfrancis

  • Newcomer
  • Posts: 26
    • View Profile
Masking in PixelMath: I can't make it work
« on: 2019 March 04 04:38:19 »
I'm trying to add RGB stars to a narrow band image using PixelMath but every time I try it, I end up with both the stars and the RGB nebulosity added.

I have a star mask. I have tried:

1. applying the star mask to the target image then, with the expression $T + RGB in the RGB/K channel, dragging the "new instance" triangle to the target;

2. identifying the star mask in the A channel, then dragging the same expression to the target;

3. a combination of 1 and 2 (setting both the A channel and masking the target).

None do what I would expect (ie only add the parts of the RGB image corresponding to the white parts of the mask).

What is the correct way to use the alpha channel? I could not find any documentation on this.

thanks,
Richard

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 343
    • View Profile
Re: Masking in PixelMath: I can't make it work
« Reply #1 on: 2019 March 04 05:32:40 »
Hello

In order to use  pixel math with masks, the mask should be applied to the target image.
You have also to tell pixel math to replace the target image.  (if you let pixel math to create a new image, it won't work.

Regards
Geert
Geert Vanhauwaert

Offline rfrancis

  • Newcomer
  • Posts: 26
    • View Profile
Re: Masking in PixelMath: I can't make it work
« Reply #2 on: 2019 March 04 06:10:30 »
You have also to tell pixel math to replace the target image.

That was it!

Thanks!
Richard