Author Topic: PixelMath example not working  (Read 3032 times)

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
PixelMath example not working
« on: 2012 March 01 16:23:38 »
Hello
I was trying to learn some pixel math, so I Used the Pixel math reference.
I then intended to try the circle example

d = Abs( RDist() - 250 );
f = (1.25 - iif( d < 1.25, d, 1.25 ))/1.25;
f + (1 - f)*$target

 I get an error: (see image)

What is wrong or what has changed?
Regards
Geert

Geert Vanhauwaert

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PixelMath example not working
« Reply #1 on: 2012 March 01 16:30:02 »
i think you have to declare all your variables in the expression editor. otherwise it does not know that d and f are legal "lvalues"... things that are legal to have on the left side of an equation.

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Re: PixelMath example not working
« Reply #2 on: 2012 March 01 16:53:18 »
yes!

Thanks
Geert Vanhauwaert