Skip to content

Commit

Permalink
bugfix to make sure scan pos are saved when requested (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
daurer authored Jul 18, 2024
1 parent 87bf289 commit 6c94a54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ptypy/accelerate/base/engines/stochastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,16 @@ def engine_finalize(self):

self._reset_benchmarks()

if self.do_position_refinement:
if self.do_position_refinement and self.p.position_refinement.record:
for label, d in self.di.storages.items():
prep = self.diff_info[d.ID]
res = self.kernels[prep.label].resolution
for i,view in enumerate(d.views):
for j,(pname, pod) in enumerate(view.pods.items()):
delta = (prep.original_addr[i][j][1][1:] - prep.addr[i][j][1][1:]) * res
delta = (prep.addr[i][j][1][1:] - prep.original_addr[i][j][1][1:]) * res
pod.ob_view.coord += delta
pod.ob_view.storage.update_views(pod.ob_view)
self.ptycho.record_positions = True


@register()
Expand Down

0 comments on commit 6c94a54

Please sign in to comment.