Skip to content

Commit

Permalink
deletemask[i] == False
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Nov 15, 2023
1 parent 76ae0fa commit d0c8a2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion py4DSTEM/braggvectors/diskdetection_aiml_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def get_maxima_2D_cp(
if minSpacing > 0:
deletemask = np.zeros(len(maxima), dtype=bool)
for i in range(len(maxima)):
if deletemask[i] is False:
if deletemask[i] == False: # noqa: E712
tooClose = (
(maxima["x"] - maxima["x"][i]) ** 2
+ (maxima["y"] - maxima["y"][i]) ** 2
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/braggvectors/diskdetection_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def get_maxima_2D(
if minSpacing > 0:
deletemask = np.zeros(len(maxima), dtype=bool)
for i in range(len(maxima)):
if deletemask[i] is False:
if deletemask[i] == False: # noqa: E712
tooClose = (
(maxima["x"] - maxima["x"][i]) ** 2
+ (maxima["y"] - maxima["y"][i]) ** 2
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/braggvectors/threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def threshold_Braggpeaks(
r2 = minPeakSpacing**2
deletemask = np.zeros(pointlist.length, dtype=bool)
for i in range(pointlist.length):
if deletemask[i] is False:
if deletemask[i] == False: # noqa: E712
tooClose = (
(pointlist.data["qx"] - pointlist.data["qx"][i]) ** 2
+ (pointlist.data["qy"] - pointlist.data["qy"][i]) ** 2
Expand Down Expand Up @@ -160,7 +160,7 @@ def universal_threshold(
r2 = minPeakSpacing**2
deletemask = np.zeros(pointlist.length, dtype=bool)
for i in range(pointlist.length):
if deletemask[i] is False:
if deletemask[i] == False: # noqa: E712
tooClose = (
(pointlist.data["qx"] - pointlist.data["qx"][i]) ** 2
+ (pointlist.data["qy"] - pointlist.data["qy"][i]) ** 2
Expand Down

0 comments on commit d0c8a2a

Please sign in to comment.