diff --git a/py4DSTEM/process/phase/ptychographic_methods.py b/py4DSTEM/process/phase/ptychographic_methods.py index 14d8a82b1..0c1273123 100644 --- a/py4DSTEM/process/phase/ptychographic_methods.py +++ b/py4DSTEM/process/phase/ptychographic_methods.py @@ -277,6 +277,11 @@ def _reset_reconstruction( else: self.error_iterations = [] self._exit_waves = None + else: + # reset=False first start + if not hasattr(self, "error"): + self.error_iterations = [] + self._exit_waves = None @property def object_fft(self): @@ -3413,6 +3418,14 @@ def _reset_reconstruction( self._exit_waves = [None] * len(self._probes_all) else: self._exit_waves = None + else: + # reset=False first start + if not hasattr(self, "error"): + self.error_iterations = [] + if use_projection_scheme: + self._exit_waves = [None] * len(self._probes_all) + else: + self._exit_waves = None def _return_single_probe(self, probe=None): """Current probe estimate"""