Skip to content

Commit ebe8164

Browse files
committed
fixing gaussian filter
1 parent 5f49deb commit ebe8164

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

py4DSTEM/tomography/tomography.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,9 +2056,16 @@ def _constraints(
20562056

20572057
obj_6D = copy_to_device(self.object_6D, device="cpu")
20582058

2059-
obj_6D = gaussian_filter(
2060-
obj_6D, real_space_gaussian_filter, axes=(0, 1, 2)
2061-
) # axes only supported in cpu
2059+
# obj_6D = gaussian_filter(
2060+
# obj_6D, real_space_gaussian_filter, axes=(0, 1, 2)
2061+
# ) # axes only supported in cpu
2062+
for i in range(obj_6D.shape[3]):
2063+
for j in range(obj_6D.shape[4]):
2064+
for k in range(obj_6D.shape[5]):
2065+
obj_6D[:, :, :, i, j, k] = gaussian_filter(
2066+
obj_6D[:, :, :, i, j, k],
2067+
sigma=real_space_gaussian_filter
2068+
)
20622069

20632070
self._object = copy_to_device(
20642071
obj_6D.reshape((s[0], s[1] * s[2], s[3] * s[4] * s[5])), device=storage

0 commit comments

Comments
 (0)