Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
i = ee.Number(iteration)
sim = geeutils.globalOtsu(self.downscaled,target_date,self.region,seed=i,**kwargs)
return sim.And(hand.lt(30))
tDate = ee.Date(target_date)
if probablistic:
iters = ee.List.sequence(0,nIters-1)
sims = ee.ImageCollection(iters.map(_threholdWrapper))
probs = sims.sum().divide(nIters).rename(['probability'])
water = probs.select(['probability']).gt(probTreshold).rename('water')
mapResult = water.addBands(probs.multiply(10000).uint16())
else:
mapResult = geeutils.globalOtsu(self.downscaled,target_date,self.region,**kwargs)\
.And(hand.lt(30))
return mapResult
self.downscaled, target_date, self.region, seed=i, **kwargs)
return sim.And(hand.lt(30))
tDate = ee.Date(target_date)
if probablistic:
iters = ee.List.sequence(0, nIters - 1)
sims = ee.ImageCollection(iters.map(_threholdWrapper))
probs = sims.sum().divide(nIters).rename(['probability'])
water = probs.select(['probability']).gt(
probTreshold).rename('water')
mapResult = water.addBands(probs.multiply(10000).uint16())
else:
mapResult = geeutils.globalOtsu(self.downscaled, target_date, self.region, **kwargs)\
.And(hand.lt(30))
return mapResult
def _threholdWrapper(iteration):
i = ee.Number(iteration)
sim = geeutils.globalOtsu(
self.downscaled, target_date, self.region, seed=i, **kwargs)
return sim.And(hand.lt(30))
def _threholdWrapper(iteration):
i = ee.Number(iteration)
sim = geeutils.globalOtsu(self.downscaled,target_date,self.region,seed=i,**kwargs)
return sim.And(hand.lt(30))