Skip to content

Commit

Permalink
move progress update step
Browse files Browse the repository at this point in the history
  • Loading branch information
sezelt committed Oct 5, 2023
1 parent 221b34b commit a48093f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions py4DSTEM/process/diffraction/crystal_ACOM.py
Original file line number Diff line number Diff line change
Expand Up @@ -1826,10 +1826,6 @@ def cluster_grains(
search = False

else:
new_marks = mark_total - np.sum(np.max(mark, axis=2))
pbar.update(new_marks)
mark_total -= new_marks

# Start cluster
x, y, z = np.unravel_index(inds_grain, sig.shape)
mark[x, y, z] = False
Expand Down Expand Up @@ -1909,6 +1905,11 @@ def cluster_grains(
self.cluster_orientation.append(orientation_cluster)
self.cluster_inds.append(xyg)

# update progressbar
new_marks = mark_total - np.sum(np.max(mark, axis=2))
pbar.update(new_marks)
mark_total -= new_marks

pbar.close()


Expand Down

0 comments on commit a48093f

Please sign in to comment.