mxcubecore 1.392.0__py3-none-any.whl → 1.394.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.

Potentially problematic release.


This version of mxcubecore might be problematic. Click here for more details.

Files changed (195) hide show
  1. mxcubecore/BaseHardwareObjects.py +1 -1
  2. mxcubecore/Command/Epics.py +2 -2
  3. mxcubecore/Command/Pool.py +4 -4
  4. mxcubecore/Command/Sardana.py +7 -3
  5. mxcubecore/Command/Taco.py +2 -2
  6. mxcubecore/Command/Tango.py +2 -2
  7. mxcubecore/Command/Tine.py +1 -1
  8. mxcubecore/Command/exporter/ExporterClient.py +2 -2
  9. mxcubecore/Command/exporter/StandardClient.py +4 -3
  10. mxcubecore/HardwareObjects/ALBA/ALBAAutoProcessing.py +4 -7
  11. mxcubecore/HardwareObjects/ALBA/ALBABackLight.py +6 -7
  12. mxcubecore/HardwareObjects/ALBA/ALBABeamInfo.py +2 -4
  13. mxcubecore/HardwareObjects/ALBA/ALBACats.py +19 -25
  14. mxcubecore/HardwareObjects/ALBA/ALBAClusterJob.py +10 -11
  15. mxcubecore/HardwareObjects/ALBA/ALBACollect.py +49 -71
  16. mxcubecore/HardwareObjects/ALBA/ALBADataAnalysis.py +26 -31
  17. mxcubecore/HardwareObjects/ALBA/ALBAEnergy.py +1 -5
  18. mxcubecore/HardwareObjects/ALBA/ALBAEpsActuator.py +1 -1
  19. mxcubecore/HardwareObjects/ALBA/ALBAFastShutter.py +1 -1
  20. mxcubecore/HardwareObjects/ALBA/ALBAFlux.py +2 -6
  21. mxcubecore/HardwareObjects/ALBA/ALBAFrontLight.py +5 -9
  22. mxcubecore/HardwareObjects/ALBA/ALBAISPyBClient.py +4 -4
  23. mxcubecore/HardwareObjects/ALBA/ALBAMiniDiff.py +20 -27
  24. mxcubecore/HardwareObjects/ALBA/ALBAPilatus.py +12 -15
  25. mxcubecore/HardwareObjects/ALBA/ALBASession.py +1 -4
  26. mxcubecore/HardwareObjects/ALBA/ALBAZoomMotor.py +10 -14
  27. mxcubecore/HardwareObjects/ALBA/ALBAZoomMotorAutoBrightness.py +7 -11
  28. mxcubecore/HardwareObjects/ALBA/XalocMiniDiff.py +7 -8
  29. mxcubecore/HardwareObjects/BeamInfo.py +4 -6
  30. mxcubecore/HardwareObjects/Beamline.py +6 -7
  31. mxcubecore/HardwareObjects/BeamlineActions.py +3 -7
  32. mxcubecore/HardwareObjects/BlissHutchTrigger.py +3 -3
  33. mxcubecore/HardwareObjects/BlissMotorWPositions.py +4 -7
  34. mxcubecore/HardwareObjects/Cats90.py +33 -43
  35. mxcubecore/HardwareObjects/CatsBessy.py +1 -1
  36. mxcubecore/HardwareObjects/CatsMaint.py +2 -2
  37. mxcubecore/HardwareObjects/CentringMath.py +5 -4
  38. mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +4 -4
  39. mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +2 -0
  40. mxcubecore/HardwareObjects/DESY/P11Collect.py +7 -7
  41. mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +14 -16
  42. mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +6 -10
  43. mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +6 -4
  44. mxcubecore/HardwareObjects/DataPublisher.py +2 -3
  45. mxcubecore/HardwareObjects/EDNACharacterisation.py +2 -4
  46. mxcubecore/HardwareObjects/EMBL/EMBLBeam.py +3 -3
  47. mxcubecore/HardwareObjects/EMBL/EMBLBeamCentering.py +2 -4
  48. mxcubecore/HardwareObjects/EMBL/EMBLBeamFocusing.py +3 -3
  49. mxcubecore/HardwareObjects/EMBL/EMBLBeamlineTest.py +2 -0
  50. mxcubecore/HardwareObjects/EMBL/EMBLDoorInterlock.py +1 -1
  51. mxcubecore/HardwareObjects/EMBL/EMBLEnergy.py +10 -18
  52. mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +10 -12
  53. mxcubecore/HardwareObjects/EMBL/EMBLFlux.py +10 -12
  54. mxcubecore/HardwareObjects/EMBL/EMBLMachineInfo.py +2 -2
  55. mxcubecore/HardwareObjects/EMBL/EMBLMiniDiff.py +18 -18
  56. mxcubecore/HardwareObjects/EMBL/EMBLMotorsGroup.py +6 -9
  57. mxcubecore/HardwareObjects/EMBL/EMBLOnlineProcessing.py +6 -6
  58. mxcubecore/HardwareObjects/EMBL/EMBLPPUControl.py +1 -1
  59. mxcubecore/HardwareObjects/EMBL/EMBLSSXChip.py +1 -4
  60. mxcubecore/HardwareObjects/EMBL/EMBLSlitBox.py +1 -3
  61. mxcubecore/HardwareObjects/EMBL/EMBLTableMotor.py +2 -3
  62. mxcubecore/HardwareObjects/EMBL/EMBLXRFSpectrum.py +4 -4
  63. mxcubecore/HardwareObjects/EMBL/EMBLXrayImaging.py +1 -1
  64. mxcubecore/HardwareObjects/EMBL/TINEMotor.py +2 -2
  65. mxcubecore/HardwareObjects/EMBLFlexHCD.py +5 -5
  66. mxcubecore/HardwareObjects/EMBLFlexHarvester.py +2 -2
  67. mxcubecore/HardwareObjects/ESRF/ESRFBeam.py +3 -5
  68. mxcubecore/HardwareObjects/ESRF/ESRFBeamInfo.py +1 -5
  69. mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py +2 -2
  70. mxcubecore/HardwareObjects/ESRF/ESRFEnergyScan.py +3 -3
  71. mxcubecore/HardwareObjects/ESRF/ESRFMetadataManagerClient.py +1 -1
  72. mxcubecore/HardwareObjects/ESRF/ESRFMultiCollect.py +7 -7
  73. mxcubecore/HardwareObjects/ESRF/ESRFPhotonFlux.py +2 -8
  74. mxcubecore/HardwareObjects/ESRF/ESRFSC3.py +11 -18
  75. mxcubecore/HardwareObjects/ESRF/ID29HutchTrigger.py +3 -3
  76. mxcubecore/HardwareObjects/ESRF/MD2MultiCollect.py +4 -4
  77. mxcubecore/HardwareObjects/ESRF/SSXICATLIMS.py +9 -6
  78. mxcubecore/HardwareObjects/EdnaWorkflow.py +9 -11
  79. mxcubecore/HardwareObjects/Energy.py +11 -15
  80. mxcubecore/HardwareObjects/ExporterMotor.py +1 -2
  81. mxcubecore/HardwareObjects/FlexHCD.py +7 -8
  82. mxcubecore/HardwareObjects/FlexHCDMaintenance.py +1 -1
  83. mxcubecore/HardwareObjects/GenericDiffractometer.py +26 -46
  84. mxcubecore/HardwareObjects/Gphl/CollectEmulator.py +6 -7
  85. mxcubecore/HardwareObjects/Gphl/GphlQueueEntry.py +2 -2
  86. mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py +29 -43
  87. mxcubecore/HardwareObjects/Gphl/GphlWorkflowConnection.py +25 -35
  88. mxcubecore/HardwareObjects/ICATLIMS.py +17 -13
  89. mxcubecore/HardwareObjects/LNLS/EPICSMotor.py +1 -4
  90. mxcubecore/HardwareObjects/LNLS/LNLSAperture.py +2 -5
  91. mxcubecore/HardwareObjects/LNLS/LNLSCamera.py +14 -16
  92. mxcubecore/HardwareObjects/LNLS/LNLSCollect.py +21 -29
  93. mxcubecore/HardwareObjects/LNLS/LNLSDetDistMotor.py +7 -11
  94. mxcubecore/HardwareObjects/LNLS/LNLSEnergy.py +4 -6
  95. mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +55 -51
  96. mxcubecore/HardwareObjects/LNLS/LNLSTransmission.py +4 -7
  97. mxcubecore/HardwareObjects/LdapAuthenticator.py +11 -15
  98. mxcubecore/HardwareObjects/Lima2Detector.py +1 -1
  99. mxcubecore/HardwareObjects/LimaEigerDetector.py +1 -1
  100. mxcubecore/HardwareObjects/LimaPilatusDetector.py +1 -4
  101. mxcubecore/HardwareObjects/MAXIV/MAXIVAutoProcessing.py +3 -5
  102. mxcubecore/HardwareObjects/MD3UP.py +1 -2
  103. mxcubecore/HardwareObjects/MachCurrent.py +5 -5
  104. mxcubecore/HardwareObjects/Marvin.py +23 -35
  105. mxcubecore/HardwareObjects/Microdiff.py +6 -8
  106. mxcubecore/HardwareObjects/MicrodiffActuator.py +1 -1
  107. mxcubecore/HardwareObjects/MicrodiffBeamstop.py +1 -1
  108. mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
  109. mxcubecore/HardwareObjects/MicrodiffKappaMotor.py +3 -4
  110. mxcubecore/HardwareObjects/MiniDiff.py +35 -57
  111. mxcubecore/HardwareObjects/MotorWPositions.py +4 -2
  112. mxcubecore/HardwareObjects/PlateManipulator.py +2 -2
  113. mxcubecore/HardwareObjects/ProposalTypeISPyBLims.py +8 -16
  114. mxcubecore/HardwareObjects/PyISPyBClient.py +8 -5
  115. mxcubecore/HardwareObjects/QtGraphicsLib.py +2 -2
  116. mxcubecore/HardwareObjects/QtGraphicsManager.py +13 -19
  117. mxcubecore/HardwareObjects/QtInstanceServer.py +27 -55
  118. mxcubecore/HardwareObjects/QtLimaVideo.py +1 -5
  119. mxcubecore/HardwareObjects/QueueManager.py +7 -9
  120. mxcubecore/HardwareObjects/QueueModel.py +6 -8
  121. mxcubecore/HardwareObjects/RedisClient.py +12 -16
  122. mxcubecore/HardwareObjects/SC3.py +1 -1
  123. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Attenuator.py +1 -3
  124. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1BeamInfo.py +1 -1
  125. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1CatsMaint.py +3 -4
  126. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Collect.py +11 -11
  127. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Cryotong.py +8 -18
  128. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Energy.py +6 -7
  129. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1EnergyScan.py +21 -31
  130. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Environment.py +1 -1
  131. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1MiniDiff.py +11 -21
  132. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pilatus.py +9 -9
  133. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pss.py +1 -2
  134. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Resolution.py +1 -5
  135. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1TangoLight.py +3 -8
  136. mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Attenuator.py +9 -13
  137. mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Collect.py +1 -1
  138. mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Diffractometer.py +22 -22
  139. mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Energy.py +4 -6
  140. mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Guillotine.py +2 -2
  141. mxcubecore/HardwareObjects/SOLEIL/SOLEILCatsMaint.py +6 -8
  142. mxcubecore/HardwareObjects/SOLEIL/SOLEILEnergyScan.py +44 -56
  143. mxcubecore/HardwareObjects/SOLEIL/SOLEILGuillotine.py +2 -2
  144. mxcubecore/HardwareObjects/SOLEIL/SOLEILISPyBClient.py +10 -10
  145. mxcubecore/HardwareObjects/SOLEIL/SOLEILMachineInfo.py +4 -8
  146. mxcubecore/HardwareObjects/SOLEIL/SOLEILPss.py +3 -4
  147. mxcubecore/HardwareObjects/SOLEIL/SOLEILRuche.py +1 -1
  148. mxcubecore/HardwareObjects/SOLEIL/TangoDCMotor.py +10 -16
  149. mxcubecore/HardwareObjects/SardanaMotor.py +4 -5
  150. mxcubecore/HardwareObjects/Session.py +1 -1
  151. mxcubecore/HardwareObjects/SpecMotorWPositions.py +5 -9
  152. mxcubecore/HardwareObjects/SpecMotorWSpecPositions.py +2 -4
  153. mxcubecore/HardwareObjects/SpecShell.py +7 -9
  154. mxcubecore/HardwareObjects/SpecState.py +5 -7
  155. mxcubecore/HardwareObjects/StateMachine.py +9 -10
  156. mxcubecore/HardwareObjects/TangoLimaMpegVideo.py +2 -3
  157. mxcubecore/HardwareObjects/TangoLimaVideo.py +3 -4
  158. mxcubecore/HardwareObjects/TangoMachineInfo.py +1 -3
  159. mxcubecore/HardwareObjects/TangoMotor.py +1 -1
  160. mxcubecore/HardwareObjects/UserTypeISPyBLims.py +8 -8
  161. mxcubecore/HardwareObjects/XMLRPCServer.py +20 -22
  162. mxcubecore/HardwareObjects/abstract/AbstractAperture.py +6 -11
  163. mxcubecore/HardwareObjects/abstract/AbstractCollect.py +6 -16
  164. mxcubecore/HardwareObjects/abstract/AbstractDetector.py +2 -7
  165. mxcubecore/HardwareObjects/abstract/AbstractEnergyScan.py +1 -1
  166. mxcubecore/HardwareObjects/abstract/AbstractLims.py +3 -4
  167. mxcubecore/HardwareObjects/abstract/AbstractMultiCollect.py +6 -6
  168. mxcubecore/HardwareObjects/abstract/AbstractNState.py +1 -1
  169. mxcubecore/HardwareObjects/abstract/AbstractProcedure.py +3 -4
  170. mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py +1 -1
  171. mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +5 -5
  172. mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +2 -0
  173. mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +11 -13
  174. mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py +3 -3
  175. mxcubecore/HardwareObjects/abstract/sample_changer/Crims.py +8 -0
  176. mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +12 -13
  177. mxcubecore/HardwareObjects/mockup/EnergyScanMockup.py +10 -11
  178. mxcubecore/HardwareObjects/mockup/ISPyBClientMockup.py +6 -6
  179. mxcubecore/HardwareObjects/mockup/ISPyBRestClientMockup.py +1 -1
  180. mxcubecore/HardwareObjects/mockup/LimaDetectorMockup.py +1 -2
  181. mxcubecore/HardwareObjects/mockup/MDCameraMockup.py +5 -6
  182. mxcubecore/HardwareObjects/mockup/MicrodiffInOutMockup.py +1 -1
  183. mxcubecore/HardwareObjects/mockup/MultiCollectMockup.py +1 -1
  184. mxcubecore/HardwareObjects/mockup/ShapeHistoryMockup.py +1 -2
  185. mxcubecore/HardwareObjects/mockup/XRFMockup.py +3 -6
  186. mxcubecore/TaskUtils.py +2 -0
  187. mxcubecore/queue_entry/base_queue_entry.py +2 -2
  188. mxcubecore/queue_entry/energy_scan.py +1 -1
  189. mxcubecore/saferef.py +2 -1
  190. mxcubecore/utils/qt_import.py +8 -7
  191. {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/METADATA +1 -1
  192. {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/RECORD +195 -195
  193. {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING +0 -0
  194. {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING.LESSER +0 -0
  195. {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/WHEEL +0 -0
@@ -486,7 +486,7 @@ class HardwareObjectNode:
486
486
  try:
487
487
  index = self.__objects_names.index(object_name)
488
488
  except ValueError:
489
- pass
489
+ logging.getLogger("HWR").exception("")
490
490
  else:
491
491
  for obj in self.__objects[index]:
492
492
  yield obj
@@ -141,7 +141,7 @@ class EpicsCommand(CommandObject):
141
141
  try:
142
142
  callback = self.__value_changed_callback_ref()
143
143
  except Exception:
144
- pass
144
+ logging.getLogger("HWR").exception("")
145
145
  else:
146
146
  if callback is not None:
147
147
  callback(value)
@@ -155,7 +155,7 @@ class EpicsCommand(CommandObject):
155
155
  try:
156
156
  poller.restart(1000)
157
157
  except Exception:
158
- pass
158
+ logging.getLogger("HWR").exception("")
159
159
 
160
160
  def get_pv_value(self):
161
161
  """wrapper function to pv.get() in order to supply additional named parameter"""
@@ -141,9 +141,9 @@ def process_tango_events():
141
141
  try:
142
142
  receiver_cb(event.attr_value.value)
143
143
  except AttributeError:
144
- pass
144
+ logging.getLogger("HWR").exception("")
145
145
  except KeyError:
146
- pass
146
+ logging.getLogger("HWR").exception("")
147
147
 
148
148
 
149
149
  class PoolChannel(ChannelObject):
@@ -217,7 +217,7 @@ class PoolChannel(ChannelObject):
217
217
  self.attribute_name, PyTango.EventType.CHANGE, self, []
218
218
  )
219
219
  except PyTango.EventSystemFailed:
220
- pass
220
+ logging.getLogger("HWR").exception("")
221
221
 
222
222
  def push_event(self, event):
223
223
  PoolChannel._eventReceivers[id(event)] = BoundMethodWeakref(self.update)
@@ -250,7 +250,7 @@ class PoolChannel(ChannelObject):
250
250
  try:
251
251
  s = self.device.State()
252
252
  except Exception:
253
- pass
253
+ logging.getLogger("HWR").exception("")
254
254
  else:
255
255
  if s == PyTango.DevState.OFF:
256
256
  return
@@ -84,9 +84,9 @@ def processSardanaEvents():
84
84
  try:
85
85
  gevent.spawn(receiver_cb, ev)
86
86
  except AttributeError:
87
- pass
87
+ logging.getLogger("HWR").exception("")
88
88
  except KeyError:
89
- pass
89
+ logging.getLogger("HWR").exception("")
90
90
 
91
91
 
92
92
  def wait_end_of_command(cmdobj):
@@ -188,6 +188,8 @@ class SardanaMacro(CommandObject, SardanaObject, ChannelObject):
188
188
  " - Wrong format for macro arguments. Macro is %s / args are (%s)"
189
189
  % (self.macro_format, str(args))
190
190
  )
191
+
192
+ logging.getLogger("HWR").exception("")
191
193
  return
192
194
 
193
195
  try:
@@ -399,6 +401,8 @@ class SardanaChannel(ChannelObject, SardanaObject):
399
401
  self.attribute = Attribute(self.model)
400
402
  except DevFailed as traceback:
401
403
  self.imported = False
404
+
405
+ logging.getLogger("HWR").exception("")
402
406
  return
403
407
 
404
408
  # read information
@@ -471,7 +475,7 @@ class SardanaChannel(ChannelObject, SardanaObject):
471
475
  self.emit("update", self.value)
472
476
  except AttributeError:
473
477
  # No value in data... this is probably a connection error
474
- pass
478
+ logging.getLogger("HWR").exception("")
475
479
 
476
480
  def is_connected(self):
477
481
  return self.attribute is not None
@@ -104,7 +104,7 @@ class TacoCommand(CommandObject):
104
104
  try:
105
105
  callback = self.__value_changed_callback_ref()
106
106
  except Exception:
107
- pass
107
+ logging.getLogger("HWR").exception("")
108
108
  else:
109
109
  if callback is not None:
110
110
  callback(device_name, value)
@@ -116,7 +116,7 @@ class TacoCommand(CommandObject):
116
116
  try:
117
117
  poller.restart(1000)
118
118
  except Exception:
119
- pass
119
+ logging.getLogger("HWR").exception("")
120
120
 
121
121
  def poll(
122
122
  self,
@@ -133,9 +133,9 @@ def process_tango_events():
133
133
  try:
134
134
  gevent.spawn(receiverCb, ev.event.attr_value.value)
135
135
  except AttributeError:
136
- pass
136
+ logging.getLogger("HWR").exception("")
137
137
  except KeyError:
138
- pass
138
+ logging.getLogger("HWR").exception("")
139
139
 
140
140
 
141
141
  class E:
@@ -82,7 +82,7 @@ class TineCommand(CommandObject):
82
82
  except IOError as strerror:
83
83
  logging.getLogger("HWR").error("%s" % strerror)
84
84
  except Exception:
85
- pass
85
+ logging.getLogger("HWR").exception("")
86
86
  return result
87
87
 
88
88
  def abort(self):
@@ -59,7 +59,7 @@ class ExporterClient(StandardClient):
59
59
  tokens = msg[4:].split(PARAMETER_SEPARATOR)
60
60
  self.on_event(tokens[0], tokens[1], int(tokens[2]))
61
61
  except Exception:
62
- pass
62
+ logging.getLogger("HWR").exception("")
63
63
  else:
64
64
  StandardClient.on_message_received(self, msg)
65
65
 
@@ -187,7 +187,7 @@ class ExporterClient(StandardClient):
187
187
  try:
188
188
  process_return = self.__process_return(ret)
189
189
  except Exception:
190
- pass
190
+ logging.getLogger("HWR").exception("")
191
191
  return process_return
192
192
 
193
193
  def read_property_as_string_array(self, prop):
@@ -20,6 +20,7 @@
20
20
 
21
21
  """ProtocolError and StandardClient implementation"""
22
22
 
23
+ import logging
23
24
  import socket
24
25
  import sys
25
26
 
@@ -109,7 +110,7 @@ class StandardClient:
109
110
  try:
110
111
  self.__sock.close()
111
112
  except Exception:
112
- pass
113
+ logging.getLogger("HWR").exception("")
113
114
  self._is_connected = False
114
115
  self.__sock = None
115
116
  self.received_msg = None
@@ -249,7 +250,7 @@ class StandardClient:
249
250
  try:
250
251
  self.on_connected()
251
252
  except Exception:
252
- pass
253
+ logging.getLogger("HWR").exception("")
253
254
  buffer = empty_buffer()
254
255
  mReceivedSTX = False
255
256
  while True:
@@ -288,7 +289,7 @@ class StandardClient:
288
289
  try:
289
290
  self.on_disconnected()
290
291
  except Exception:
291
- pass
292
+ logging.getLogger("HWR").exception("")
292
293
 
293
294
  def __send_stream(self, cmd):
294
295
  """Send a command.
@@ -1,4 +1,3 @@
1
- import logging
2
1
  import math
3
2
  import os
4
3
  import sys
@@ -28,7 +27,7 @@ class ALBAAutoProcessing(HardwareObject):
28
27
 
29
28
  self.template_dir = self.get_property("template_dir")
30
29
  var_dsname = self.get_property("variables_ds")
31
- logging.getLogger("HWR").debug(
30
+ self.log.debug(
32
31
  "ALBAAutoProcessing INIT: var_ds=%s, template_dir=%s"
33
32
  % (var_dsname, self.template_dir)
34
33
  )
@@ -194,15 +193,13 @@ class ALBAAutoProcessing(HardwareObject):
194
193
 
195
194
  # trigger auto processing for standard collection
196
195
  def trigger_auto_processing(self, dc_pars):
197
- logging.getLogger("HWR").debug(
198
- " ALBAAutoProcessing. triggering auto processing."
199
- )
196
+ self.log.debug(" ALBAAutoProcessing. triggering auto processing.")
200
197
 
201
198
  dc_id = dc_pars["collection_id"]
202
199
  output_dir = dc_pars["ednaproc_dir"]
203
200
 
204
- logging.getLogger("HWR").debug(" - collection_id = %s " % dc_id)
205
- logging.getLogger("HWR").debug(" - output_dir = %s " % output_dir)
201
+ self.log.debug(" - collection_id = %s " % dc_id)
202
+ self.log.debug(" - output_dir = %s " % output_dir)
206
203
 
207
204
  job = ALBAEdnaProcJob()
208
205
  input_file = self.input_file # TODO
@@ -1,4 +1,3 @@
1
- import logging
2
1
  import time
3
2
 
4
3
  import gevent
@@ -102,7 +101,7 @@ class ALBABackLight(HardwareObject):
102
101
  self.set_backlight_in()
103
102
  wait_ok = self.wait_backlight_in()
104
103
  if not wait_ok:
105
- logging.getLogger("HWR").debug("could not set backlight in")
104
+ self.log.debug("could not set backlight in")
106
105
  return
107
106
 
108
107
  level = None
@@ -112,7 +111,7 @@ class ALBABackLight(HardwareObject):
112
111
  if not level or level < self.minimum_level:
113
112
  level = self.minimum_level
114
113
 
115
- logging.getLogger("HWR").debug("setting light level to : %s" % level)
114
+ self.log.debug("setting light level to : %s" % level)
116
115
  self.setLevel(level)
117
116
 
118
117
  def set_backlight_in(self):
@@ -124,22 +123,22 @@ class ALBABackLight(HardwareObject):
124
123
  while elapsed < timeout:
125
124
  isin = self.backlightin_channel.get_value()
126
125
  if isin == state:
127
- logging.getLogger("HWR").debug(
126
+ self.log.debug(
128
127
  "waiting for backlight took %s . In is: %s" % (elapsed, isin)
129
128
  )
130
129
  return True
131
130
  gevent.sleep(0.1)
132
131
  elapsed = time.time() - t0
133
132
 
134
- logging.getLogger("HWR").debug("Timeout waiting for backlight In")
133
+ self.log.debug("Timeout waiting for backlight In")
135
134
  return False
136
135
 
137
136
  def _task_finished(self, g):
138
- logging.getLogger("HWR").debug("Backlight task finished")
137
+ self.log.debug("Backlight task finished")
139
138
  self._task = None
140
139
 
141
140
  def _task_failed(self, g):
142
- logging.getLogger("HWR").debug("Backlight task failed")
141
+ self.log.debug("Backlight task failed")
143
142
  self._task = None
144
143
 
145
144
  def setOff(self):
@@ -19,8 +19,6 @@ beamPosChanged
19
19
  -----------------------------------------------------------------------
20
20
  """
21
21
 
22
- import logging
23
-
24
22
  from mxcubecore.BaseHardwareObjects import HardwareObject
25
23
 
26
24
 
@@ -78,7 +76,7 @@ class ALBABeamInfo(HardwareObject):
78
76
  self.get_property("beam_divergence_horizontal")
79
77
  )
80
78
  except Exception:
81
- pass
79
+ self.log.exception("")
82
80
 
83
81
  self.default_beam_divergence = [
84
82
  default_beam_divergence_horizontal,
@@ -182,7 +180,7 @@ class ALBABeamInfo(HardwareObject):
182
180
  Arguments :
183
181
  Return :
184
182
  """
185
- logging.getLogger("HWR").debug(" emitting beam info")
183
+ self.log.debug(" emitting beam info")
186
184
  if (
187
185
  self.beam_info_dict["size_x"] != 9999
188
186
  and self.beam_info_dict["size_y"] != 9999
@@ -143,7 +143,7 @@ class ALBACats(Cats90):
143
143
  )
144
144
  return False
145
145
 
146
- logging.getLogger("HWR").debug("Supervisor waiting to finish phase change")
146
+ self.log.debug("Supervisor waiting to finish phase change")
147
147
  time.sleep(0.2)
148
148
 
149
149
  time.sleep(0.1)
@@ -189,9 +189,7 @@ class ALBACats(Cats90):
189
189
  @return:
190
190
  """
191
191
 
192
- logging.getLogger("HWR").debug(
193
- "Loading sample %s / type(%s)" % (sample, type(sample))
194
- )
192
+ self.log.debug("Loading sample %s / type(%s)" % (sample, type(sample)))
195
193
 
196
194
  ret, msg = self._check_coherence()
197
195
  if not ret:
@@ -312,7 +310,7 @@ class ALBACats(Cats90):
312
310
  # get sample selection
313
311
  selected = self.get_selected_sample()
314
312
 
315
- logging.getLogger("HWR").debug(
313
+ self.log.debug(
316
314
  " ==========CATS=== selected sample is %s (prev %s)"
317
315
  % (str(selected), str(sample))
318
316
  )
@@ -344,9 +342,7 @@ class ALBACats(Cats90):
344
342
  )
345
343
 
346
344
  if not self.has_loaded_sample() and self.cats_sample_on_diffr() == 1:
347
- logging.getLogger("HWR").warning(
348
- " ==========CATS=== sample on diffr, loading aborted"
349
- )
345
+ self.log.warning(" ==========CATS=== sample on diffr, loading aborted")
350
346
  self._update_state() # remove transient states like Loading. Reflect hardware state
351
347
  raise Exception(
352
348
  "The sample "
@@ -373,15 +369,13 @@ class ALBACats(Cats90):
373
369
  if use_ht: # loading HT sample
374
370
  if loaded_ht == -1: # has loaded but it is not HT
375
371
  # first unmount (non HT)
376
- logging.getLogger("HWR").warning(
372
+ self.log.warning(
377
373
  " ==========CATS=== mix load/unload dewar vs HT (NOT IMPLEMENTED YET)"
378
374
  )
379
375
  return
380
376
 
381
377
  argin = ["2", str(sample), "0", "0", xshift, yshift, zshift]
382
- logging.getLogger("HWR").warning(
383
- " ==========CATS=== about to load HT. %s" % str(argin)
384
- )
378
+ self.log.warning(" ==========CATS=== about to load HT. %s" % str(argin))
385
379
  if loaded_ht == 1: # has ht loaded
386
380
  cmd_ok = self._execute_server_task(
387
381
  self._cmdChainedLoadHT, argin, waitsafe=True
@@ -397,7 +391,7 @@ class ALBACats(Cats90):
397
391
  else:
398
392
  if loaded_ht == 1: # has an HT sample mounted
399
393
  # first unmount HT
400
- logging.getLogger("HWR").warning(
394
+ self.log.warning(
401
395
  " ==========CATS=== mix load/unload dewar vs HT (NOT IMPLEMENTED YET)"
402
396
  )
403
397
  return
@@ -414,7 +408,7 @@ class ALBACats(Cats90):
414
408
  stype = self.get_cassette_type(basketno)
415
409
 
416
410
  if tool != current_tool:
417
- logging.getLogger("HWR").warning(
411
+ self.log.warning(
418
412
  " ==========CATS=== changing tool from %s to %s"
419
413
  % (current_tool, tool)
420
414
  )
@@ -448,7 +442,7 @@ class ALBACats(Cats90):
448
442
  )
449
443
  else:
450
444
  if self.read_datamatrix:
451
- logging.getLogger("HWR").warning(
445
+ self.log.warning(
452
446
  " ==========CATS=== reading barcode only possible with spine pucks"
453
447
  )
454
448
  read_barcode = False
@@ -460,7 +454,7 @@ class ALBACats(Cats90):
460
454
  )
461
455
 
462
456
  if read_barcode:
463
- logging.getLogger("HWR").warning(
457
+ self.log.warning(
464
458
  " ==========CATS=== chained load sample (barcode), sending to cats: %s"
465
459
  % argin
466
460
  )
@@ -468,7 +462,7 @@ class ALBACats(Cats90):
468
462
  self._cmdChainedLoadBarcode, argin, waitsafe=True
469
463
  )
470
464
  else:
471
- logging.getLogger("HWR").warning(
465
+ self.log.warning(
472
466
  " ==========CATS=== chained load sample, sending to cats: %s"
473
467
  % argin
474
468
  )
@@ -477,7 +471,7 @@ class ALBACats(Cats90):
477
471
  )
478
472
  elif loaded_ht == 0:
479
473
  if read_barcode:
480
- logging.getLogger("HWR").warning(
474
+ self.log.warning(
481
475
  " ==========CATS=== load sample (barcode), sending to cats: %s"
482
476
  % argin
483
477
  )
@@ -485,7 +479,7 @@ class ALBACats(Cats90):
485
479
  self._cmdLoadBarcode, argin, waitsafe=True
486
480
  )
487
481
  else:
488
- logging.getLogger("HWR").warning(
482
+ self.log.warning(
489
483
  " ==========CATS=== load sample, sending to cats: %s" % argin
490
484
  )
491
485
  cmd_ok = self._execute_server_task(
@@ -493,18 +487,18 @@ class ALBACats(Cats90):
493
487
  )
494
488
 
495
489
  if not cmd_ok:
496
- logging.getLogger("HWR").info(" LOAD Command failed on device server")
490
+ self.log.info(" LOAD Command failed on device server")
497
491
  elif self.auto_prepare_diff and not changing_tool:
498
- logging.getLogger("HWR").info(
492
+ self.log.info(
499
493
  " AUTO_PREPARE_DIFF (On) sample changer is in safe state... preparing diff now"
500
494
  )
501
495
  # ret = self.diff_send_sampleview()
502
496
  self.go_sampleview_cmd()
503
- logging.getLogger("HWR").info(" restoring detector distance")
497
+ self.log.info(" restoring detector distance")
504
498
  self.restore_detdist_position()
505
499
  self._wait_phase_done("SAMPLE")
506
500
  else:
507
- logging.getLogger("HWR").info(
501
+ self.log.info(
508
502
  " AUTO_PREPARE_DIFF (Off) sample loading done / or changing tool (%s)"
509
503
  % changing_tool
510
504
  )
@@ -548,7 +542,7 @@ class ALBACats(Cats90):
548
542
  loaded_num = self._chnNumLoadedSample.get_value()
549
543
 
550
544
  if loaded_lid == -1:
551
- logging.getLogger("HWR").warning(
545
+ self.log.warning(
552
546
  " ==========CATS=== unload sample, no sample mounted detected"
553
547
  )
554
548
  return
@@ -561,7 +555,7 @@ class ALBACats(Cats90):
561
555
 
562
556
  argin = [str(tool), "0", xshift, yshift, zshift]
563
557
 
564
- logging.getLogger("HWR").warning(
558
+ self.log.warning(
565
559
  " ==========CATS=== unload sample, sending to cats: %s" % argin
566
560
  )
567
561
  if loaded_ht == 1:
@@ -1,4 +1,3 @@
1
- import logging
2
1
  import os
3
2
  import sys
4
3
  import time
@@ -31,11 +30,11 @@ class ALBAClusterJob(object):
31
30
  return state
32
31
 
33
32
  while state in ["RUNNING", "PENDING"]:
34
- logging.getLogger("HWR").debug("Job / is %s" % state)
33
+ self.log.debug("Job / is %s" % state)
35
34
  time.sleep(0.5)
36
35
  state = self.job.state
37
36
 
38
- logging.getLogger("HWR").debug(' job finished with state: "%s"' % state)
37
+ self.log.debug(' job finished with state: "%s"' % state)
39
38
  return state
40
39
 
41
40
  def get_result(self, state):
@@ -68,7 +67,7 @@ class ALBAStrategyJob(ALBAClusterJob):
68
67
  sls_script = os.path.join(root, "edna-mx/strategy/edna-mx.strategy.sl")
69
68
 
70
69
  def run(self, *args):
71
- logging.getLogger("HWR").debug("Starting StrategyJob - ")
70
+ self.log.debug("Starting StrategyJob - ")
72
71
 
73
72
  input_file, results_file, edna_directory = args
74
73
 
@@ -79,13 +78,13 @@ class ALBAStrategyJob(ALBAClusterJob):
79
78
  )
80
79
  self.job.submit()
81
80
 
82
- logging.getLogger("HWR").debug(" StrategyJob - %s" % str(self.job))
81
+ self.log.debug(" StrategyJob - %s" % str(self.job))
83
82
 
84
83
  self.edna_directory = os.path.dirname(input_file)
85
84
  self.results_file = results_file
86
85
 
87
- logging.getLogger("HWR").debug(" input file: %s" % input_file)
88
- logging.getLogger("HWR").debug(" edna directory: %s" % self.edna_directory)
86
+ self.log.debug(" input file: %s" % input_file)
87
+ self.log.debug(" edna directory: %s" % self.edna_directory)
89
88
 
90
89
  def get_result(self, state):
91
90
  if state == "COMPLETED":
@@ -93,19 +92,19 @@ class ALBAStrategyJob(ALBAClusterJob):
93
92
  self.edna_directory, "ControlInterfaceToMXCuBEv1_3_dataOutput.xml"
94
93
  )
95
94
 
96
- logging.getLogger("HWR").debug("Job / state is COMPLETED")
97
- logging.getLogger("HWR").debug(" looking for file: %s" % outfile)
95
+ self.log.debug("Job / state is COMPLETED")
96
+ self.log.debug(" looking for file: %s" % outfile)
98
97
  if os.path.exists(outfile):
99
98
  job_output = open(outfile).read()
100
99
  open(self.results_file, "w").write(job_output)
101
100
  result = XSDataResultMXCuBE.parseFile(self.results_file)
102
101
  else:
103
- logging.getLogger("HWR").debug(
102
+ self.log.debug(
104
103
  "EDNA Job finished without success / cannot find output file "
105
104
  )
106
105
  result = ""
107
106
  else:
108
- logging.getLogger("HWR").debug(
107
+ self.log.debug(
109
108
  "EDNA Job finished without success / state was %s" % (job.state)
110
109
  )
111
110
  result = ""