diff --git a/processing/pre/seeds_fromRandom.py b/processing/pre/seeds_fromRandom.py index 22aa7c7f5..3cc9abe13 100755 --- a/processing/pre/seeds_fromRandom.py +++ b/processing/pre/seeds_fromRandom.py @@ -152,9 +152,9 @@ for name in filenames: n = np.maximum(np.ones(3),np.array(grid*fraction),dtype=int,casting='unsafe') # find max grid indices within fraction meshgrid = np.meshgrid(*map(np.arange,n),indexing='ij') # create a meshgrid within fraction coords = np.vstack((meshgrid[0],meshgrid[1],meshgrid[2])).reshape(n.prod(),3) # assemble list of 3D coordinates - seeds = (random.sample(coords.tolist(),options.N)+np.random.rand(options.N,3))/(n/fraction) # pick options.N of those, rattle position, - # and rescale to fall within fraction - else: # and rescale to fall within fraction + seeds = (random.sample(coords.tolist(),options.N)+np.random.rand(options.N,3))/(n/fraction) # ... pick N of those, rattle position, + # ... and rescale to fall within fraction + else: seeds = np.empty((options.N,3)) # seed positions array seeds[0] = np.random.random(3)*grid/max(grid) i = 1 # start out with one given point