Make logic to mask (outside of) primitive more apparent (hopefully).

This commit is contained in:
Philip Eisenlohr 2020-08-27 00:06:52 +02:00
parent 248ef8ef97
commit c2191fd930
1 changed files with 1 additions and 1 deletions

View File

@ -588,7 +588,7 @@ class Geom:
coords_rot = R.broadcast_to(tuple(self.grid))@coords coords_rot = R.broadcast_to(tuple(self.grid))@coords
with np.errstate(over='ignore',under='ignore',invalid='ignore'): with np.errstate(over='ignore',under='ignore',invalid='ignore'):
mask = np.where(np.sum(np.power(coords_rot/r,2.0**exponent),axis=-1) <= 1.0,False,True) mask = np.where(np.sum(np.power(coords_rot/r,2.0**exponent),axis=-1) > 1.0,True,False)
if periodic: # translate back to center if periodic: # translate back to center
mask = np.roll(mask,((c-np.ones(3)*.5)*self.grid).astype(int),(0,1,2)) mask = np.roll(mask,((c-np.ones(3)*.5)*self.grid).astype(int),(0,1,2))