# Mean value estimation

Greetings

Dear SNAP community, I have prepared for you a very interesting issue
I’m working with time-lines. During my current investigation I have found that my images can’t give me true values after they averaged. That is because of clouds on the each of image.
I’d be very grateful, if you give an advice, how to calculate an average value of 46 images without taking into account 0 value on every image. I mean that 0 value means clouds. And my issue is that the this value breaks my time-line completely - final value is wrong.

For example, I have four images with different values in pixels: 100, 150, 0 and 300
Average is 137.5. How to avoid taking into account 0 value and to get average value 183.3?

In the same time, how to save average value of 4 pixels if each of them is >0

Actually, I have an idea to use the following expressions:
X - pixel value of each image of the time-line (i1, j1)
F = find (x > 0)
Y = mean (x(f))

Thank you for assistance

You could use the binning processor provided in SNAP. There you can specify a valid expression.