I have a Landsat image collection with, additional to the usual bands, the NDWI index (used for water) for each image in that collection.
I would like to create two subsets of this image collection:
- one with the upper 25 percent of NDWI index values (75 - 100);
- another one with the lower 25 percent of the NDWI index values (0 - 25);
So the result would be three separate image collections (containing all bands). First one containing all images. The second one containing all images selected by the upper 25% NDWI index values. The third one containing all images selected by the lowest 25% NDWI index values.
Please find a toy script at this link: https://code.earthengine.google.com/4bc201244078d5849d033bb7560a3479.
Please note that in that script there is also a quality mosaic. However, I am not satisfied by the quality mosaic because it tends to pick up the extremes. Therefore I would like to work with the lower and upper 25 percent.