needed another cell in masking bounding box

This commit is contained in:
Michael Krayer 2021-08-05 01:08:37 +02:00
parent 5bf6b6e102
commit 44bdf5865b
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class Particles:
rp = self.attr['r'][ipart]+padding
for pos in self.position_with_duplicates(ipart,padding=padding):
idxlo = np.array(fld.nearest_gridpoint(pos-rp,lower=True))
sfdim = np.ceil(2*rp/fld.spacing+1).astype('int')
sfdim = np.ceil(2*rp/fld.spacing+2).astype('int')
sf = fld.extract_subfield(idxlo,sfdim,deep=False,strict_bounds=False)
xsf = sf.x().reshape((-1,1,1))
ysf = sf.y().reshape((1,-1,1))