Skip to content

Commit

Permalink
changing assert to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Oct 30, 2023
1 parent 3290342 commit a23839e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions py4DSTEM/process/diffraction/crystal_ACOM.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,10 +903,12 @@ def match_single_pattern(
"""

# adding assert statement for checking self.orientation_ref is present
assert hasattr(
# adding assert statement for checking self.orientation_ref is present
if not hasattr(
self, "orientation_ref"
), "orientation_plan must be run with 'calculate_correlation_array=True'"

):
raise Warning("orientation_plan must be run with 'calculate_correlation_array=True'")

orientation = Orientation(num_matches=num_matches_return)
if bragg_peaks.data.shape[0] < min_number_peaks:
return orientation
Expand Down

0 comments on commit a23839e

Please sign in to comment.