Updating docstring in blobs
@@ -611,8 +611,9 @@ def blobs(shape: List[int], porosity: float = 0.5, blobiness: int = 1):
porosity : float
If specified, this will threshold the image to the specified value
- prior to returning. If no value is given (the default), then the
- scalar noise field is returned.
+ prior to returning. If ``None`` is specified, then the scalar noise
+ field is converted to a uniform distribution and returned without
+ thresholding.
blobiness : int or list of ints(default = 1)
Controls the morphology of the blobs. A higher number results in
@@ -636,8 +637,8 @@ def blobs(shape: List[int], porosity: float = 0.5, blobiness: int = 1):
sigma = sp.mean(shape)/(40*blobiness)
im = sp.random.random(shape)
im = spim.gaussian_filter(im, sigma=sigma)
- if porosity:
im = norm_to_uniform(im, scale=[0, 1])
+ if porosity:
im = im < porosity
return im
