diff --git a/mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py b/mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py index 4c24af9920..1a0cf8f40b 100644 --- a/mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py +++ b/mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py @@ -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"] = { @@ -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 @@ -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: diff --git a/mxcubecore/HardwareObjects/abstract/AbstractCollect.py b/mxcubecore/HardwareObjects/abstract/AbstractCollect.py index 31fe8fe17c..2dc2b90c9e 100644 --- a/mxcubecore/HardwareObjects/abstract/AbstractCollect.py +++ b/mxcubecore/HardwareObjects/abstract/AbstractCollect.py @@ -24,7 +24,6 @@ """ import os -import sys import logging import time import errno diff --git a/mxcubecore/model/crystal_symmetry.py b/mxcubecore/model/crystal_symmetry.py index 718c240fde..85cbd52b63 100644 --- a/mxcubecore/model/crystal_symmetry.py +++ b/mxcubecore/model/crystal_symmetry.py @@ -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 @@ -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 ) # @@ -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: