Author Topic: PixelMath and Masks  (Read 2575 times)

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
PixelMath and Masks
« on: 2018 February 03 14:56:07 »
I have two images.  One is just an RGB star field, the other is an OIII image of a small planetary nebula in that field, colorized to teal.  I want to add the star field from image 1 to the nebula from image 2.  I applied a mask over the nebula, and tried to add the masked image to the starfield, or vice versa, but the mask seems to be ignored either way.  Any idea how I can do this?

Kevin

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: PixelMath and Masks
« Reply #1 on: 2018 February 03 15:17:39 »
Make sure the masks are enabled.  Could have gotten switched to disabled by accident.  happened to me once.
Rodd

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Re: PixelMath and Masks
« Reply #2 on: 2018 February 03 18:48:31 »
It's active - the tab on the masked image is orange.  It just doesn't seem to have any effect.

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: PixelMath and Masks
« Reply #3 on: 2018 February 03 18:57:23 »
Try applying something a bit more dramatic to see if the mask is working as expected, e.g. the PixelMath expression "0" or "1".  Also worth using the readout preview to check the mask values.

Cheers,
Rick.

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Re: PixelMath and Masks
« Reply #4 on: 2018 February 04 08:58:21 »
I think I get it now.   In PixelMath, I have to use 'replace target image" rather than "create new image."  And the mask has to be on the target, not the other image.  So I had to put the nebula mask on the star field, use the star field as the target, and add the nebula image to that.   Thanks, Rodd and Rick.

Kevin

Offline astrovienna

  • PixInsight Addict
  • ***
  • Posts: 123
    • The Hole in the Trees Skybox
Re: PixelMath and Masks
« Reply #5 on: 2018 February 04 10:29:42 »
Final result:

http://www.pbase.com/image/166928668

Rick, I used the colorization trick you taught me a couple years back:

https://pixinsight.com/forum/index.php?topic=9151.msg58754#msg58754

I think I've finally gotten the hang of that.  Thanks.  BTW, John K talked to our imaging group here in Washington yesterday, with a processing demo using some of the excellent data from your team.  If you ever get up to this end of the world, let us know.  We'd be delighted to have you talk to our group.

Kevin

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: PixelMath and Masks
« Reply #6 on: 2018 February 04 14:00:45 »
That looks great, Kevin.  Glad you figured it out.

I do get over to the East Coast of the US occasionally for work.  If it looks like I'll have a little spare time on one of my trips I'll let you know.  It's always good to catch up with other imagers!

Cheers,
Rick.