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
@@ -429,7 +429,7 @@ class Cats90(SampleChanger):
429
429
  self.basket_types = self.cats_device.read_attribute("CassetteType").value
430
430
  self.number_of_baskets = len(self.basket_types)
431
431
  except PyTango.DevFailed:
432
- pass
432
+ self.log.exception("")
433
433
 
434
434
  # find number of baskets and number of samples per basket
435
435
  if self.number_of_baskets is not None:
@@ -495,7 +495,7 @@ class Cats90(SampleChanger):
495
495
  "di_Cassette%dPresence" % (basket_index + 1),
496
496
  )
497
497
  self.basket_channels[basket_index] = chan
498
- logging.getLogger("HWR").debug(
498
+ self.log.debug(
499
499
  "Creating channel for cassette presence %d" % (basket_index + 1)
500
500
  )
501
501
 
@@ -539,7 +539,7 @@ class Cats90(SampleChanger):
539
539
  if unipuck_tool:
540
540
  self.set_unipuck_tool(unipuck_tool)
541
541
  except Exception:
542
- pass
542
+ self.log.exception("")
543
543
 
544
544
  self.update_info()
545
545
 
@@ -560,7 +560,7 @@ class Cats90(SampleChanger):
560
560
  :returns: None
561
561
  :rtype: None
562
562
  """
563
- logging.getLogger("HWR").warning("Cats90: initializing contents")
563
+ self.log.warning("Cats90: initializing contents")
564
564
 
565
565
  self.basket_presence = [None] * self.number_of_baskets
566
566
 
@@ -601,7 +601,7 @@ class Cats90(SampleChanger):
601
601
  sample._set_loaded(loaded, has_been_loaded)
602
602
  sample._set_holder_length(spl[4])
603
603
 
604
- logging.getLogger("HWR").warning("Cats90: initializing contents done")
604
+ self.log.warning("Cats90: initializing contents done")
605
605
 
606
606
  def get_sample_properties(self):
607
607
  """
@@ -690,7 +690,7 @@ class Cats90(SampleChanger):
690
690
  Pin.get_sample_address(basket_no, sample_no)
691
691
  )
692
692
  except Exception:
693
- pass
693
+ self.log.exception("")
694
694
  self._set_selected_component(basket)
695
695
  self._set_selected_sample(sample)
696
696
 
@@ -780,9 +780,7 @@ class Cats90(SampleChanger):
780
780
  return
781
781
 
782
782
  self._update_state() # remove software flags like Loading.
783
- logging.getLogger("HWR").debug(
784
- " ==========CATS== load cmd .state is: %s " % (self.state)
785
- )
783
+ self.log.debug(" ==========CATS== load cmd .state is: %s " % (self.state))
786
784
 
787
785
  sample = self._resolve_component(sample)
788
786
  self.assert_not_charging()
@@ -843,7 +841,7 @@ class Cats90(SampleChanger):
843
841
  yshift,
844
842
  zshift,
845
843
  ]
846
- logging.getLogger("HWR").debug(
844
+ self.log.debug(
847
845
  " ==========CATS=== doLoad argin: %s / %s:%s"
848
846
  % (argin, basketno, sampleno)
849
847
  )
@@ -857,37 +855,37 @@ class Cats90(SampleChanger):
857
855
  )
858
856
  else:
859
857
  if self.read_datamatrix and self._cmdChainedLoadBarcode is not None:
860
- logging.getLogger("HWR").warning(
858
+ self.log.warning(
861
859
  " ==========CATS=== chained load sample (brcd), sending to cats: %s"
862
860
  % argin
863
861
  )
864
862
  self._execute_server_task(self._cmdChainedLoadBarcode, argin)
865
863
  else:
866
- logging.getLogger("HWR").warning(
864
+ self.log.warning(
867
865
  " ==========CATS=== chained load sample, sending to cats: %s"
868
866
  % argin
869
867
  )
870
868
  self._execute_server_task(self._cmdChainedLoad, argin)
871
869
  else:
872
870
  if self.cats_sample_on_diffr() == 1:
873
- logging.getLogger("HWR").warning(
871
+ self.log.warning(
874
872
  " ==========CATS=== trying to load sample, but sample detected on diffr. aborting"
875
873
  )
876
874
  self._update_state() # remove software flags like Loading.
877
875
  elif self.cats_sample_on_diffr() == -1:
878
- logging.getLogger("HWR").warning(
876
+ self.log.warning(
879
877
  " ==========CATS=== trying to load sample, but there is a conflict on loaded sample info. aborting"
880
878
  )
881
879
  self._update_state() # remove software flags like Loading.
882
880
  else:
883
881
  if self.read_datamatrix and self._cmdLoadBarcode is not None:
884
- logging.getLogger("HWR").warning(
882
+ self.log.warning(
885
883
  " ==========CATS=== load sample (bcrd), sending to cats: %s"
886
884
  % argin
887
885
  )
888
886
  self._execute_server_task(self._cmdLoadBarcode, argin)
889
887
  else:
890
- logging.getLogger("HWR").warning(
888
+ self.log.warning(
891
889
  " ==========CATS=== load sample, sending to cats: %s" % argin
892
890
  )
893
891
  self._execute_server_task(self._cmdLoad, argin)
@@ -905,7 +903,7 @@ class Cats90(SampleChanger):
905
903
  )
906
904
 
907
905
  if not self.has_loaded_sample() or not self._chnSampleIsDetected.get_value():
908
- logging.getLogger("HWR").warning(
906
+ self.log.warning(
909
907
  " Trying do unload sample, but it does not seem to be any on diffr: %s"
910
908
  % argin
911
909
  )
@@ -922,7 +920,7 @@ class Cats90(SampleChanger):
922
920
  loaded_num = self._chnNumLoadedSample.get_value()
923
921
 
924
922
  if loaded_lid == -1:
925
- logging.getLogger("HWR").warning(
923
+ self.log.warning(
926
924
  " ==========CATS=== unload sample, no sample mounted detected"
927
925
  )
928
926
  return
@@ -935,14 +933,14 @@ class Cats90(SampleChanger):
935
933
 
936
934
  argin = [str(tool), "0", xshift, yshift, zshift]
937
935
 
938
- logging.getLogger("HWR").warning(
936
+ self.log.warning(
939
937
  " ==========CATS=== unload sample, sending to cats: %s" % argin
940
938
  )
941
939
  self._execute_server_task(self._cmdUnload, argin)
942
940
 
943
941
  def _on_task_failed(self, task, exception):
944
942
  if task in [SampleChangerState.Loading, SampleChangerState.Unloading]:
945
- logging.getLogger("HWR").warning(
943
+ self.log.warning(
946
944
  " ==========CATS=== load/unload operation failed : %s" % exception
947
945
  )
948
946
  self.emit("taskFailed", str(exception))
@@ -975,7 +973,7 @@ class Cats90(SampleChanger):
975
973
  while value in [PyTango.DevState.ALARM, PyTango.DevState.ON]:
976
974
  time.sleep(0.1)
977
975
  trials += 1
978
- logging.getLogger("HWR").warning(
976
+ self.log.warning(
979
977
  "SAMPLE CHANGER could be in transient state. trying again"
980
978
  )
981
979
  value = self._chnState.get_value()
@@ -1017,15 +1015,13 @@ class Cats90(SampleChanger):
1017
1015
  presence[basket_index] = value
1018
1016
 
1019
1017
  if presence != self.basket_presence:
1020
- logging.getLogger("HWR").warning(
1021
- "Basket presence changed. Updating contents"
1022
- )
1018
+ self.log.warning("Basket presence changed. Updating contents")
1023
1019
  self.basket_presence = presence
1024
1020
  self._update_cats_contents()
1025
1021
  self._update_loaded_sample()
1026
1022
 
1027
1023
  def cats_baskets_changed(self, value):
1028
- logging.getLogger("HWR").warning("Baskets changed. %s" % value)
1024
+ self.log.warning("Baskets changed. %s" % value)
1029
1025
  for idx, val in enumerate(value):
1030
1026
  self.basket_presence[idx] = val
1031
1027
  self._update_cats_contents()
@@ -1053,7 +1049,7 @@ class Cats90(SampleChanger):
1053
1049
  return
1054
1050
 
1055
1051
  basketno, sampleno = self.lidsample_to_basketsample(lid_on_tool, sample_on_tool)
1056
- logging.getLogger("HWR").warning(
1052
+ self.log.warning(
1057
1053
  "Barcode %s read. Assigning it to sample %s:%s"
1058
1054
  % (value, basketno, sampleno)
1059
1055
  )
@@ -1090,14 +1086,12 @@ class Cats90(SampleChanger):
1090
1086
  except Exception:
1091
1087
  import traceback
1092
1088
 
1093
- logging.getLogger("HWR").debug(
1094
- "Cats90. exception while executing server task"
1095
- )
1096
- logging.getLogger("HWR").debug(traceback.format_exc())
1089
+ self.log.debug("Cats90. exception while executing server task")
1090
+ self.log.debug(traceback.format_exc())
1097
1091
  task_id = None
1098
1092
 
1099
1093
  waitsafe = kwargs.get("waitsafe", False)
1100
- logging.getLogger("HWR").debug(
1094
+ self.log.debug(
1101
1095
  "Cats90. executing method %s / task_id %s / waiting only for safe status is %s"
1102
1096
  % (str(method), task_id, waitsafe)
1103
1097
  )
@@ -1114,13 +1108,13 @@ class Cats90(SampleChanger):
1114
1108
  while True:
1115
1109
  if waitsafe:
1116
1110
  if self.path_safe():
1117
- logging.getLogger("HWR").debug(
1111
+ self.log.debug(
1118
1112
  "Cats90. server execution polling finished as path is safe"
1119
1113
  )
1120
1114
  break
1121
1115
  else:
1122
1116
  if not self.path_running():
1123
- logging.getLogger("HWR").debug(
1117
+ self.log.debug(
1124
1118
  "Cats90. server execution polling finished as path is not running"
1125
1119
  )
1126
1120
  break
@@ -1180,9 +1174,7 @@ class Cats90(SampleChanger):
1180
1174
  while _state in [PyTango.DevState.ALARM, PyTango.DevState.ON]:
1181
1175
  time.sleep(0.1)
1182
1176
  trials += 1
1183
- logging.getLogger("HWR").warning(
1184
- "SAMPLE CHANGER could be in transient state. trying again"
1185
- )
1177
+ self.log.warning("SAMPLE CHANGER could be in transient state. trying again")
1186
1178
  _state = self._chnState.get_value()
1187
1179
  if trials > 2:
1188
1180
  break
@@ -1211,7 +1203,7 @@ class Cats90(SampleChanger):
1211
1203
  elif has_loaded ^ on_diff:
1212
1204
  # go to Unknown state if a sample is detected on the gonio but not registered in the internal database
1213
1205
  # or registered but not on the gonio anymore
1214
- logging.getLogger("HWR").warning(
1206
+ self.log.warning(
1215
1207
  "SAMPLE CHANGER Unknown 2 (hasLoaded: %s / detected: %s)"
1216
1208
  % (self.has_loaded_sample(), self._chnSampleIsDetected.get_value())
1217
1209
  )
@@ -1325,7 +1317,7 @@ class Cats90(SampleChanger):
1325
1317
  else:
1326
1318
  tool = -1
1327
1319
 
1328
- logging.getLogger("HWR").debug(
1320
+ self.log.debug(
1329
1321
  " finding basket type for %s - is %s / tool is %s"
1330
1322
  % (basketno, basket_type, tool)
1331
1323
  )
@@ -1362,7 +1354,7 @@ class Cats90(SampleChanger):
1362
1354
  self.cats_loaded_lid = loadedSampleLid
1363
1355
  self.cats_loaded_num = loadedSampleNum
1364
1356
 
1365
- logging.getLogger("HWR").info(
1357
+ self.log.info(
1366
1358
  "Updating loaded sample %s:%s" % (loadedSampleLid, loadedSampleNum)
1367
1359
  )
1368
1360
 
@@ -1379,7 +1371,7 @@ class Cats90(SampleChanger):
1379
1371
 
1380
1372
  old_sample = self.get_loaded_sample()
1381
1373
 
1382
- logging.getLogger("HWR").debug(
1374
+ self.log.debug(
1383
1375
  "----- Cats90 -----. Sample has changed. Dealing with it - new_sample = %s / old_sample = %s"
1384
1376
  % (new_sample, old_sample)
1385
1377
  )
@@ -1445,9 +1437,7 @@ class Cats90(SampleChanger):
1445
1437
  self._update_cats_contents()
1446
1438
 
1447
1439
  def _update_cats_contents(self):
1448
- logging.getLogger("HWR").warning(
1449
- "Updating contents %s" % str(self.basket_presence)
1450
- )
1440
+ self.log.warning("Updating contents %s" % str(self.basket_presence))
1451
1441
  for basket_index in range(self.number_of_baskets):
1452
1442
  # get saved presence information from object's internal bookkeeping
1453
1443
  basket = self.get_components()[basket_index]
@@ -371,7 +371,7 @@ class CatsBessy(SampleChanger):
371
371
  Pin.get_sample_address(basket_no, sample_no)
372
372
  )
373
373
  except Exception:
374
- pass
374
+ self.log.exception("")
375
375
  self._set_selected_component(basket)
376
376
  self._set_selected_sample(sample)
377
377
 
@@ -396,7 +396,7 @@ class CatsMaint(HardwareObject):
396
396
  :returns: None
397
397
  :rtype: None
398
398
  """
399
- logging.getLogger("HWR").debug("CatsMaint. doing reset")
399
+ self.log.debug("CatsMaint. doing reset")
400
400
  return
401
401
  self._cmdReset()
402
402
 
@@ -516,7 +516,7 @@ class CatsMaint(HardwareObject):
516
516
  :returns: None
517
517
  :rtype: None
518
518
  """
519
- logging.getLogger("HWR").debug(" running power state command ")
519
+ self.log.debug(" running power state command ")
520
520
  if state:
521
521
  self._cmdPowerOn()
522
522
  else:
@@ -1,4 +1,3 @@
1
- import logging
2
1
  import math
3
2
 
4
3
  import numpy
@@ -38,8 +37,10 @@ class CentringMath(Procedure):
38
37
  "type": axis["type"],
39
38
  "direction": eval(axis["direction"]),
40
39
  "motor_name": axis["motorname"],
41
- "motor_HO": HWR.get_hardware_repository().get_hardware_object(
42
- axis["motorHO"]
40
+ "motor_HO": (
41
+ HWR.get_hardware_repository().get_hardware_object(
42
+ axis["motorHO"]
43
+ )
43
44
  ),
44
45
  }
45
46
 
@@ -80,7 +81,7 @@ class CentringMath(Procedure):
80
81
  def listOfCentringsToScreen(self, list_of_centring_dicts):
81
82
  self.factorize()
82
83
  lst = []
83
- logging.getLogger("HWR").debug(
84
+ self.log.debug(
84
85
  " in listOfCentringToScreen - %s points in list "
85
86
  % len(list_of_centring_dicts)
86
87
  )
@@ -24,8 +24,6 @@ __author__ = "Jan Meyer"
24
24
  __email__ = "jan.meyer@desy.de"
25
25
 
26
26
 
27
- import logging
28
-
29
27
  from mxcubecore.BaseHardwareObjects import HardwareObject
30
28
  from mxcubecore.HardwareObjects.abstract.AbstractMotor import (
31
29
  AbstractMotor,
@@ -54,7 +52,9 @@ class DigitalZoomMotor(AbstractMotor, HardwareObject):
54
52
  try:
55
53
  self.camera = self.get_object_by_role("camera")
56
54
  except KeyError:
57
- logging.getLogger("HWR").warning("DigitalZoomMotor: camera not defined")
55
+ self.log.warning("DigitalZoomMotor: camera not defined")
56
+
57
+ self.log.exception("")
58
58
  return
59
59
  try:
60
60
  self.read_only = not (self.camera.zoom_exists())
@@ -71,7 +71,7 @@ class DigitalZoomMotor(AbstractMotor, HardwareObject):
71
71
  self.update_state(self.STATES.READY)
72
72
  else:
73
73
  self.update_state(self.STATES.OFF)
74
- logging.getLogger("HWR").warning(
74
+ self.log.warning(
75
75
  "DigitalZoomMotor: digital zoom is not supported by camera object"
76
76
  )
77
77
 
@@ -375,6 +375,8 @@ class MjpgStreamVideo(AbstractVideoDevice):
375
375
  host, port, path, query
376
376
  )
377
377
  )
378
+
379
+ self.log.exception("")
378
380
  return None
379
381
  if response.status != 200:
380
382
  self.log.error(
@@ -726,8 +726,8 @@ class P11Collect(AbstractCollect):
726
726
  image_filename (str): Filename of the image to be loaded.
727
727
  image_num (int, optional): Image number to load in ADXV. Defaults to 1.
728
728
  """
729
- logging.getLogger("HWR").info(f"ADXV notify {image_filename}")
730
- logging.getLogger("HWR").info(f"ADXV notify {image_num}")
729
+ self.log.info(f"ADXV notify {image_filename}")
730
+ self.log.info(f"ADXV notify {image_num}")
731
731
  adxv_host = "localhost"
732
732
  adxv_port = 8100
733
733
 
@@ -739,7 +739,7 @@ class P11Collect(AbstractCollect):
739
739
  )
740
740
  adxv_socket.close()
741
741
  except RuntimeWarning:
742
- logging.getLogger("HWR").exception("")
742
+ self.log.exception("")
743
743
  else:
744
744
  pass
745
745
 
@@ -1137,6 +1137,8 @@ class P11Collect(AbstractCollect):
1137
1137
  os.mkdir(path, mode=0o777)
1138
1138
  except RuntimeError:
1139
1139
  self.log.debug("mkdir failed:", str(sys.exc_info()))
1140
+
1141
+ self.log.exception("")
1140
1142
  return False
1141
1143
  else:
1142
1144
  self.log.debug("dir not found:", str(sys.exc_info()))
@@ -1218,7 +1220,7 @@ class P11Collect(AbstractCollect):
1218
1220
 
1219
1221
  auto_directory = xds_directory
1220
1222
 
1221
- logging.getLogger("HWR").info(
1223
+ self.log.info(
1222
1224
  "[COLLECT] Processing input file directories: XDS: %s, AUTO: %s"
1223
1225
  % (xds_directory, auto_directory)
1224
1226
  )
@@ -1234,9 +1236,7 @@ class P11Collect(AbstractCollect):
1234
1236
  try:
1235
1237
  self.create_directories(snapshot_directory)
1236
1238
  except Exception:
1237
- logging.getLogger("HWR").exception(
1238
- "Collection: Error creating snapshot directory"
1239
- )
1239
+ self.log.exception("Collection: Error creating snapshot directory")
1240
1240
 
1241
1241
  number_of_snapshots = self.current_dc_parameters["take_snapshots"]
1242
1242
  logging.getLogger("user_level_log").info(
@@ -246,29 +246,27 @@ class P11EDNACharacterisation(EDNACharacterisation):
246
246
  except AttributeError:
247
247
  import traceback
248
248
 
249
- logging.getLogger("HWR").debug(
250
- "EDNACharacterisation. transmission not saved "
251
- )
252
- logging.getLogger("HWR").debug(traceback.format_exc())
249
+ self.log.debug("EDNACharacterisation. transmission not saved ")
250
+ self.log.debug(traceback.format_exc())
253
251
 
254
252
  try:
255
253
  wavelength = HWR.beamline.energy.get_wavelength()
256
254
  beam.setWavelength(XSDataWavelength(wavelength))
257
255
  except AttributeError:
258
- pass
256
+ self.log.exception("")
259
257
 
260
258
  try:
261
259
  # Flux get_value() subsequently executing measure_flux() to fill in the dictionary
262
260
 
263
261
  beam.setFlux(XSDataFlux(HWR.beamline.flux.get_value()))
264
262
  except AttributeError:
265
- pass
263
+ self.log.exception("")
266
264
 
267
265
  try:
268
266
  min_exp_time = self.collect_obj.detector_hwobj.get_exposure_time_limits()[0]
269
267
  beam.setMinExposureTimePerImage(XSDataTime(min_exp_time))
270
268
  except AttributeError:
271
- pass
269
+ self.log.exception("")
272
270
 
273
271
  try:
274
272
  beamsize = self.collect_obj.beam_info_hwobj.get_beam_size()
@@ -281,7 +279,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
281
279
  )
282
280
  )
283
281
  except AttributeError:
284
- pass
282
+ self.log.exception("")
285
283
 
286
284
  # Optimization parameters
287
285
  diff_plan = edna_input.getDiffractionPlan()
@@ -476,7 +474,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
476
474
  collection_plan = edna_strategy.getCollectionPlan()[0]
477
475
  wedges = collection_plan.getCollectionStrategy().getSubWedge()
478
476
  except Exception:
479
- pass
477
+ self.log.exception("")
480
478
  else:
481
479
  try:
482
480
  resolution = (
@@ -558,7 +556,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
558
556
  goniostat.getRotationAxisStart().getValue()
559
557
  )
560
558
  except AttributeError:
561
- pass
559
+ self.log.exception("")
562
560
  """ GB:
563
561
  try:
564
562
  acquisition_parameters.osc_end = (
@@ -574,7 +572,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
574
572
  goniostat.getOscillationWidth().getValue()
575
573
  )
576
574
  except AttributeError:
577
- pass
575
+ self.log.exception("")
578
576
 
579
577
  try:
580
578
  num_images = int(
@@ -591,26 +589,26 @@ class P11EDNACharacterisation(EDNACharacterisation):
591
589
  acq.path_template.start_num = 1
592
590
 
593
591
  except AttributeError:
594
- pass
592
+ self.log.exception("")
595
593
 
596
594
  try:
597
595
  acquisition_parameters.transmission = (
598
596
  beam.getTransmission().getValue()
599
597
  )
600
598
  except AttributeError:
601
- pass
599
+ self.log.exception("")
602
600
 
603
601
  try:
604
602
  acquisition_parameters.energy = round(
605
603
  (123_984.0 / beam.getWavelength().getValue()) / 10000.0, 4
606
604
  )
607
605
  except AttributeError:
608
- pass
606
+ self.log.exception("")
609
607
 
610
608
  try:
611
609
  acquisition_parameters.exp_time = beam.getExposureTime().getValue()
612
610
  except AttributeError:
613
- pass
611
+ self.log.exception("")
614
612
 
615
613
  dc = qmo.DataCollection([acq], crystal, processing_parameters)
616
614
  data_collections.append(dc)
@@ -652,6 +650,6 @@ class P11EDNACharacterisation(EDNACharacterisation):
652
650
  html_report = html_report.replace("/beamline/p11", "/gpfs")
653
651
 
654
652
  except AttributeError:
655
- pass
653
+ self.log.exception("")
656
654
 
657
655
  return html_report
@@ -48,13 +48,9 @@ class P11ISPyBClient(ProposalISPyBClient):
48
48
  else:
49
49
  self.simulated_prop_code = None
50
50
  self.simulated_prop_number = None
51
- logging.getLogger("HWR").debug(
52
- "PROPOSAL SIMULATED is %s" % self.simulated_proposal
53
- )
54
- logging.getLogger("HWR").debug("PROPOSAL CODE is %s" % self.simulated_prop_code)
55
- logging.getLogger("HWR").debug(
56
- "PROPOSAL NUMBER is %s" % self.simulated_prop_number
57
- )
51
+ self.log.debug("PROPOSAL SIMULATED is %s" % self.simulated_proposal)
52
+ self.log.debug("PROPOSAL CODE is %s" % self.simulated_prop_code)
53
+ self.log.debug("PROPOSAL NUMBER is %s" % self.simulated_prop_number)
58
54
 
59
55
  def update_data_collection(self, mx_collection, wait=False):
60
56
  mx_collection["beamline_name"] = "P11"
@@ -106,7 +102,7 @@ class P11ISPyBClient(ProposalISPyBClient):
106
102
  logging.debug("P11 ISPyBClient - %s is %s " % (prop, ispyb_path))
107
103
  mx_collect_dict[prop] = ispyb_path
108
104
  except RuntimeWarning("Can not get ISPyB path for %s" % prop):
109
- pass
105
+ self.log.exception("")
110
106
 
111
107
  def prepare_image_for_lims(self, image_dict):
112
108
  for prop in ["jpegThumbnailFileFullPath", "jpegFileFullPath"]:
@@ -115,10 +111,10 @@ class P11ISPyBClient(ProposalISPyBClient):
115
111
  ispyb_path = HWR.beamline.session.path_to_ispyb(path)
116
112
  image_dict[prop] = ispyb_path
117
113
  except RuntimeWarning("Can not prepare image path fir LIMS for %s" % prop):
118
- pass
114
+ self.log.exception("")
119
115
 
120
116
  def get_proposal(self, proposal_code, proposal_number):
121
- logging.getLogger("HWR").debug(
117
+ self.log.debug(
122
118
  "ISPyB. Obtaining proposal for code=%s / prop_number=%s"
123
119
  % (proposal_code, proposal_number)
124
120
  )
@@ -327,7 +327,7 @@ class P11NanoDiff(GenericDiffractometer):
327
327
  self.emit_centring_moving()
328
328
 
329
329
  try:
330
- logging.getLogger("HWR").debug(
330
+ self.log.debug(
331
331
  "Centring finished. Moving motors to position %s" % str(motor_pos)
332
332
  )
333
333
  self.move_to_motors_positions(motor_pos, wait=True)
@@ -339,9 +339,9 @@ class P11NanoDiff(GenericDiffractometer):
339
339
  # centred positions include omega to initial position
340
340
  pass
341
341
  # if not self.in_plate_mode():
342
- # logging.getLogger("HWR").debug("Centring finished. Moving omega back to initial position")
342
+ # self.log.debug("Centring finished. Moving omega back to initial position")
343
343
  # self.motor_hwobj_dict['phi'].set_value_relative(-180, timeout=None)
344
- # logging.getLogger("HWR").debug(" Moving omega done")
344
+ # self.log.debug(" Moving omega done")
345
345
 
346
346
  if (
347
347
  self.current_centring_method
@@ -429,7 +429,7 @@ class P11NanoDiff(GenericDiffractometer):
429
429
  vertical_discplacements.append(y)
430
430
  horizontal_displacements.append(x)
431
431
 
432
- logging.getLogger("HWR").info("click %d %f %f %f" % (k + 1, omega, x, y))
432
+ self.log.info("click %d %f %f %f" % (k + 1, omega, x, y))
433
433
 
434
434
  dev_gonio = DeviceProxy("p11/servomotor/eh.1.01")
435
435
  if k <= n_clicks:
@@ -1473,6 +1473,8 @@ class P11NanoDiff(GenericDiffractometer):
1473
1473
  self.log.rror(
1474
1474
  "motor_positions is not a dict and cannot be converted using as_dict()"
1475
1475
  )
1476
+
1477
+ self.log.exception("")
1476
1478
  return
1477
1479
 
1478
1480
  # Move translation motors
@@ -17,7 +17,6 @@
17
17
  # You should have received a copy of the GNU Lesser General Public License
18
18
  # along with MXCuBE. If not, see <http://www.gnu.org/licenses/>.
19
19
  import json
20
- import logging
21
20
  from enum import (
22
21
  Enum,
23
22
  unique,
@@ -164,10 +163,10 @@ class DataPublisher(HardwareObject):
164
163
  )
165
164
  else:
166
165
  msg = "Unknown frame type %s" % message
167
- logging.getLogger("HWR").error(msg)
166
+ self.log.error(msg)
168
167
  except Exception:
169
168
  msg = "Could not parse data in %s" % message
170
- logging.getLogger("HWR").exception(msg)
169
+ self.log.exception(msg)
171
170
 
172
171
  def _remove_available(self, _id):
173
172
  """
@@ -142,10 +142,8 @@ class EDNACharacterisation(AbstractCharacterisation):
142
142
  except AttributeError:
143
143
  import traceback
144
144
 
145
- logging.getLogger("HWR").debug(
146
- "EDNACharacterisation. transmission not saved "
147
- )
148
- logging.getLogger("HWR").debug(traceback.format_exc())
145
+ self.log.debug("EDNACharacterisation. transmission not saved ")
146
+ self.log.debug(traceback.format_exc())
149
147
 
150
148
  try:
151
149
  wavelength = HWR.beamline.energy.get_wavelength()
@@ -65,13 +65,13 @@ class EMBLBeam(AbstractBeam):
65
65
  self.aperture_diameter_changed,
66
66
  )
67
67
  else:
68
- logging.getLogger("HWR").debug("BeamInfo: Aperture hwobj not defined")
68
+ self.log.debug("BeamInfo: Aperture hwobj not defined")
69
69
 
70
70
  self._slits = self.get_object_by_role("slits")
71
71
  if self._slits is not None:
72
72
  self.connect(self._slits, "valueChanged", self.slits_gap_changed)
73
73
  else:
74
- logging.getLogger("HWR").debug("BeamInfo: Slits hwobj not defined")
74
+ self.log.debug("BeamInfo: Slits hwobj not defined")
75
75
 
76
76
  self._definer = self.get_object_by_role("beam_focusing")
77
77
  if self._definer is not None:
@@ -85,7 +85,7 @@ class EMBLBeam(AbstractBeam):
85
85
  self.focusing_mode_changed,
86
86
  )
87
87
  else:
88
- logging.getLogger("HWR").debug("BeamInfo: Beam focusing hwobj not defined")
88
+ self.log.debug("BeamInfo: Beam focusing hwobj not defined")
89
89
 
90
90
  self.chan_beam_position_hor = self.get_channel_object("BeamPositionHorizontal")
91
91
  if self.chan_beam_position_hor: