Skip to content

Commit 262a2f0

Browse files
authored
Update __init__.py (#23)
attempt fix for z offset in subsampling branch of mask code.
1 parent b702531 commit 262a2f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyesapi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ def make_segment_mask_for_grid(structure, dose_or_image, sub_samples = None):
200200
f = 0
201201
for xf in np.linspace(-0.5*xRes,0.5*xRes,sub_samples):
202202
for yf in np.linspace(-0.5*yRes,0.5*yRes,sub_samples):
203-
start = VVector(x + xf, y + yf, z - zRes)
204-
stop = VVector(x + xf, y + yf, z)
203+
start = VVector(x + xf, y + yf, z - 0.5 * zRes)
204+
stop = VVector(x + xf, y + yf, z + 0.5 * zRes )
205205
inside = System.Collections.BitArray(sub_samples)
206206
structure.GetSegmentProfile(start, stop, inside)
207207
for b in inside:

0 commit comments

Comments
 (0)