diff --git a/py4DSTEM/process/diffraction/crystal_ACOM.py b/py4DSTEM/process/diffraction/crystal_ACOM.py index f84bffe4e..09ba51ffc 100644 --- a/py4DSTEM/process/diffraction/crystal_ACOM.py +++ b/py4DSTEM/process/diffraction/crystal_ACOM.py @@ -1840,7 +1840,9 @@ def cluster_grains( xr = np.clip(x + np.arange(-1, 2, dtype="int"), 0, sig.shape[0] - 1) yr = np.clip(y + np.arange(-1, 2, dtype="int"), 0, sig.shape[1] - 1) inds_cand = inds_all[xr[:, None], yr[None], :].ravel() - inds_cand = np.delete(inds_cand, mark.ravel()[inds_cand] == False) # noqa: E712,E501 + inds_cand = np.delete( + inds_cand, mark.ravel()[inds_cand] == False # noqa: E712 + ) if inds_cand.size == 0: grow = False @@ -1893,7 +1895,7 @@ def cluster_grains( inds_grain = np.append(inds_grain, inds_cand[keep]) inds_cand = np.unique( - np.delete(inds_new, mark.ravel()[inds_new] == False) #noqa: E712 + np.delete(inds_new, mark.ravel()[inds_new] == False) # noqa: E712 ) if inds_cand.size == 0: diff --git a/py4DSTEM/process/polar/polar_peaks.py b/py4DSTEM/process/polar/polar_peaks.py index 9650361d7..4064fccaf 100644 --- a/py4DSTEM/process/polar/polar_peaks.py +++ b/py4DSTEM/process/polar/polar_peaks.py @@ -167,7 +167,7 @@ def find_peaks_single_pattern( if remove_masked_peaks: peaks = np.delete( peaks, - mask_bool[peaks[:, 0], peaks[:, 1]] == False, # noqa: E712 + mask_bool[peaks[:, 0], peaks[:, 1]] == False, # noqa: E712 axis=0, ) diff --git a/py4DSTEM/process/strain/latticevectors.py b/py4DSTEM/process/strain/latticevectors.py index 68a3ddd45..dcff91709 100644 --- a/py4DSTEM/process/strain/latticevectors.py +++ b/py4DSTEM/process/strain/latticevectors.py @@ -182,7 +182,7 @@ def fit_lattice_vectors(braggpeaks, x0=0, y0=0, minNumPeaks=5): # Remove unindexed peaks if "index_mask" in braggpeaks.dtype.names: - deletemask = braggpeaks.data["index_mask"] == False # noqa:E712 + deletemask = braggpeaks.data["index_mask"] == False # noqa:E712 braggpeaks.remove(deletemask) # Check to ensure enough peaks are present diff --git a/py4DSTEM/process/strain/strain.py b/py4DSTEM/process/strain/strain.py index 91d6a8ecc..099ecdefd 100644 --- a/py4DSTEM/process/strain/strain.py +++ b/py4DSTEM/process/strain/strain.py @@ -791,17 +791,20 @@ def show_strain( # Get images e_xx = np.ma.array( - self.get_slice("exx").data, mask=self.get_slice("mask").data == False # noqa: E712,E501 + self.get_slice("exx").data, + mask=self.get_slice("mask").data == False, # noqa: E712,E501 ) e_yy = np.ma.array( - self.get_slice("eyy").data, mask=self.get_slice("mask").data == False # noqa: E712,E501 + self.get_slice("eyy").data, + mask=self.get_slice("mask").data == False, # noqa: E712,E501 ) e_xy = np.ma.array( - self.get_slice("exy").data, mask=self.get_slice("mask").data == False # noqa: E712,E501 + self.get_slice("exy").data, + mask=self.get_slice("mask").data == False, # noqa: E712,E501 ) theta = np.ma.array( self.get_slice("theta").data, - mask=self.get_slice("mask").data == False, # noqa: E712 + mask=self.get_slice("mask").data == False, # noqa: E712 ) ## Plot