Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix to make sure scan pos are saved when requested #550

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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