Stack Averaging Bug with Stddev and COV

Dear SNAP team,

I found a bug in the Stack Averaging Tool. While it works for the Mean Average, Min and Max metrics, it gives an error when calculating the Stddev. and the Coef. of Variation because of an undefined function.

Error Message:
A problem occurred during the target product initialisation.
Type: OperatorException
Message: Stack-Averaging: expression: Undefined function ‘sqr(double)’. due to Undefined function ‘sqr(double)’.

I can still do it manually in the Band Math operator, but it would be nice if the feature works. In the Band Math operator I noticed that the sqr operator (i.e. square) is called sq. I am pretty sure this is the issue. The Stack Averaging still creates a virtualband, and if i substitute all the “sqr” with “sq” under the Pixel-Value expression in the Properties menu of the file it just works as it should.

Operating System:
Ubuntu 14.04 64bit
Snap version 2.02

Thanks I’ll update this.

1 Like