Math Expression
Posted: Thu Oct 04, 2018 8:14 am America/New_York
Hi there,
I have an issue using Math Band tool. I am trying to calculate the mean of Rrs_555 bands (MODIS Aqua). I could not find a function of mean to automatically calculate these bands. Also, I could not find informative documents in the help links regarding to my point.
Anyway, I tried to calculate the mean of these bands. First, I re-project the images. Second, I add Rrs_555 bands in a time series analysis file so that I can mathematically deal with them together. Then, I used the Math Band tool to calculate the mean of Rrs_555 as following:
(Rrs_555(1) + Rrs_555(2) + Rrs_555(3) + Rrs_555(n)) / n
The problem is that pixels with NaN values in a band cancel all valid pixels in the other bands that sharing the same ___location of NaN pixels. For instance, the mean of Rrs_555 at ___location(i,j) would be NaN if only one of the images used to calculate the mean has a NaN value in that ___location (i.e., ___location(i,j)). This is totally understandable since NaN values can not be computed with valid values. The question is how can I overcome this problem?
Regards,
Mohammad Alsahli
I have an issue using Math Band tool. I am trying to calculate the mean of Rrs_555 bands (MODIS Aqua). I could not find a function of mean to automatically calculate these bands. Also, I could not find informative documents in the help links regarding to my point.
Anyway, I tried to calculate the mean of these bands. First, I re-project the images. Second, I add Rrs_555 bands in a time series analysis file so that I can mathematically deal with them together. Then, I used the Math Band tool to calculate the mean of Rrs_555 as following:
(Rrs_555(1) + Rrs_555(2) + Rrs_555(3) + Rrs_555(n)) / n
The problem is that pixels with NaN values in a band cancel all valid pixels in the other bands that sharing the same ___location of NaN pixels. For instance, the mean of Rrs_555 at ___location(i,j) would be NaN if only one of the images used to calculate the mean has a NaN value in that ___location (i.e., ___location(i,j)). This is totally understandable since NaN values can not be computed with valid values. The question is how can I overcome this problem?
Regards,
Mohammad Alsahli