Hello-
I am trying to calculate a mean value for EVI reflectance in a MODIS image with 11 bands. I would only like to use the pixels with values between 0 and 1. Some pixels have values outside of this range. I have tried to do this using the 'WHERE' and 'REFORM' function.
temp is the 11 band image.
I am using the code:
good_data=temp[where(temp GT 0 AND temp LE 1,count)]
if (count GT 0) then continue
temp=reform(temp[good_data],count,1)
if (k eq 0) then data(0:14039,l)=(total(temp, 2))/nb ; mean data values
if (k eq 1) then data(0:14039,l)=median(temp, dimension=2)
if (k eq 2) then data(0:14039,l)=min(temp, dimension=2)
if (k eq 3) then data(0:14039,l)=max(temp, dimension=2)
....
But this code does not filter the out of range values and I am stumped.
Any help would be appreciated-
Eric
|