Skip to content

Commit

Permalink
if refined positions are saved, they are also saved to dump files
Browse files Browse the repository at this point in the history
  • Loading branch information
kahntm committed Oct 13, 2023
1 parent c544fef commit b7b9b09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ptypy/core/ptycho.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,11 @@ def save_run(self, alt_file=None, kind='minimal', force_overwrite=True):
if len(self.runtime.iter_info) > 0:
dump.runtime.iter_info = [self.runtime.iter_info[-1]]

if self.record_positions:
dump.positions = {}
for ID, S in self.obj.storages.items():
dump.positions[ID] = np.array([v.coord for v in S.views if v.pod.pr_view.layer==0])

content = dump

elif kind == 'minimal' or kind == 'dls':
Expand Down

0 comments on commit b7b9b09

Please sign in to comment.