diff --git a/py4DSTEM/process/diffraction/crystal_ACOM.py b/py4DSTEM/process/diffraction/crystal_ACOM.py index 60c284263..0c01dc70d 100644 --- a/py4DSTEM/process/diffraction/crystal_ACOM.py +++ b/py4DSTEM/process/diffraction/crystal_ACOM.py @@ -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