Skip to content

Commit da82837

Browse files
committed
Adding lines to check the r_space_mask condition
1 parent c21eca4 commit da82837

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

py4DSTEM/process/utils/cluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ def indexing_clusters_all(
162162
sim_averaged = np.mean(self.similarity, axis=2)
163163

164164
# Assigning the background as 'counted'
165-
sim_averaged[~self.r_space_mask] = -1.0
165+
if self.r_space_mask.dtype == bool:
166+
sim_averaged[~self.r_space_mask] = -1.0
166167

167168
# color the pixels with the cluster index
168169
self.cluster_map = -1 * np.ones(

0 commit comments

Comments
 (0)