Forum

Author Topic: Function with single number/band in raster calculator expression  (Read 3496 times)

Gall

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
I am experimenting a lot with the raster calculator lately and I noticed that functions with a single number or band are neither valid expression nor working if assigned by the Python API.
For example :
sqrt(250) is not working but sqrt(250 * 1) is. The same happens with parentheses. And of course, sqrt((250)) does not work either, you need to type sqrt((250 * 1) * 1).

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14846
    • View Profile
Re: Function with single number/band in raster calculator expression
« Reply #1 on: October 06, 2016, 08:19:53 PM »
Hello Gall,

At the moment brackets in the expression can be only used if there are more than one arguments, so it should be "sqrt 250". It is valid both for GUI and Python.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Gall

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Function with single number/band in raster calculator expression
« Reply #2 on: October 07, 2016, 11:05:48 AM »
I see, this feels unusual. If this behavior remains, maybe the functions buttons should not add parentheses then.
Thanks for the reply.