mxcubecore 1.392.0__py3-none-any.whl → 1.393.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mxcubecore/BaseHardwareObjects.py +1 -1
- mxcubecore/Command/Epics.py +2 -2
- mxcubecore/Command/Pool.py +4 -4
- mxcubecore/Command/Sardana.py +7 -3
- mxcubecore/Command/Taco.py +2 -2
- mxcubecore/Command/Tango.py +2 -2
- mxcubecore/Command/Tine.py +1 -1
- mxcubecore/Command/exporter/ExporterClient.py +2 -2
- mxcubecore/Command/exporter/StandardClient.py +4 -3
- mxcubecore/HardwareObjects/ALBA/ALBABeamInfo.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBACollect.py +2 -2
- mxcubecore/HardwareObjects/ALBA/ALBAFlux.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAISPyBClient.py +2 -2
- mxcubecore/HardwareObjects/ALBA/ALBAPilatus.py +1 -1
- mxcubecore/HardwareObjects/BeamInfo.py +1 -1
- mxcubecore/HardwareObjects/BlissHutchTrigger.py +2 -0
- mxcubecore/HardwareObjects/Cats90.py +3 -3
- mxcubecore/HardwareObjects/CatsBessy.py +2 -1
- mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +2 -0
- mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +4 -0
- mxcubecore/HardwareObjects/DESY/P11Collect.py +2 -0
- mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +12 -12
- mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +2 -2
- mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +2 -0
- mxcubecore/HardwareObjects/EMBL/EMBLBeamFocusing.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLBeamlineTest.py +2 -0
- mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +3 -1
- mxcubecore/HardwareObjects/EMBL/EMBLFlux.py +1 -1
- mxcubecore/HardwareObjects/EMBL/TINEMotor.py +4 -2
- mxcubecore/HardwareObjects/ESRF/ESRFBeam.py +1 -1
- mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py +3 -2
- mxcubecore/HardwareObjects/ESRF/ESRFMetadataManagerClient.py +1 -1
- mxcubecore/HardwareObjects/ESRF/ID29HutchTrigger.py +2 -0
- mxcubecore/HardwareObjects/ESRF/MD2MultiCollect.py +1 -1
- mxcubecore/HardwareObjects/FlexHCDMaintenance.py +2 -1
- mxcubecore/HardwareObjects/GenericDiffractometer.py +5 -5
- mxcubecore/HardwareObjects/LNLS/LNLSCollect.py +2 -0
- mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +12 -0
- mxcubecore/HardwareObjects/LimaEigerDetector.py +1 -1
- mxcubecore/HardwareObjects/Marvin.py +2 -2
- mxcubecore/HardwareObjects/MicrodiffActuator.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffBeamstop.py +3 -1
- mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
- mxcubecore/HardwareObjects/MiniDiff.py +1 -1
- mxcubecore/HardwareObjects/MotorWPositions.py +2 -0
- mxcubecore/HardwareObjects/PlateManipulator.py +2 -2
- mxcubecore/HardwareObjects/QtGraphicsLib.py +2 -2
- mxcubecore/HardwareObjects/QtGraphicsManager.py +3 -3
- mxcubecore/HardwareObjects/QueueManager.py +3 -3
- mxcubecore/HardwareObjects/RedisClient.py +3 -3
- mxcubecore/HardwareObjects/SC3.py +2 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1BeamInfo.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Cryotong.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pilatus.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Collect.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/SOLEILISPyBClient.py +8 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILRuche.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/TangoDCMotor.py +1 -1
- mxcubecore/HardwareObjects/Session.py +2 -1
- mxcubecore/HardwareObjects/SpecShell.py +6 -6
- mxcubecore/HardwareObjects/SpecState.py +1 -1
- mxcubecore/HardwareObjects/TangoLimaMpegVideo.py +1 -1
- mxcubecore/HardwareObjects/TangoMotor.py +3 -1
- mxcubecore/HardwareObjects/UserTypeISPyBLims.py +4 -2
- mxcubecore/HardwareObjects/XMLRPCServer.py +2 -2
- mxcubecore/HardwareObjects/abstract/AbstractCollect.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractMultiCollect.py +6 -6
- mxcubecore/HardwareObjects/abstract/AbstractNState.py +2 -1
- mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +2 -2
- mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +2 -0
- mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +5 -5
- mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py +3 -3
- mxcubecore/HardwareObjects/abstract/sample_changer/Crims.py +8 -0
- mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +2 -0
- mxcubecore/HardwareObjects/mockup/EnergyScanMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/ISPyBClientMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/ISPyBRestClientMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/MDCameraMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/MicrodiffInOutMockup.py +1 -1
- mxcubecore/TaskUtils.py +2 -0
- mxcubecore/queue_entry/base_queue_entry.py +2 -2
- mxcubecore/queue_entry/energy_scan.py +1 -1
- mxcubecore/saferef.py +2 -1
- mxcubecore/utils/qt_import.py +8 -7
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.393.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.393.0.dist-info}/RECORD +89 -89
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.393.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.393.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.393.0.dist-info}/WHEEL +0 -0
|
@@ -363,7 +363,7 @@ class GenericDiffractometer(HardwareObject):
|
|
|
363
363
|
try:
|
|
364
364
|
self.used_channels_list = eval(ss0)
|
|
365
365
|
except Exception:
|
|
366
|
-
|
|
366
|
+
logging.getLogger("HWR").exception("")
|
|
367
367
|
|
|
368
368
|
for channel_name in self.used_channels_list:
|
|
369
369
|
self.channel_dict[channel_name] = self.get_channel_object(channel_name)
|
|
@@ -392,7 +392,7 @@ class GenericDiffractometer(HardwareObject):
|
|
|
392
392
|
try:
|
|
393
393
|
self.used_commands_list = eval(self.get_property("used_commands", "[]"))
|
|
394
394
|
except Exception:
|
|
395
|
-
|
|
395
|
+
logging.getLogger("HWR").exception("")
|
|
396
396
|
for command_name in self.used_commands_list:
|
|
397
397
|
self.command_dict[command_name] = self.get_command_object(command_name)
|
|
398
398
|
|
|
@@ -479,12 +479,12 @@ class GenericDiffractometer(HardwareObject):
|
|
|
479
479
|
self.motor_hwobj_dict["sampy"]
|
|
480
480
|
)
|
|
481
481
|
except Exception:
|
|
482
|
-
|
|
482
|
+
logging.getLogger("HWR").exception("")
|
|
483
483
|
|
|
484
484
|
try:
|
|
485
485
|
self.delay_state_polling = self.get_property("delay_state_polling")
|
|
486
486
|
except Exception:
|
|
487
|
-
|
|
487
|
+
logging.getLogger("HWR").exception("")
|
|
488
488
|
|
|
489
489
|
# Other parameters ---------------------------------------------------
|
|
490
490
|
try:
|
|
@@ -1412,7 +1412,7 @@ class GenericDiffractometer(HardwareObject):
|
|
|
1412
1412
|
self.sample_is_loaded_changed,
|
|
1413
1413
|
)
|
|
1414
1414
|
except Exception:
|
|
1415
|
-
|
|
1415
|
+
logging.getLogger("HWR").exception("")
|
|
1416
1416
|
|
|
1417
1417
|
if (
|
|
1418
1418
|
head_type == GenericDiffractometer.HEAD_TYPE_MINIKAPPA
|
|
@@ -262,6 +262,8 @@ class LNLSCollect(AbstractMultiCollect, HardwareObject):
|
|
|
262
262
|
ft = ft / 100 # [0, 1]
|
|
263
263
|
except Exception as e:
|
|
264
264
|
print("Error on setting Pilatus transmission: {}".format(str(e)))
|
|
265
|
+
|
|
266
|
+
logging.getLogger("HWR").exception("")
|
|
265
267
|
return False
|
|
266
268
|
|
|
267
269
|
# Write to det (values will be on the cbf header)
|
|
@@ -119,6 +119,8 @@ class LNLSPilatusDet(AbstractDetector):
|
|
|
119
119
|
logging.getLogger("HWR").error(
|
|
120
120
|
"Error while setting Pilatus threshold. Value must be float."
|
|
121
121
|
)
|
|
122
|
+
|
|
123
|
+
logging.getLogger("HWR").exception("")
|
|
122
124
|
return False
|
|
123
125
|
|
|
124
126
|
target_threshold = energy / 2
|
|
@@ -178,6 +180,8 @@ class LNLSPilatusDet(AbstractDetector):
|
|
|
178
180
|
logging.getLogger("HWR").error(
|
|
179
181
|
"Error while setting Pilatus wavelength. Value must be float."
|
|
180
182
|
)
|
|
183
|
+
|
|
184
|
+
logging.getLogger("HWR").exception("")
|
|
181
185
|
return False
|
|
182
186
|
|
|
183
187
|
# if abs(self.wavelength - wavelength) < 0.0001:
|
|
@@ -223,6 +227,8 @@ class LNLSPilatusDet(AbstractDetector):
|
|
|
223
227
|
logging.getLogger("HWR").error(
|
|
224
228
|
"Error while setting Pilatus det distance. Value must be float."
|
|
225
229
|
)
|
|
230
|
+
|
|
231
|
+
logging.getLogger("HWR").exception("")
|
|
226
232
|
return False
|
|
227
233
|
|
|
228
234
|
# if abs(self.det_distance - det_distance) < 0.001:
|
|
@@ -380,6 +386,8 @@ class LNLSPilatusDet(AbstractDetector):
|
|
|
380
386
|
logging.getLogger("HWR").error(
|
|
381
387
|
"Error while setting Pilatus transmission. Value must be float."
|
|
382
388
|
)
|
|
389
|
+
|
|
390
|
+
logging.getLogger("HWR").exception("")
|
|
383
391
|
return False
|
|
384
392
|
|
|
385
393
|
logging.getLogger("HWR").info(
|
|
@@ -417,6 +425,8 @@ class LNLSPilatusDet(AbstractDetector):
|
|
|
417
425
|
logging.getLogger("HWR").error(
|
|
418
426
|
"Error while setting Pilatus start angle. Value must be float."
|
|
419
427
|
)
|
|
428
|
+
|
|
429
|
+
logging.getLogger("HWR").exception("")
|
|
420
430
|
return False
|
|
421
431
|
|
|
422
432
|
logging.getLogger("HWR").info(
|
|
@@ -454,6 +464,8 @@ class LNLSPilatusDet(AbstractDetector):
|
|
|
454
464
|
logging.getLogger("HWR").error(
|
|
455
465
|
"Error while setting Pilatus angle increment. Value must be float."
|
|
456
466
|
)
|
|
467
|
+
|
|
468
|
+
logging.getLogger("HWR").exception("")
|
|
457
469
|
return False
|
|
458
470
|
|
|
459
471
|
logging.getLogger("HWR").info(
|
|
@@ -871,7 +871,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
871
871
|
Container.Pin.get_sample_address(basket_no, sample_no)
|
|
872
872
|
)
|
|
873
873
|
except Exception:
|
|
874
|
-
|
|
874
|
+
logging.getLogger("HWR").exception("")
|
|
875
875
|
self._set_selected_component(basket)
|
|
876
876
|
self._set_selected_sample(sample)
|
|
877
877
|
|
|
@@ -1042,7 +1042,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
1042
1042
|
self.emit("progressStep", self._progress)
|
|
1043
1043
|
self._info_dict["progress"] = self._progress
|
|
1044
1044
|
except Exception:
|
|
1045
|
-
|
|
1045
|
+
logging.getLogger("HWR").exception("")
|
|
1046
1046
|
elif prop_name == "CPuck":
|
|
1047
1047
|
if prop_value == "1":
|
|
1048
1048
|
centre_puck = True
|
|
@@ -54,7 +54,7 @@ class MicrodiffActuator(AbstractActuator):
|
|
|
54
54
|
tt = float(self.get_property("timeout"))
|
|
55
55
|
self.timeout = tt
|
|
56
56
|
except TypeError:
|
|
57
|
-
|
|
57
|
+
logging.getLogger("HWR").exception("")
|
|
58
58
|
|
|
59
59
|
if self.get_property("use_hwstate"):
|
|
60
60
|
self.hwstate_attr = self.add_channel(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
1
3
|
from mxcubecore.BaseHardwareObjects import HardwareObject
|
|
2
4
|
|
|
3
5
|
"""
|
|
@@ -92,7 +94,7 @@ class MicrodiffBeamstop(HardwareObject):
|
|
|
92
94
|
try:
|
|
93
95
|
pos = self.beamstop.states[pos]
|
|
94
96
|
except Exception:
|
|
95
|
-
|
|
97
|
+
logging.getLogger("HWR").exception("")
|
|
96
98
|
|
|
97
99
|
if not noEmit:
|
|
98
100
|
if pos:
|
|
@@ -142,7 +142,7 @@ class MiniDiff(HardwareObject):
|
|
|
142
142
|
try:
|
|
143
143
|
self.lightWago = hwr.get_hardware_object(wl_prop)
|
|
144
144
|
except Exception:
|
|
145
|
-
|
|
145
|
+
logging.getLogger("HWR").exception("")
|
|
146
146
|
|
|
147
147
|
if self.phiMotor is not None:
|
|
148
148
|
self.connect(self.phiMotor, "stateChanged", self.phiMotorStateChanged)
|
|
@@ -67,6 +67,8 @@ class MotorWPositions(AbstractMotor, Device):
|
|
|
67
67
|
self.motor = self.get_object_by_role(role)
|
|
68
68
|
except KeyError:
|
|
69
69
|
logging.getLogger("HWR").error("MotorWPositions: motor not defined")
|
|
70
|
+
|
|
71
|
+
logging.getLogger("HWR").exception("")
|
|
70
72
|
return
|
|
71
73
|
try:
|
|
72
74
|
self.delta = self["deltas"].get_property(role)
|
|
@@ -242,7 +242,7 @@ class PlateManipulator(SampleChanger):
|
|
|
242
242
|
self.num_drops,
|
|
243
243
|
) = cmd_get_config.get_value()
|
|
244
244
|
except Exception:
|
|
245
|
-
|
|
245
|
+
logging.getLogger("HWR").exception("")
|
|
246
246
|
else:
|
|
247
247
|
self.num_cols = self.get_property("numCols")
|
|
248
248
|
self.num_rows = self.get_property("numRows")
|
|
@@ -323,7 +323,7 @@ class PlateManipulator(SampleChanger):
|
|
|
323
323
|
self.plate_location_changed(self.chan_plate_location.get_value())
|
|
324
324
|
self._on_state_changed(state)
|
|
325
325
|
except AttributeError:
|
|
326
|
-
|
|
326
|
+
logging.getLogger("HWR").exception("")
|
|
327
327
|
|
|
328
328
|
def _on_state_changed(self, state):
|
|
329
329
|
"""
|
|
@@ -466,7 +466,7 @@ class GraphicsItemPoint(GraphicsItem):
|
|
|
466
466
|
self.__centred_position.kappa_phi,
|
|
467
467
|
)
|
|
468
468
|
except Exception:
|
|
469
|
-
|
|
469
|
+
logging.getLogger("HWR").exception("")
|
|
470
470
|
return full_name
|
|
471
471
|
|
|
472
472
|
def get_centred_position(self):
|
|
@@ -602,7 +602,7 @@ class GraphicsItemLine(GraphicsItem):
|
|
|
602
602
|
start_cpos.kappa_phi,
|
|
603
603
|
)
|
|
604
604
|
except Exception:
|
|
605
|
-
|
|
605
|
+
logging.getLogger("HWR").exception("")
|
|
606
606
|
return full_name
|
|
607
607
|
|
|
608
608
|
def paint(self, painter, option, widget):
|
|
@@ -294,7 +294,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
294
294
|
self.image_scale = self.get_property("default_image_scale")
|
|
295
295
|
self.set_image_scale(self.image_scale, self.image_scale is not None)
|
|
296
296
|
except Exception:
|
|
297
|
-
|
|
297
|
+
logging.getLogger("HWR").exception("")
|
|
298
298
|
|
|
299
299
|
"""
|
|
300
300
|
if self.get_property("store_graphics_config") == True:
|
|
@@ -335,7 +335,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
335
335
|
eval(self.get_property("magnification_tool"))
|
|
336
336
|
)
|
|
337
337
|
except Exception:
|
|
338
|
-
|
|
338
|
+
logging.getLogger("HWR").exception("")
|
|
339
339
|
|
|
340
340
|
# try:
|
|
341
341
|
# self.set_view_scale(self.get_property("view_scale"))
|
|
@@ -797,7 +797,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
797
797
|
date_time_str = datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
|
|
798
798
|
result_image.save("/opt/embl-hh/var/crystal_images/%s.png" % date_time_str)
|
|
799
799
|
except Exception:
|
|
800
|
-
|
|
800
|
+
logging.getLogger("HWR").exception("")
|
|
801
801
|
|
|
802
802
|
def diffractometer_centring_failed(self, method, centring_status):
|
|
803
803
|
"""CleanUp method after centring failed
|
|
@@ -168,7 +168,7 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
168
168
|
qe.handle_exception(ex)
|
|
169
169
|
self.stop()
|
|
170
170
|
except gevent.GreenletExit:
|
|
171
|
-
|
|
171
|
+
logging.getLogger("HWR").exception("")
|
|
172
172
|
|
|
173
173
|
if isinstance(ex, base_queue_entry.QueueAbortedException):
|
|
174
174
|
logging.getLogger("user_level_log").warning(
|
|
@@ -276,9 +276,9 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
276
276
|
qe.stop()
|
|
277
277
|
qe.post_execute()
|
|
278
278
|
except base_queue_entry.QueueAbortedException:
|
|
279
|
-
|
|
279
|
+
logging.getLogger("HWR").exception("")
|
|
280
280
|
except Exception:
|
|
281
|
-
|
|
281
|
+
logging.getLogger("HWR").exception("")
|
|
282
282
|
|
|
283
283
|
if self._root_task:
|
|
284
284
|
self._root_task.kill(block=False)
|
|
@@ -88,7 +88,7 @@ class RedisClient(HardwareObject):
|
|
|
88
88
|
try:
|
|
89
89
|
self.connect(HWR.beamline.flux, "fluxChanged", self.flux_changed)
|
|
90
90
|
except Exception:
|
|
91
|
-
|
|
91
|
+
logging.getLogger("HWR").exception("")
|
|
92
92
|
|
|
93
93
|
self.proposal_id = HWR.beamline.session.get_proposal()
|
|
94
94
|
self.beamline_name = HWR.beamline.session.beamline_name
|
|
@@ -162,7 +162,7 @@ class RedisClient(HardwareObject):
|
|
|
162
162
|
)
|
|
163
163
|
logging.getLogger("HWR").debug("RedisClient: Graphics loaded")
|
|
164
164
|
except Exception:
|
|
165
|
-
|
|
165
|
+
logging.getLogger("HWR").exception("")
|
|
166
166
|
|
|
167
167
|
def save_queue_history_item(self, item):
|
|
168
168
|
"""Saves queue history in redisDB"""
|
|
@@ -187,7 +187,7 @@ class RedisClient(HardwareObject):
|
|
|
187
187
|
for item in items:
|
|
188
188
|
result.append(eval(item))
|
|
189
189
|
except Exception:
|
|
190
|
-
|
|
190
|
+
logging.getLogger("HWR").exception("")
|
|
191
191
|
return result
|
|
192
192
|
|
|
193
193
|
def clear_db(self):
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import xml.sax
|
|
2
3
|
from xml.sax.handler import ContentHandler
|
|
3
4
|
|
|
@@ -374,7 +375,7 @@ class SC3(SampleChanger):
|
|
|
374
375
|
Pin.get_sample_address(basket_no, sample_no)
|
|
375
376
|
)
|
|
376
377
|
except Exception:
|
|
377
|
-
|
|
378
|
+
logging.getLogger("HWR").exception("")
|
|
378
379
|
self._set_selected_component(basket)
|
|
379
380
|
self._set_selected_sample(sample)
|
|
380
381
|
|
|
@@ -85,7 +85,7 @@ class PX1BeamInfo(HardwareObject):
|
|
|
85
85
|
self.beam_info_dict["size_x"] = self.beam_size[0] = float(beamx)
|
|
86
86
|
self.beam_info_dict["size_y"] = self.beam_size[1] = float(beamy)
|
|
87
87
|
except Exception:
|
|
88
|
-
|
|
88
|
+
logging.getLogger("HWR").exception("")
|
|
89
89
|
|
|
90
90
|
def connect_notify(self, signal):
|
|
91
91
|
if signal == "beamInfoChanged":
|
|
@@ -104,7 +104,7 @@ class PX1Cryotong(Cats90):
|
|
|
104
104
|
self._cmdAckSampleMemory()
|
|
105
105
|
except Exception:
|
|
106
106
|
""" do nothing if cmd not to acknowledge not in xml """
|
|
107
|
-
|
|
107
|
+
logging.getLogger("HWR").exception("")
|
|
108
108
|
self.incoherent_state = value
|
|
109
109
|
|
|
110
110
|
def _dry_and_soak_needed(self, value=None):
|
|
@@ -89,7 +89,7 @@ class PX2Collect(AbstractCollect, HardwareObject):
|
|
|
89
89
|
for undulator in self["undulators"]:
|
|
90
90
|
undulators.append(undulator)
|
|
91
91
|
except Exception:
|
|
92
|
-
|
|
92
|
+
logging.getLogger("HWR").exception("")
|
|
93
93
|
|
|
94
94
|
beam_div_hor, beam_div_ver = HWR.beamline.beam.get_beam_divergence()
|
|
95
95
|
|
|
@@ -45,7 +45,7 @@ class SOLEILISPyBClient(ISPyBClient):
|
|
|
45
45
|
hdlr.setFormatter(formatter)
|
|
46
46
|
logger.addHandler(hdlr)
|
|
47
47
|
except Exception:
|
|
48
|
-
|
|
48
|
+
logging.getLogger("HWR").exception("")
|
|
49
49
|
|
|
50
50
|
logger.setLevel(logging.INFO)
|
|
51
51
|
|
|
@@ -111,19 +111,19 @@ class SOLEILISPyBClient(ISPyBClient):
|
|
|
111
111
|
try:
|
|
112
112
|
self._translations[code]["ldap"] = proposal.ldap
|
|
113
113
|
except AttributeError:
|
|
114
|
-
|
|
114
|
+
logging.getLogger("HWR").exception("")
|
|
115
115
|
try:
|
|
116
116
|
self._translations[code]["ispyb"] = proposal.ispyb
|
|
117
117
|
except AttributeError:
|
|
118
|
-
|
|
118
|
+
logging.getLogger("HWR").exception("")
|
|
119
119
|
try:
|
|
120
120
|
self._translations[code]["gui"] = proposal.gui
|
|
121
121
|
except AttributeError:
|
|
122
|
-
|
|
122
|
+
logging.getLogger("HWR").exception("")
|
|
123
123
|
except IndexError:
|
|
124
|
-
|
|
124
|
+
logging.getLogger("HWR").exception("")
|
|
125
125
|
except Exception:
|
|
126
|
-
|
|
126
|
+
logging.getLogger("HWR").exception("")
|
|
127
127
|
|
|
128
128
|
def translate(self, code, what):
|
|
129
129
|
"""
|
|
@@ -187,7 +187,7 @@ class SOLEILISPyBClient(ISPyBClient):
|
|
|
187
187
|
logging.debug("SOLEIL ISPyBClient - %s is %s " % (prop, ispyb_path))
|
|
188
188
|
mx_collect_dict[prop] = ispyb_path
|
|
189
189
|
except Exception:
|
|
190
|
-
|
|
190
|
+
logging.getLogger("HWR").exception("")
|
|
191
191
|
|
|
192
192
|
def prepare_image_for_lims(self, image_dict):
|
|
193
193
|
for prop in ["jpegThumbnailFileFullPath", "jpegFileFullPath"]:
|
|
@@ -196,7 +196,7 @@ class SOLEILISPyBClient(ISPyBClient):
|
|
|
196
196
|
ispyb_path = HWR.beamline.session.path_to_ispyb(path)
|
|
197
197
|
image_dict[prop] = ispyb_path
|
|
198
198
|
except Exception:
|
|
199
|
-
|
|
199
|
+
logging.getLogger("HWR").exception("")
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
def test_hwo(hwo):
|
|
@@ -5,6 +5,7 @@ Contains information regarding the current session and methods to
|
|
|
5
5
|
access and manipulate this information.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
import logging
|
|
8
9
|
import os
|
|
9
10
|
import socket
|
|
10
11
|
import time
|
|
@@ -93,7 +94,7 @@ class Session(HardwareObject):
|
|
|
93
94
|
domain = socket.getfqdn().split(".")
|
|
94
95
|
self.email_extension = ".".join((domain[-2], domain[-1]))
|
|
95
96
|
except (TypeError, IndexError):
|
|
96
|
-
|
|
97
|
+
logging.getLogger("HWR").exception("")
|
|
97
98
|
|
|
98
99
|
self.set_base_data_directories(
|
|
99
100
|
file_info["base_directory"],
|
|
@@ -155,7 +155,7 @@ class SpecShell(HardwareObject):
|
|
|
155
155
|
try:
|
|
156
156
|
buf_list = buf.split()
|
|
157
157
|
except Exception:
|
|
158
|
-
|
|
158
|
+
logging.getLogger("HWR").exception("")
|
|
159
159
|
else:
|
|
160
160
|
i = 0
|
|
161
161
|
while i < len(buf_list):
|
|
@@ -163,20 +163,20 @@ class SpecShell(HardwareObject):
|
|
|
163
163
|
try:
|
|
164
164
|
cmd_aux = buf_list[i + 1]
|
|
165
165
|
except Exception:
|
|
166
|
-
|
|
166
|
+
logging.getLogger("HWR").exception("")
|
|
167
167
|
else:
|
|
168
168
|
try:
|
|
169
169
|
left_par = cmd_aux[0]
|
|
170
170
|
right_par = cmd_aux[-1]
|
|
171
171
|
midle_num = cmd_aux[1:-1]
|
|
172
172
|
except Exception:
|
|
173
|
-
|
|
173
|
+
logging.getLogger("HWR").exception("")
|
|
174
174
|
else:
|
|
175
175
|
if left_par == "(" and right_par == ")":
|
|
176
176
|
try:
|
|
177
177
|
int(midle_num)
|
|
178
178
|
except Exception:
|
|
179
|
-
|
|
179
|
+
logging.getLogger("HWR").exception("")
|
|
180
180
|
else:
|
|
181
181
|
commands_list.append(cmd_name.lstrip("*"))
|
|
182
182
|
i += 2
|
|
@@ -222,7 +222,7 @@ class SpecShell(HardwareObject):
|
|
|
222
222
|
try:
|
|
223
223
|
self.specShellCommand.abort()
|
|
224
224
|
except SpecClient.SpecClientError.SpecClientError as diag:
|
|
225
|
-
|
|
225
|
+
logging.getLogger("HWR").exception("")
|
|
226
226
|
|
|
227
227
|
def outputReceived(self, output):
|
|
228
228
|
if self.lsdefRunning:
|
|
@@ -250,7 +250,7 @@ class SpecShell(HardwareObject):
|
|
|
250
250
|
else:
|
|
251
251
|
cmds.append(cmd.method)
|
|
252
252
|
except Exception:
|
|
253
|
-
|
|
253
|
+
logging.getLogger("HWR").exception("")
|
|
254
254
|
return cmds
|
|
255
255
|
|
|
256
256
|
def getAllCommands(self):
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
TangoMotor class defines motor in the Tango control system (used and tested in DESY/P11
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
+
import logging
|
|
24
|
+
|
|
23
25
|
import gevent
|
|
24
26
|
|
|
25
27
|
from mxcubecore.HardwareObjects.abstract.AbstractMotor import AbstractMotor
|
|
@@ -106,7 +108,7 @@ class TangoMotor(AbstractMotor):
|
|
|
106
108
|
if self.get_property("default_limits"):
|
|
107
109
|
self.update_limits(eval(self.get_property("default_limits")))
|
|
108
110
|
except Exception:
|
|
109
|
-
|
|
111
|
+
logging.getLogger("HWR").exception("")
|
|
110
112
|
|
|
111
113
|
self.cmd_stop = self.get_command_object("stopAxis")
|
|
112
114
|
if self.cmd_stop is None:
|
|
@@ -185,7 +185,7 @@ class UserTypeISPyBLims(ISPyBAbstractLIMS):
|
|
|
185
185
|
session.endDate, "%Y-%m-%d %H:%M:%S"
|
|
186
186
|
)
|
|
187
187
|
except Exception:
|
|
188
|
-
|
|
188
|
+
logging.getLogger("HWR").exception("")
|
|
189
189
|
sessions.append(utf_encode(asdict(session)))
|
|
190
190
|
|
|
191
191
|
except WebFault as e:
|
|
@@ -281,7 +281,7 @@ class UserTypeISPyBLims(ISPyBAbstractLIMS):
|
|
|
281
281
|
session.endDate, "%Y-%m-%d %H:%M:%S"
|
|
282
282
|
)
|
|
283
283
|
except Exception:
|
|
284
|
-
|
|
284
|
+
logging.getLogger("HWR").exception("")
|
|
285
285
|
|
|
286
286
|
sessions.append(utf_encode(asdict(session)))
|
|
287
287
|
|
|
@@ -291,6 +291,8 @@ class UserTypeISPyBLims(ISPyBAbstractLIMS):
|
|
|
291
291
|
|
|
292
292
|
except URLError:
|
|
293
293
|
logging.getLogger("ispyb_client").warning(_CONNECTION_ERROR_MSG)
|
|
294
|
+
|
|
295
|
+
logging.getLogger("HWR").exception("")
|
|
294
296
|
return empty_dict
|
|
295
297
|
|
|
296
298
|
logging.getLogger("ispyb_client").info(str(sessions))
|
|
@@ -88,7 +88,7 @@ class XMLRPCServer(HardwareObject):
|
|
|
88
88
|
self._server.server_close()
|
|
89
89
|
del self._server
|
|
90
90
|
except AttributeError:
|
|
91
|
-
|
|
91
|
+
logging.getLogger("HWR").exception("")
|
|
92
92
|
|
|
93
93
|
def open(self):
|
|
94
94
|
# The value of the member self.port is set in the xml configuration
|
|
@@ -691,7 +691,7 @@ class XMLRPCServer(HardwareObject):
|
|
|
691
691
|
module_name + "." + sub_module[1], recurse=False, prefix=prefix
|
|
692
692
|
)
|
|
693
693
|
except StopIteration:
|
|
694
|
-
|
|
694
|
+
logging.getLogger("HWR").exception("")
|
|
695
695
|
|
|
696
696
|
def set_token(self, token):
|
|
697
697
|
SecureXMLRpcRequestHandler.setReferenceToken(token)
|
|
@@ -106,7 +106,7 @@ class AbstractCollect(HardwareObject, object):
|
|
|
106
106
|
for undulator in self.config.undulators:
|
|
107
107
|
undulators.append(undulator)
|
|
108
108
|
except Exception:
|
|
109
|
-
|
|
109
|
+
logging.getLogger("HWR").exception("")
|
|
110
110
|
|
|
111
111
|
beam_div_hor, beam_div_ver = HWR.beamline.beam.get_beam_divergence()
|
|
112
112
|
|
|
@@ -270,12 +270,12 @@ class AbstractMultiCollect(object):
|
|
|
270
270
|
try:
|
|
271
271
|
sample_container_number = int(sample_info["container_reference"])
|
|
272
272
|
except Exception:
|
|
273
|
-
|
|
273
|
+
logging.getLogger("HWR").exception("")
|
|
274
274
|
else:
|
|
275
275
|
try:
|
|
276
276
|
vial_number = int(sample_info["sample_location"])
|
|
277
277
|
except Exception:
|
|
278
|
-
|
|
278
|
+
logging.getLogger("HWR").exception("")
|
|
279
279
|
else:
|
|
280
280
|
sample_location = (sample_container_number, vial_number)
|
|
281
281
|
|
|
@@ -540,7 +540,7 @@ class AbstractMultiCollect(object):
|
|
|
540
540
|
logging.getLogger("user_level_log").info("Getting centring status")
|
|
541
541
|
centring_status = self.diffractometer().get_centring_status()
|
|
542
542
|
except Exception:
|
|
543
|
-
|
|
543
|
+
logging.getLogger("HWR").exception("")
|
|
544
544
|
else:
|
|
545
545
|
centring_info = dict(centring_status)
|
|
546
546
|
|
|
@@ -644,7 +644,7 @@ class AbstractMultiCollect(object):
|
|
|
644
644
|
try:
|
|
645
645
|
f.close()
|
|
646
646
|
except Exception:
|
|
647
|
-
|
|
647
|
+
logging.getLogger("HWR").exception("")
|
|
648
648
|
|
|
649
649
|
data_collect_parameters["xtalSnapshotFullPath%i" % snapshot_i] = (
|
|
650
650
|
full_snapshot
|
|
@@ -808,7 +808,7 @@ class AbstractMultiCollect(object):
|
|
|
808
808
|
HWR.beamline.beam.wait_for_beam()
|
|
809
809
|
HWR.beamline.cryo.wait_temperature()
|
|
810
810
|
except AttributeError:
|
|
811
|
-
|
|
811
|
+
logging.getLogger("HWR").exception("")
|
|
812
812
|
|
|
813
813
|
logging.getLogger("user_level_log").info("Preparing intensity monitors")
|
|
814
814
|
self.prepare_intensity_monitors()
|
|
@@ -1149,7 +1149,7 @@ class AbstractMultiCollect(object):
|
|
|
1149
1149
|
),
|
|
1150
1150
|
)
|
|
1151
1151
|
except Exception:
|
|
1152
|
-
|
|
1152
|
+
logging.getLogger("HWR").exception("")
|
|
1153
1153
|
else:
|
|
1154
1154
|
collections_analyse_params.append(
|
|
1155
1155
|
(
|