Skip to content

Commit

Permalink
Re-run all pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
fabcor-maxiv committed Oct 17, 2024
1 parent e8b25ba commit bf9e7a6
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 65 deletions.
121 changes: 60 additions & 61 deletions mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,11 @@ def query_pre_strategy_params(self, choose_lattice=None):
reslimits = (0.5, 5.0)
if resolution < reslimits[0]:
resolution = (
round(reslimits[0], resolution_decimals) + 0.1 ** resolution_decimals
round(reslimits[0], resolution_decimals) + 0.1**resolution_decimals
)
if resolution > reslimits[1]:
resolution = (
round(reslimits[1], resolution_decimals) - 0.1 ** resolution_decimals
round(reslimits[1], resolution_decimals) - 0.1**resolution_decimals
)

fields["resolution"] = {
Expand Down Expand Up @@ -625,7 +625,6 @@ def query_pre_strategy_params(self, choose_lattice=None):
elif not choose_lattice:
# Characterisation
ui_schema["parameters"]["column1"]["ui:order"].remove("point_groups")
pass

else:
# Acquisition
Expand Down Expand Up @@ -2356,64 +2355,64 @@ def process_centring_request(self, payload, correlation_id):
"Sample re-centering now active - Zoom in before continuing."
)

# else:
# # TODO The UI popup does not work in mxcubeweb
# # NB Temporarily inactivated pending a fix
#
# # Ask user to zoom
# info_text = """Automatic sample re-centering is now active
# Switch to maximum zoom before continuing"""
#
# schema = {
# "title": "GΦL Translational calibration",
# "type": "object",
# "properties": {},
# }
# fields = schema["properties"]
# fields["_info"] = {
# "type": "textdisplay",
# "default": info_text,
# "readOnly": True,
# }
# ui_schema = {
# "ui:order": ["_info"],
# "ui:widget": "vertical_box",
# "ui:options": {
# "return_signal": self.PARAMETER_RETURN_SIGNAL,
# # "update_signal": self.PARAMETER_UPDATE_SIGNAL,
# # "update_on_change": "selected",
# },
# }
# self._return_parameters = gevent.event.AsyncResult()
# try:
# dispatcher.connect(
# self.receive_ok_cancel,
# self.PARAMETER_RETURN_SIGNAL,
# dispatcher.Any,
# )
# responses = dispatcher.send(
# self.PARAMETERS_NEEDED,
# self,
# schema,
# ui_schema,
# )
# if not responses:
# self._return_parameters.set_exception(
# RuntimeError(
# "Signal %s is not connected" % self.PARAMETERS_NEEDED
# )
# )
#
# result = self._return_parameters.get()
# if result is StopIteration:
# return StopIteration
# finally:
# dispatcher.disconnect(
# self.receive_ok_cancel,
# self.PARAMETER_RETURN_SIGNAL,
# dispatcher.Any,
# )
# self._return_parameters = None
# else:
# # TODO The UI popup does not work in mxcubeweb
# # NB Temporarily inactivated pending a fix
#
# # Ask user to zoom
# info_text = """Automatic sample re-centering is now active
# Switch to maximum zoom before continuing"""
#
# schema = {
# "title": "GΦL Translational calibration",
# "type": "object",
# "properties": {},
# }
# fields = schema["properties"]
# fields["_info"] = {
# "type": "textdisplay",
# "default": info_text,
# "readOnly": True,
# }
# ui_schema = {
# "ui:order": ["_info"],
# "ui:widget": "vertical_box",
# "ui:options": {
# "return_signal": self.PARAMETER_RETURN_SIGNAL,
# # "update_signal": self.PARAMETER_UPDATE_SIGNAL,
# # "update_on_change": "selected",
# },
# }
# self._return_parameters = gevent.event.AsyncResult()
# try:
# dispatcher.connect(
# self.receive_ok_cancel,
# self.PARAMETER_RETURN_SIGNAL,
# dispatcher.Any,
# )
# responses = dispatcher.send(
# self.PARAMETERS_NEEDED,
# self,
# schema,
# ui_schema,
# )
# if not responses:
# self._return_parameters.set_exception(
# RuntimeError(
# "Signal %s is not connected" % self.PARAMETERS_NEEDED
# )
# )
#
# result = self._return_parameters.get()
# if result is StopIteration:
# return StopIteration
# finally:
# dispatcher.disconnect(
# self.receive_ok_cancel,
# self.PARAMETER_RETURN_SIGNAL,
# dispatcher.Any,
# )
# self._return_parameters = None

settings = goniostatRotation.axisSettings.copy()
if goniostatTranslation is not None:
Expand Down
1 change: 0 additions & 1 deletion mxcubecore/HardwareObjects/abstract/AbstractCollect.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"""

import os
import sys
import logging
import time
import errno
Expand Down
8 changes: 5 additions & 3 deletions mxcubecore/model/crystal_symmetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,9 @@
)
UI_LATTICES = BRAVAIS_LATTICES + ("mI",)


def filter_crystal_classes(bravais_lattice, crystal_classes=()):
""" Filter crystal classes to select those compatible with selected Bravais lattice
"""Filter crystal classes to select those compatible with selected Bravais lattice
including sublattices
Expand All @@ -414,7 +415,8 @@ def filter_crystal_classes(bravais_lattice, crystal_classes=()):
"""
compatibles = SUB_LATTICE_MAP[bravais_lattice[0]]
result = tuple(
xcls for xcls in crystal_classes
xcls
for xcls in crystal_classes
if CRYSTAL_CLASS_MAP[xcls].bravais_lattice[0] in compatibles
)
#
Expand Down Expand Up @@ -574,7 +576,7 @@ def strategy_laue_group(crystal_classes: tuple, phasing=False):
return result


def regularise_space_group(sgname:str):
def regularise_space_group(sgname: str):
"""Convert finput (ISPyB) space gorup name to official space group name"""

if sgname in SPACEGROUP_MAP:
Expand Down

0 comments on commit bf9e7a6

Please sign in to comment.