Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handErr = hand.add(ee.Image.random(i).subtract(0.5).multiply(6)
.multiply(elvStdDev))
return downscale.bathtub(inImage,handErr,permanent)
inImage = self.collection.mean().divide(10000)
if probablistic:
iters = ee.List.sequence(0,nIters-1)
sims = ee.ImageCollection(iters.map(_downscaleWrapper))
probs = sims.sum().divide(nIters).rename(['probability','error'])
water = probs.select(['probability'],['water']).gt(probTreshold)
mapResult = water.addBands(probs.multiply(10000).uint16())
else:
mapResult = downscale.bathtub(inImage,hand,permanent)
return mapResult
def _downscaleWrapper(iteration):
i = ee.Number(iteration)
handErr = hand.add(ee.Image.random(i).subtract(0.5).multiply(6)
.multiply(elvStdDev))
return downscale.bathtub(inImage,handErr,permanent)