Open alexgleith opened 1 month ago
We need to change to using something like this to mask Sentinel-2. Our current method is wrong.
NODATA = 0 CLOUD_SHADOW = 3 CLOUD_MEDIUM_PROBABILITY = 8 CLOUD_HIGH_PROBABILITY = 9 mask = data.scl.isin([NODATA, CLOUD_SHADOW, CLOUD_MEDIUM_PROBABILITY, CLOUD_HIGH_PROBABILITY]) masked = data.where(~mask, other=np.nan)
What I originally wrote worked I think
https://github.com/digitalearthpacific/dep-tools/blob/6483ae8d41ddbbf43cff9e99dea3f213a9ca3019/dep_tools/s2_utils.py#L36-L60
https://github.com/digitalearthpacific/dep-tools/blob/6483ae8d41ddbbf43cff9e99dea3f213a9ca3019/dep_tools/s2_utils.py
Yeah, it would have. Whoops.
Even simpler is scl.isin([...]). I'll fix it up when I go to run the GeoMAD again.
scl.isin([...])
We need to change to using something like this to mask Sentinel-2. Our current method is wrong.