Author Topic: Strange result with Pixel math  (Read 2414 times)

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Strange result with Pixel math
« on: 2015 June 10 18:44:48 »
Hello

I was trying to follow Vicent Peris tutorial to enhance a rgb image with Ha  http://www.pixinsight.com/tutorials/narrowband/index.html
When doing the math, I found some strange results of pixel math:

when I compute (RGB_R/(Ha+0.000001))*Ha  the result is almost the original RGB_R image,
but when I compute C= RGB_R/(Ha+0.000001)  and then compute C*Ha, I get a distinct image.
It seems that there is a round off somewhere when storing the result of the first calc, even  if force to use 64 bit images
No rescaling is used.

on attached image top left is R,  Top right is result
bottom left is Ha   bottom right is continuum

Regards
Geert
« Last Edit: 2015 June 10 18:50:36 by gvanhau »
Geert Vanhauwaert

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Strange result with Pixel math
« Reply #1 on: 2015 June 11 10:10:43 »
Hi Geert!
On my Windows installation i got for both PixelMath Expressions the same
result. So, cant repeat your strange result.

Statistics showed tiny smaller Minimum and Median,
BUT tiny higher Maximum and Mean...

Gerald

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Re: Strange result with Pixel math
« Reply #2 on: 2015 June 12 08:26:34 »
Hello Gerald
I think I know now what is happening:
If the rgb near a star has value near 0.5 and the Ha has only a value 0.1 the result is 5, so there is a overflow .
Since I disabled rescaling, this value is rounded to 1.

When multiplying this result by ha, the result is 0.1 thus different of the original 0.5.

So, it is my fault....

Regards
Geert
Geert Vanhauwaert