Skip to content

Commit

Permalink
Now correct fix for recentring='none' bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rhfogh authored and marcus-oscarsson committed Sep 30, 2024
1 parent bd7ba7a commit 4547d28
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,7 @@ def setup_data_collection(self, payload, correlation_id):
)
self._latest_translation_id = translation.id_
self._recentrings.append(translation)
goniostatTranslations.append(translation)
# Update current position
current_okp = tuple(
current_pos_dict[role] for role in self.rotation_axis_roles
Expand Down Expand Up @@ -1658,16 +1659,19 @@ def setup_data_collection(self, payload, correlation_id):
self._latest_translation_id = translation.id_
self._recentrings.append(translation)
gphl_workflow_model.current_rotation_id = sweepSetting.id_
goniostatTranslations.append(translation)

else:

if recentring_mode == "none":
if has_recentring_file:
# NB if no recentring but MiniKappaCorrection this still OK
# If we have recentring use it
# If not, never mind, presumably we have MiniKappaCorrescion
translation = GphlMessages.GoniostatTranslation(
rotation=sweepSetting, **translation_settings
)
self._latest_translation_id = None
goniostatTranslations.append(translation)
self._latest_translation_id = None
else:
if has_recentring_file:
settings.update(translation_settings)
Expand All @@ -1676,6 +1680,7 @@ def setup_data_collection(self, payload, correlation_id):
self._latest_translation_id = translation.id_
self._recentrings.append(translation)
gphl_workflow_model.current_rotation_id = sweepSetting.id_
goniostatTranslations.append(translation)
if recentring_mode == "start":
# We want snapshots in this mode,
# and the first sweepmis skipped in the loop below
Expand Down Expand Up @@ -1707,7 +1712,7 @@ def setup_data_collection(self, payload, correlation_id):
self._latest_translation_id = translation.id_
self._recentrings.append(translation)
gphl_workflow_model.current_rotation_id = newRotation.id_
goniostatTranslations.append(translation)
goniostatTranslations.append(translation)

# calculate or determine centring for remaining sweeps
for sweepSetting in sweepSettings[1:]:
Expand Down

0 comments on commit 4547d28

Please sign in to comment.