I have a stack of 15 layers and I need to calculate the median of all the pixels of all the layers.
How can i do so in ArcGIS?
I tried zonal statistics but it only calculates the median among pixels in one layer.
I also tried Cell Statistics but then it calculates the median of every single pixel trough time.
I need to consider all the values of all the pixels of all the layers together and calculate the median of that distribution.
Best Answer
The following code should work. With a few lines more you could also calculate the percentiles you need.