Skip to content

Commit

Permalink
adding assert statement
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski authored Oct 27, 2023
1 parent 0c84848 commit 958642e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions py4DSTEM/process/diffraction/crystal_ACOM.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,13 @@ def match_single_pattern(
Orientation class containing all outputs
fig, ax: handles
Figure handles for the plotting output
"""
"""

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

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

0 comments on commit 958642e

Please sign in to comment.