mxcubecore 1.393.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.
- mxcubecore/HardwareObjects/ALBA/ALBAAutoProcessing.py +4 -7
- mxcubecore/HardwareObjects/ALBA/ALBABackLight.py +6 -7
- mxcubecore/HardwareObjects/ALBA/ALBABeamInfo.py +2 -4
- mxcubecore/HardwareObjects/ALBA/ALBACats.py +19 -25
- mxcubecore/HardwareObjects/ALBA/ALBAClusterJob.py +10 -11
- mxcubecore/HardwareObjects/ALBA/ALBACollect.py +49 -71
- mxcubecore/HardwareObjects/ALBA/ALBADataAnalysis.py +26 -31
- mxcubecore/HardwareObjects/ALBA/ALBAEnergy.py +1 -5
- mxcubecore/HardwareObjects/ALBA/ALBAEpsActuator.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAFastShutter.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAFlux.py +2 -6
- mxcubecore/HardwareObjects/ALBA/ALBAFrontLight.py +5 -9
- mxcubecore/HardwareObjects/ALBA/ALBAISPyBClient.py +4 -4
- mxcubecore/HardwareObjects/ALBA/ALBAMiniDiff.py +20 -27
- mxcubecore/HardwareObjects/ALBA/ALBAPilatus.py +12 -15
- mxcubecore/HardwareObjects/ALBA/ALBASession.py +1 -4
- mxcubecore/HardwareObjects/ALBA/ALBAZoomMotor.py +10 -14
- mxcubecore/HardwareObjects/ALBA/ALBAZoomMotorAutoBrightness.py +7 -11
- mxcubecore/HardwareObjects/ALBA/XalocMiniDiff.py +7 -8
- mxcubecore/HardwareObjects/BeamInfo.py +4 -6
- mxcubecore/HardwareObjects/Beamline.py +6 -7
- mxcubecore/HardwareObjects/BeamlineActions.py +3 -7
- mxcubecore/HardwareObjects/BlissHutchTrigger.py +2 -4
- mxcubecore/HardwareObjects/BlissMotorWPositions.py +4 -7
- mxcubecore/HardwareObjects/Cats90.py +33 -43
- mxcubecore/HardwareObjects/CatsBessy.py +1 -2
- mxcubecore/HardwareObjects/CatsMaint.py +2 -2
- mxcubecore/HardwareObjects/CentringMath.py +5 -4
- mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +3 -5
- mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +1 -3
- mxcubecore/HardwareObjects/DESY/P11Collect.py +6 -8
- mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +14 -16
- mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +6 -10
- mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +5 -5
- mxcubecore/HardwareObjects/DataPublisher.py +2 -3
- mxcubecore/HardwareObjects/EDNACharacterisation.py +2 -4
- mxcubecore/HardwareObjects/EMBL/EMBLBeam.py +3 -3
- mxcubecore/HardwareObjects/EMBL/EMBLBeamCentering.py +2 -4
- mxcubecore/HardwareObjects/EMBL/EMBLBeamFocusing.py +3 -3
- mxcubecore/HardwareObjects/EMBL/EMBLDoorInterlock.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLEnergy.py +10 -18
- mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +9 -13
- mxcubecore/HardwareObjects/EMBL/EMBLFlux.py +10 -12
- mxcubecore/HardwareObjects/EMBL/EMBLMachineInfo.py +2 -2
- mxcubecore/HardwareObjects/EMBL/EMBLMiniDiff.py +18 -18
- mxcubecore/HardwareObjects/EMBL/EMBLMotorsGroup.py +6 -9
- mxcubecore/HardwareObjects/EMBL/EMBLOnlineProcessing.py +6 -6
- mxcubecore/HardwareObjects/EMBL/EMBLPPUControl.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLSSXChip.py +1 -4
- mxcubecore/HardwareObjects/EMBL/EMBLSlitBox.py +1 -3
- mxcubecore/HardwareObjects/EMBL/EMBLTableMotor.py +2 -3
- mxcubecore/HardwareObjects/EMBL/EMBLXRFSpectrum.py +4 -4
- mxcubecore/HardwareObjects/EMBL/EMBLXrayImaging.py +1 -1
- mxcubecore/HardwareObjects/EMBL/TINEMotor.py +2 -4
- mxcubecore/HardwareObjects/EMBLFlexHCD.py +5 -5
- mxcubecore/HardwareObjects/EMBLFlexHarvester.py +2 -2
- mxcubecore/HardwareObjects/ESRF/ESRFBeam.py +3 -5
- mxcubecore/HardwareObjects/ESRF/ESRFBeamInfo.py +1 -5
- mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py +2 -3
- mxcubecore/HardwareObjects/ESRF/ESRFEnergyScan.py +3 -3
- mxcubecore/HardwareObjects/ESRF/ESRFMultiCollect.py +7 -7
- mxcubecore/HardwareObjects/ESRF/ESRFPhotonFlux.py +2 -8
- mxcubecore/HardwareObjects/ESRF/ESRFSC3.py +11 -18
- mxcubecore/HardwareObjects/ESRF/ID29HutchTrigger.py +2 -4
- mxcubecore/HardwareObjects/ESRF/MD2MultiCollect.py +4 -4
- mxcubecore/HardwareObjects/ESRF/SSXICATLIMS.py +9 -6
- mxcubecore/HardwareObjects/EdnaWorkflow.py +9 -11
- mxcubecore/HardwareObjects/Energy.py +11 -15
- mxcubecore/HardwareObjects/ExporterMotor.py +1 -2
- mxcubecore/HardwareObjects/FlexHCD.py +7 -8
- mxcubecore/HardwareObjects/FlexHCDMaintenance.py +1 -2
- mxcubecore/HardwareObjects/GenericDiffractometer.py +26 -46
- mxcubecore/HardwareObjects/Gphl/CollectEmulator.py +6 -7
- mxcubecore/HardwareObjects/Gphl/GphlQueueEntry.py +2 -2
- mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py +29 -43
- mxcubecore/HardwareObjects/Gphl/GphlWorkflowConnection.py +25 -35
- mxcubecore/HardwareObjects/ICATLIMS.py +17 -13
- mxcubecore/HardwareObjects/LNLS/EPICSMotor.py +1 -4
- mxcubecore/HardwareObjects/LNLS/LNLSAperture.py +2 -5
- mxcubecore/HardwareObjects/LNLS/LNLSCamera.py +14 -16
- mxcubecore/HardwareObjects/LNLS/LNLSCollect.py +20 -30
- mxcubecore/HardwareObjects/LNLS/LNLSDetDistMotor.py +7 -11
- mxcubecore/HardwareObjects/LNLS/LNLSEnergy.py +4 -6
- mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +49 -57
- mxcubecore/HardwareObjects/LNLS/LNLSTransmission.py +4 -7
- mxcubecore/HardwareObjects/LdapAuthenticator.py +11 -15
- mxcubecore/HardwareObjects/Lima2Detector.py +1 -1
- mxcubecore/HardwareObjects/LimaEigerDetector.py +1 -1
- mxcubecore/HardwareObjects/LimaPilatusDetector.py +1 -4
- mxcubecore/HardwareObjects/MAXIV/MAXIVAutoProcessing.py +3 -5
- mxcubecore/HardwareObjects/MD3UP.py +1 -2
- mxcubecore/HardwareObjects/MachCurrent.py +5 -5
- mxcubecore/HardwareObjects/Marvin.py +23 -35
- mxcubecore/HardwareObjects/Microdiff.py +6 -8
- mxcubecore/HardwareObjects/MicrodiffActuator.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffBeamstop.py +1 -3
- mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffKappaMotor.py +3 -4
- mxcubecore/HardwareObjects/MiniDiff.py +35 -57
- mxcubecore/HardwareObjects/MotorWPositions.py +3 -3
- mxcubecore/HardwareObjects/PlateManipulator.py +2 -2
- mxcubecore/HardwareObjects/ProposalTypeISPyBLims.py +8 -16
- mxcubecore/HardwareObjects/PyISPyBClient.py +8 -5
- mxcubecore/HardwareObjects/QtGraphicsLib.py +2 -2
- mxcubecore/HardwareObjects/QtGraphicsManager.py +13 -19
- mxcubecore/HardwareObjects/QtInstanceServer.py +27 -55
- mxcubecore/HardwareObjects/QtLimaVideo.py +1 -5
- mxcubecore/HardwareObjects/QueueManager.py +7 -9
- mxcubecore/HardwareObjects/QueueModel.py +6 -8
- mxcubecore/HardwareObjects/RedisClient.py +12 -16
- mxcubecore/HardwareObjects/SC3.py +1 -2
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Attenuator.py +1 -3
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1BeamInfo.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1CatsMaint.py +3 -4
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Collect.py +11 -11
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Cryotong.py +8 -18
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Energy.py +6 -7
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1EnergyScan.py +21 -31
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Environment.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1MiniDiff.py +11 -21
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pilatus.py +9 -9
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pss.py +1 -2
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Resolution.py +1 -5
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1TangoLight.py +3 -8
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Attenuator.py +9 -13
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Collect.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Diffractometer.py +22 -22
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Energy.py +4 -6
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Guillotine.py +2 -2
- mxcubecore/HardwareObjects/SOLEIL/SOLEILCatsMaint.py +6 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILEnergyScan.py +44 -56
- mxcubecore/HardwareObjects/SOLEIL/SOLEILGuillotine.py +2 -2
- mxcubecore/HardwareObjects/SOLEIL/SOLEILISPyBClient.py +10 -10
- mxcubecore/HardwareObjects/SOLEIL/SOLEILMachineInfo.py +4 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILPss.py +3 -4
- mxcubecore/HardwareObjects/SOLEIL/SOLEILRuche.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/TangoDCMotor.py +10 -16
- mxcubecore/HardwareObjects/SardanaMotor.py +4 -5
- mxcubecore/HardwareObjects/Session.py +1 -2
- mxcubecore/HardwareObjects/SpecMotorWPositions.py +5 -9
- mxcubecore/HardwareObjects/SpecMotorWSpecPositions.py +2 -4
- mxcubecore/HardwareObjects/SpecShell.py +7 -9
- mxcubecore/HardwareObjects/SpecState.py +5 -7
- mxcubecore/HardwareObjects/StateMachine.py +9 -10
- mxcubecore/HardwareObjects/TangoLimaMpegVideo.py +2 -3
- mxcubecore/HardwareObjects/TangoLimaVideo.py +3 -4
- mxcubecore/HardwareObjects/TangoMachineInfo.py +1 -3
- mxcubecore/HardwareObjects/TangoMotor.py +1 -3
- mxcubecore/HardwareObjects/UserTypeISPyBLims.py +7 -9
- mxcubecore/HardwareObjects/XMLRPCServer.py +19 -21
- mxcubecore/HardwareObjects/abstract/AbstractAperture.py +6 -11
- mxcubecore/HardwareObjects/abstract/AbstractCollect.py +6 -16
- mxcubecore/HardwareObjects/abstract/AbstractDetector.py +2 -7
- mxcubecore/HardwareObjects/abstract/AbstractEnergyScan.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractLims.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractNState.py +1 -2
- mxcubecore/HardwareObjects/abstract/AbstractProcedure.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +4 -4
- mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +1 -1
- mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +11 -13
- mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +11 -14
- mxcubecore/HardwareObjects/mockup/EnergyScanMockup.py +10 -11
- mxcubecore/HardwareObjects/mockup/ISPyBClientMockup.py +6 -6
- mxcubecore/HardwareObjects/mockup/ISPyBRestClientMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/LimaDetectorMockup.py +1 -2
- mxcubecore/HardwareObjects/mockup/MDCameraMockup.py +5 -6
- mxcubecore/HardwareObjects/mockup/MicrodiffInOutMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/MultiCollectMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/ShapeHistoryMockup.py +1 -2
- mxcubecore/HardwareObjects/mockup/XRFMockup.py +3 -6
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/RECORD +176 -176
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/WHEEL +0 -0
|
@@ -184,7 +184,7 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
184
184
|
self.beam_position = value
|
|
185
185
|
|
|
186
186
|
def state_changed(self, state):
|
|
187
|
-
#
|
|
187
|
+
# self.log.debug("State changed: %s" % str(state))
|
|
188
188
|
self.current_state = state
|
|
189
189
|
self.emit("minidiffStateChanged", (self.current_state))
|
|
190
190
|
self.emit("minidiffStatusChanged", (self.current_state))
|
|
@@ -308,7 +308,7 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
308
308
|
in (GenericDiffractometer.PHASE_TRANSFER, GenericDiffractometer.PHASE_BEAM)
|
|
309
309
|
):
|
|
310
310
|
detector_distance = HWR.beamline.detector.distance.get_value()
|
|
311
|
-
|
|
311
|
+
self.log.debug(
|
|
312
312
|
"Diffractometer current phase: %s " % self.current_phase
|
|
313
313
|
+ "selected phase: %s" % phase
|
|
314
314
|
+ "detector distance: %d mm" % detector_distance
|
|
@@ -330,7 +330,7 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
330
330
|
self.wait_device_ready(30)
|
|
331
331
|
_howlong = time.time() - _start
|
|
332
332
|
if _howlong > 11.0:
|
|
333
|
-
|
|
333
|
+
self.log.error(
|
|
334
334
|
"Changing phase to %s took %.1f seconds" % (phase, _howlong)
|
|
335
335
|
)
|
|
336
336
|
else:
|
|
@@ -375,7 +375,7 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
375
375
|
if self.current_phase != "BeamLocation":
|
|
376
376
|
GenericDiffractometer.move_to_beam(self, x, y, omega)
|
|
377
377
|
else:
|
|
378
|
-
|
|
378
|
+
self.log.debug(
|
|
379
379
|
"Diffractometer: Move to screen"
|
|
380
380
|
+ " position disabled in BeamLocation phase."
|
|
381
381
|
)
|
|
@@ -519,13 +519,17 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
519
519
|
self.motor_hwobj_dict["sampx"]: centred_position.sampx,
|
|
520
520
|
self.motor_hwobj_dict["sampy"]: centred_position.sampy,
|
|
521
521
|
self.motor_hwobj_dict["phi"]: centred_position.phi,
|
|
522
|
-
self.motor_hwobj_dict["phiy"]:
|
|
523
|
-
|
|
524
|
-
self.
|
|
522
|
+
self.motor_hwobj_dict["phiy"]: (
|
|
523
|
+
centred_position.phiy
|
|
524
|
+
+ self.centring_hwobj.camera2alignmentMotor(
|
|
525
|
+
self.motor_hwobj_dict["phiy"], {"X": dx, "Y": dy}
|
|
526
|
+
)
|
|
525
527
|
),
|
|
526
|
-
self.motor_hwobj_dict["phiz"]:
|
|
527
|
-
|
|
528
|
-
self.
|
|
528
|
+
self.motor_hwobj_dict["phiz"]: (
|
|
529
|
+
centred_position.phiz
|
|
530
|
+
+ self.centring_hwobj.camera2alignmentMotor(
|
|
531
|
+
self.motor_hwobj_dict["phiz"], {"X": dx, "Y": dy}
|
|
532
|
+
)
|
|
529
533
|
),
|
|
530
534
|
self.motor_hwobj_dict["kappa"]: centred_position.kappa,
|
|
531
535
|
self.motor_hwobj_dict["kappa_phi"]: centred_position.kappa_phi,
|
|
@@ -534,9 +538,7 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
534
538
|
except BaseException:
|
|
535
539
|
logging.exception("Could not move to centred position")
|
|
536
540
|
else:
|
|
537
|
-
|
|
538
|
-
"Move to centred position disabled in BeamLocation phase."
|
|
539
|
-
)
|
|
541
|
+
self.log.debug("Move to centred position disabled in BeamLocation phase.")
|
|
540
542
|
|
|
541
543
|
def move_kappa_and_phi(self, kappa=None, kappa_phi=None, wait=False):
|
|
542
544
|
return gevent.spawn(self.move_kappa_and_phi_procedure, kappa, kappa_phi)
|
|
@@ -600,9 +602,7 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
600
602
|
|
|
601
603
|
def visual_align(self, point_1, point_2):
|
|
602
604
|
if self.in_plate_mode():
|
|
603
|
-
|
|
604
|
-
"EMBLMiniDiff: Visual align not available in Plate mode"
|
|
605
|
-
)
|
|
605
|
+
self.log.info("EMBLMiniDiff: Visual align not available in Plate mode")
|
|
606
606
|
else:
|
|
607
607
|
t1 = [point_1.sampx, point_1.sampy, point_1.phiy]
|
|
608
608
|
t2 = [point_2.sampx, point_2.sampy, point_2.phiy]
|
|
@@ -656,12 +656,12 @@ class EMBLMiniDiff(GenericDiffractometer):
|
|
|
656
656
|
|
|
657
657
|
def close_kappa_task(self):
|
|
658
658
|
"""Close kappa task"""
|
|
659
|
-
|
|
659
|
+
self.log.debug("Diffractometer: Closing Kappa started...")
|
|
660
660
|
self.move_kappa_and_phi_procedure(0, 270)
|
|
661
661
|
self.wait_device_ready(180)
|
|
662
662
|
self.motor_hwobj_dict["kappa"].home()
|
|
663
663
|
self.wait_device_ready(60)
|
|
664
|
-
|
|
664
|
+
self.log.debug("Diffractometer: Done Closing Kappa")
|
|
665
665
|
|
|
666
666
|
def set_zoom(self, position):
|
|
667
667
|
self.zoom_motor_hwobj.move_to_position(position)
|
|
@@ -75,7 +75,6 @@ Example Hardware Object XML file :
|
|
|
75
75
|
</object>
|
|
76
76
|
"""
|
|
77
77
|
|
|
78
|
-
import logging
|
|
79
78
|
import time
|
|
80
79
|
|
|
81
80
|
import gevent
|
|
@@ -147,7 +146,7 @@ class EMBLMotorsGroup(HardwareObject):
|
|
|
147
146
|
self.group_address,
|
|
148
147
|
self.positionAddr,
|
|
149
148
|
)
|
|
150
|
-
|
|
149
|
+
self.log.error(msg)
|
|
151
150
|
|
|
152
151
|
try:
|
|
153
152
|
self.chan_status = self.add_channel(
|
|
@@ -166,7 +165,7 @@ class EMBLMotorsGroup(HardwareObject):
|
|
|
166
165
|
self.group_address,
|
|
167
166
|
self.statusAddr,
|
|
168
167
|
)
|
|
169
|
-
|
|
168
|
+
self.log.error(msg)
|
|
170
169
|
|
|
171
170
|
def get_motors_dict(self):
|
|
172
171
|
"""Returns dict with motors"""
|
|
@@ -188,16 +187,14 @@ class EMBLMotorsGroup(HardwareObject):
|
|
|
188
187
|
motor["setCmd"],
|
|
189
188
|
new_position,
|
|
190
189
|
)
|
|
191
|
-
|
|
190
|
+
self.log.debug(
|
|
192
191
|
"EMBLMotorsGroup: send %s : %.4f"
|
|
193
192
|
% (motor["motorAddr"], new_position)
|
|
194
193
|
)
|
|
195
194
|
time.sleep(0.2)
|
|
196
195
|
self.wait_motor_ready(motor_name, timeout=10)
|
|
197
196
|
time.sleep(1)
|
|
198
|
-
|
|
199
|
-
"EMBLMotorsGroup: motor %s ready" % motor["motorAddr"]
|
|
200
|
-
)
|
|
197
|
+
self.log.debug("EMBLMotorsGroup: motor %s ready" % motor["motorAddr"])
|
|
201
198
|
break
|
|
202
199
|
|
|
203
200
|
def set_motor_focus_mode(self, motor_name, focus_mode):
|
|
@@ -248,14 +245,14 @@ class EMBLMotorsGroup(HardwareObject):
|
|
|
248
245
|
motor["setCmd"],
|
|
249
246
|
motor["focusingModes"][str(focus_mode)],
|
|
250
247
|
)
|
|
251
|
-
|
|
248
|
+
self.log.debug(
|
|
252
249
|
"EMBLMotorsGroup: send %s : %.4f"
|
|
253
250
|
% (motor["motorAddr"], motor["focusingModes"][str(focus_mode)])
|
|
254
251
|
)
|
|
255
252
|
if motor["motorName"] in ("In", "Out", "Top", "But"):
|
|
256
253
|
self.wait_motor_ready(motor["motorName"], timeout=10)
|
|
257
254
|
time.sleep(1.1)
|
|
258
|
-
|
|
255
|
+
self.log.debug(
|
|
259
256
|
"EMBLMotorsGroup: motor %s ready" % motor["motorAddr"]
|
|
260
257
|
)
|
|
261
258
|
|
|
@@ -436,13 +436,13 @@ class EMBLOnlineProcessing(AbstractOnlineProcessing):
|
|
|
436
436
|
|
|
437
437
|
if len(batch) >= self.params_dict["images_num"]:
|
|
438
438
|
self.all_frames_batch_processed = True
|
|
439
|
-
|
|
439
|
+
self.log.info(
|
|
440
440
|
"All dozor scores %s of %s"
|
|
441
441
|
% (len(batch), self.params_dict["images_num"])
|
|
442
442
|
)
|
|
443
443
|
self.finish_processing()
|
|
444
444
|
else:
|
|
445
|
-
|
|
445
|
+
self.log.info(
|
|
446
446
|
"Dozor scores %s of %s %s"
|
|
447
447
|
% (len(batch), self.params_dict["images_num"], self.batch_count)
|
|
448
448
|
)
|
|
@@ -485,20 +485,20 @@ class EMBLOnlineProcessing(AbstractOnlineProcessing):
|
|
|
485
485
|
|
|
486
486
|
if len(is_values) >= self.params_dict["images_num"]:
|
|
487
487
|
self.all_frames_dozor_is = True
|
|
488
|
-
|
|
488
|
+
self.log.info(
|
|
489
489
|
"All ISs %s of %s"
|
|
490
490
|
% (len(is_values), self.params_dict["images_num"])
|
|
491
491
|
)
|
|
492
492
|
self.finish_processing()
|
|
493
493
|
else:
|
|
494
|
-
|
|
494
|
+
self.log.info(
|
|
495
495
|
"IS values %s of %s %s"
|
|
496
496
|
% (len(is_values), self.params_dict["images_num"], self.is_count)
|
|
497
497
|
)
|
|
498
498
|
|
|
499
499
|
def finish_processing(self):
|
|
500
500
|
if self.all_frames_dozor_is and self.all_frames_batch_processed:
|
|
501
|
-
|
|
501
|
+
self.log.info("Processing finished")
|
|
502
502
|
self.set_processing_status("Success")
|
|
503
503
|
self.all_frames_dozor_is = False
|
|
504
504
|
self.all_frames_batch_processed = False
|
|
@@ -558,7 +558,7 @@ class EMBLOnlineProcessing(AbstractOnlineProcessing):
|
|
|
558
558
|
)
|
|
559
559
|
dozor_result.addImageDozor(dozor_image)
|
|
560
560
|
dozor_result.exportToFile(processing_xml_filename)
|
|
561
|
-
|
|
561
|
+
self.log.info(
|
|
562
562
|
"Online processing: Results saved in %s" % processing_xml_filename
|
|
563
563
|
)
|
|
564
564
|
|
|
@@ -132,7 +132,7 @@ class EMBLPPUControl(HardwareObject):
|
|
|
132
132
|
logging.getLogger("GUI").error(msg)
|
|
133
133
|
else:
|
|
134
134
|
msg = "PPUControl: %s" % self.all_status
|
|
135
|
-
|
|
135
|
+
self.log.debug(msg)
|
|
136
136
|
|
|
137
137
|
self.msg = (
|
|
138
138
|
"Restart result:\n\n%s\n\n" % self.restart_result
|
|
@@ -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
|
|
|
20
|
-
import logging
|
|
21
20
|
|
|
22
21
|
from mxcubecore.HardwareObjects import QtGraphicsLib as GraphicsLib
|
|
23
22
|
from mxcubecore.HardwareObjects.QtGraphicsManager import QtGraphicsManager
|
|
@@ -110,9 +109,7 @@ class EMBLSSXChip(QtGraphicsManager):
|
|
|
110
109
|
if item_name in self.chip_config_list[self.current_chip_index]:
|
|
111
110
|
self.chip_config_list[self.current_chip_index][item_name] = item_value
|
|
112
111
|
else:
|
|
113
|
-
|
|
114
|
-
"Item %s not found in the config dict" % item_name
|
|
115
|
-
)
|
|
112
|
+
self.log.warning("Item %s not found in the config dict" % item_name)
|
|
116
113
|
|
|
117
114
|
def get_dg_channels_list(self):
|
|
118
115
|
return self.dg_channels_list
|
|
@@ -68,8 +68,6 @@ Example Hardware Object XML file :
|
|
|
68
68
|
</object>
|
|
69
69
|
"""
|
|
70
70
|
|
|
71
|
-
import logging
|
|
72
|
-
|
|
73
71
|
from mxcubecore.HardwareObjects.abstract.AbstractSlits import AbstractSlits
|
|
74
72
|
|
|
75
73
|
__credits__ = ["EMBL Hamburg"]
|
|
@@ -154,7 +152,7 @@ class EMBLSlitBox(AbstractSlits):
|
|
|
154
152
|
)
|
|
155
153
|
self.beam_focus_hwobj.re_emit_values()
|
|
156
154
|
else:
|
|
157
|
-
|
|
155
|
+
self.log.debug("EMBLSlitBox: beamFocus HO not defined")
|
|
158
156
|
|
|
159
157
|
def get_step_sizes(self):
|
|
160
158
|
"""Returns Hor and Ver step sizes (list of two values)"""
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"""EMBLTableMotor"""
|
|
21
21
|
|
|
22
22
|
import atexit
|
|
23
|
-
import logging
|
|
24
23
|
import socket
|
|
25
24
|
import time
|
|
26
25
|
|
|
@@ -112,6 +111,6 @@ class EMBLTableMotor(AbstractMotor):
|
|
|
112
111
|
"""
|
|
113
112
|
try:
|
|
114
113
|
self.socket.close()
|
|
115
|
-
|
|
114
|
+
self.log.info("EMBLTableMotor: Socket closed")
|
|
116
115
|
except Exception:
|
|
117
|
-
|
|
116
|
+
self.log.error("EMBLTableMotor: Failed to close the socket")
|
|
@@ -86,20 +86,20 @@ class EMBLXRFSpectrum(AbstractXRFSpectrum):
|
|
|
86
86
|
"""Controls execution"""
|
|
87
87
|
if self.spectrum_running:
|
|
88
88
|
if status == "scaning":
|
|
89
|
-
|
|
89
|
+
self.log.info("XRF spectrum in progress...")
|
|
90
90
|
elif status == "ready":
|
|
91
91
|
if self.spectrum_running:
|
|
92
92
|
self.spectrum_data = list(self.cmd_spectrum_start.get())
|
|
93
93
|
# self.mca_calib = self.chan_spectrum_consts.get_value()[::-1]
|
|
94
94
|
self.spectrum_command_finished()
|
|
95
|
-
|
|
95
|
+
self.log.info("XRF spectrum finished")
|
|
96
96
|
elif status == "aborting":
|
|
97
97
|
if self.spectrum_running:
|
|
98
98
|
self.spectrum_command_aborted()
|
|
99
|
-
|
|
99
|
+
self.log.info("XRF spectrum aborted!")
|
|
100
100
|
elif status == "error":
|
|
101
101
|
self.spectrum_command_failed()
|
|
102
|
-
|
|
102
|
+
self.log.error("XRF spectrum failed!")
|
|
103
103
|
|
|
104
104
|
def cancel_spectrum(self, *args):
|
|
105
105
|
"""Cancels acquisition"""
|
|
@@ -905,7 +905,7 @@ class EMBLXrayImaging(QtGraphicsManager, AbstractCollect):
|
|
|
905
905
|
if relative_angle:
|
|
906
906
|
if index >= abs(self.image_count / 360.0 * relative_angle):
|
|
907
907
|
break
|
|
908
|
-
|
|
908
|
+
self.log.debug("display: " + str(self.current_image_index))
|
|
909
909
|
self.display_image(self.current_image_index)
|
|
910
910
|
self.current_image_index += direction * step
|
|
911
911
|
if self.repeat_image_play and self.current_image_index >= self.image_count:
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
"""TINEMotor class defines motor in the TINE control system"""
|
|
21
21
|
|
|
22
|
-
import logging
|
|
23
|
-
|
|
24
22
|
import gevent
|
|
25
23
|
|
|
26
24
|
from mxcubecore.BaseHardwareObjects import HardwareObjectState
|
|
@@ -65,7 +63,7 @@ class TINEMotor(AbstractMotor):
|
|
|
65
63
|
if self.get_property("default_limits"):
|
|
66
64
|
self.update_limits(eval(self.get_property("default_limits")))
|
|
67
65
|
except Exception:
|
|
68
|
-
|
|
66
|
+
self.log.exception("")
|
|
69
67
|
|
|
70
68
|
self.chan_position = self.get_channel_object("axisPosition")
|
|
71
69
|
if self.chan_position is not None:
|
|
@@ -94,7 +92,7 @@ class TINEMotor(AbstractMotor):
|
|
|
94
92
|
try:
|
|
95
93
|
self.step_limits = eval(self.get_property("stepLimits"))
|
|
96
94
|
except Exception:
|
|
97
|
-
|
|
95
|
+
self.log.exception("")
|
|
98
96
|
|
|
99
97
|
def connected(self):
|
|
100
98
|
"""
|
|
@@ -422,7 +422,7 @@ class EMBLFlexHCD(SampleChanger):
|
|
|
422
422
|
finally:
|
|
423
423
|
for msg in self.get_robot_exceptions():
|
|
424
424
|
if msg is not None:
|
|
425
|
-
|
|
425
|
+
self.log.error(msg)
|
|
426
426
|
|
|
427
427
|
# if res:
|
|
428
428
|
# self.prepare_centring()
|
|
@@ -458,7 +458,7 @@ class EMBLFlexHCD(SampleChanger):
|
|
|
458
458
|
finally:
|
|
459
459
|
for msg in self.get_robot_exceptions():
|
|
460
460
|
if msg is not None:
|
|
461
|
-
|
|
461
|
+
self.log.error(msg)
|
|
462
462
|
|
|
463
463
|
def get_gripper(self):
|
|
464
464
|
gripper_type = self._execute_cmd_exporter("get_gripper_type", attribute=True)
|
|
@@ -535,7 +535,7 @@ class EMBLFlexHCD(SampleChanger):
|
|
|
535
535
|
try:
|
|
536
536
|
_tt = time.time()
|
|
537
537
|
self._wait_busy(300)
|
|
538
|
-
|
|
538
|
+
self.log.info(f"Waited SC activity {time.time() - _tt}")
|
|
539
539
|
except Exception:
|
|
540
540
|
for msg in self.get_robot_exceptions():
|
|
541
541
|
logging.getLogger("user_level_log").error(msg)
|
|
@@ -584,7 +584,7 @@ class EMBLFlexHCD(SampleChanger):
|
|
|
584
584
|
|
|
585
585
|
for msg in self.get_robot_exceptions():
|
|
586
586
|
if msg is not None:
|
|
587
|
-
|
|
587
|
+
self.log.error(msg)
|
|
588
588
|
logging.getLogger("user_level_log").error(msg)
|
|
589
589
|
|
|
590
590
|
return self._set_loaded_sample_and_prepare(loaded_sample, previous_sample)
|
|
@@ -609,7 +609,7 @@ class EMBLFlexHCD(SampleChanger):
|
|
|
609
609
|
|
|
610
610
|
for msg in self.get_robot_exceptions():
|
|
611
611
|
if msg is not None:
|
|
612
|
-
|
|
612
|
+
self.log.error(msg)
|
|
613
613
|
logging.getLogger("user_level_log").error(msg)
|
|
614
614
|
|
|
615
615
|
if loaded_sample == (-1, -1, -1):
|
|
@@ -208,7 +208,7 @@ class EMBLFlexHarvester(EMBLFlexHCD):
|
|
|
208
208
|
try:
|
|
209
209
|
_tt = time.time()
|
|
210
210
|
self._wait_busy(300)
|
|
211
|
-
|
|
211
|
+
self.log.info(f"Waited SC activity {time.time() - _tt}")
|
|
212
212
|
except Exception:
|
|
213
213
|
logging.getLogger("user_level_log").error(
|
|
214
214
|
"ERROR While Waited SC activity to start"
|
|
@@ -237,7 +237,7 @@ class EMBLFlexHarvester(EMBLFlexHCD):
|
|
|
237
237
|
logging.getLogger("user_level_log").error(
|
|
238
238
|
"ERROR While SC activity After Loaded Sample "
|
|
239
239
|
)
|
|
240
|
-
|
|
240
|
+
self.log.error(msg)
|
|
241
241
|
logging.getLogger("user_level_log").error(msg)
|
|
242
242
|
# Temp: In Harvester mode any robot Exception is consider as Loading failed
|
|
243
243
|
# Except Pin Cleaning Station Exception
|
|
@@ -40,8 +40,6 @@ __copyright__ = """ Copyright © by the MXCuBE collaboration """
|
|
|
40
40
|
__license__ = "LGPLv3+"
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
import logging
|
|
44
|
-
|
|
45
43
|
from mxcubecore import HardwareRepository as HWR
|
|
46
44
|
from mxcubecore.HardwareObjects.abstract.AbstractBeam import AbstractBeam, BeamShape
|
|
47
45
|
|
|
@@ -137,7 +135,7 @@ class ESRFBeam(AbstractBeam):
|
|
|
137
135
|
if value.name != "UNKNOWN":
|
|
138
136
|
return list(value.value), value.name
|
|
139
137
|
except AttributeError:
|
|
140
|
-
|
|
138
|
+
self.log.info("Could not read beam size")
|
|
141
139
|
return [-1, -1], "UNKNOWN"
|
|
142
140
|
|
|
143
141
|
def _get_slits_size(self) -> dict[str, float]:
|
|
@@ -354,7 +352,7 @@ class ESRFBeam(AbstractBeam):
|
|
|
354
352
|
_beam_position_on_screen = HWR.beamline.diffractometer.get_beam_position()
|
|
355
353
|
except AttributeError:
|
|
356
354
|
msg = "Could not read beam position from MD, using OAV center"
|
|
357
|
-
|
|
355
|
+
self.log.warning(msg)
|
|
358
356
|
_beam_position_on_screen = (
|
|
359
357
|
HWR.beamline.sample_view.camera.get_width() / 2,
|
|
360
358
|
HWR.beamline.sample_view.camera.get_height() / 2,
|
|
@@ -398,4 +396,4 @@ class ESRFBeam(AbstractBeam):
|
|
|
398
396
|
if self._monitorbeam_obj.get_value().value:
|
|
399
397
|
self._beam_check_obj.wait_for_beam(timeout)
|
|
400
398
|
except AttributeError:
|
|
401
|
-
|
|
399
|
+
self.log.exception("")
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
1
|
from mxcubecore import HardwareRepository as HWR
|
|
4
2
|
from mxcubecore.HardwareObjects import BeamInfo
|
|
5
3
|
|
|
@@ -37,9 +35,7 @@ class ESRFBeamInfo(BeamInfo.BeamInfo):
|
|
|
37
35
|
if beam_position:
|
|
38
36
|
self.beam_position = tuple(map(float, beam_position.split()))
|
|
39
37
|
else:
|
|
40
|
-
|
|
41
|
-
"ESRFBeamInfo: " + "beam position not configured"
|
|
42
|
-
)
|
|
38
|
+
self.log.warning("ESRFBeamInfo: " + "beam position not configured")
|
|
43
39
|
self.difrractometer_hwobj = self.get_object_by_role("difrractometer")
|
|
44
40
|
self.flux = self.get_object_by_role("flux")
|
|
45
41
|
self.beam_definer = self.get_object_by_role("beam_definer")
|
|
@@ -36,7 +36,6 @@ Example xml file:
|
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
38
|
import ast
|
|
39
|
-
import logging
|
|
40
39
|
|
|
41
40
|
from mxcubecore.HardwareObjects.BeamlineActions import (
|
|
42
41
|
BeamlineActions,
|
|
@@ -70,7 +69,7 @@ class ESRFBeamlineActions(BeamlineActions):
|
|
|
70
69
|
action = getattr(controller, key)
|
|
71
70
|
self.ctrl_list.append(ControllerCommand(name, action))
|
|
72
71
|
except KeyError:
|
|
73
|
-
|
|
72
|
+
self.log.exception("")
|
|
74
73
|
|
|
75
74
|
try:
|
|
76
75
|
hwobj_cmd_roles = ast.literal_eval(
|
|
@@ -87,7 +86,7 @@ class ESRFBeamlineActions(BeamlineActions):
|
|
|
87
86
|
except:
|
|
88
87
|
pass
|
|
89
88
|
except AttributeError:
|
|
90
|
-
|
|
89
|
+
self.log.exception("")
|
|
91
90
|
|
|
92
91
|
def get_commands(self):
|
|
93
92
|
"""Get which objects to be used in the GUI
|
|
@@ -110,7 +110,7 @@ class ESRFEnergyScan(AbstractEnergyScan):
|
|
|
110
110
|
self.ctrl = self.get_object_by_role("controller")
|
|
111
111
|
self.ready_event = event.Event()
|
|
112
112
|
if HWR.beamline.lims is None:
|
|
113
|
-
|
|
113
|
+
self.log.warning(
|
|
114
114
|
"EnergyScan: you should specify the database hardware object"
|
|
115
115
|
)
|
|
116
116
|
|
|
@@ -273,7 +273,7 @@ class ESRFEnergyScan(AbstractEnergyScan):
|
|
|
273
273
|
|
|
274
274
|
msg = f"Chooch results: pk = {pk}, ip = {ip}. rm = {rm}.\n"
|
|
275
275
|
msg += f"Theoretical edge: {th_edge}."
|
|
276
|
-
|
|
276
|
+
self.log.info(msg)
|
|
277
277
|
|
|
278
278
|
# +- shift from the theoretical edge [eV]
|
|
279
279
|
edge_shift = 50
|
|
@@ -307,7 +307,7 @@ class ESRFEnergyScan(AbstractEnergyScan):
|
|
|
307
307
|
self.energy_scan_parameters["inflectionFPrime"] = fp_infl
|
|
308
308
|
self.energy_scan_parameters["inflectionFDoublePrime"] = fpp_infl
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
self.log.info("Saving png")
|
|
311
311
|
# prepare to save png files
|
|
312
312
|
title = "%10s %6s %6s\n%10s %6.2f %6.2f\n%10s %6.2f %6.2f" % (
|
|
313
313
|
"energy",
|
|
@@ -181,7 +181,7 @@ class ESRFMultiCollect(AbstractMultiCollect, HardwareObject):
|
|
|
181
181
|
self.stop_oscillation()
|
|
182
182
|
HWR.beamline.detector.stop_acquisition()
|
|
183
183
|
except Exception:
|
|
184
|
-
|
|
184
|
+
self.log.exception("")
|
|
185
185
|
|
|
186
186
|
def queue_finished_cleanup(self):
|
|
187
187
|
logging.getLogger("user_level_log").info("Queue execution finished")
|
|
@@ -209,13 +209,13 @@ class ESRFMultiCollect(AbstractMultiCollect, HardwareObject):
|
|
|
209
209
|
continue
|
|
210
210
|
motor_positions_copy[motor] = position
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
self.log.info(
|
|
213
213
|
"Moving motor '%s' to %f", motor.get_motor_mnemonic(), position
|
|
214
214
|
)
|
|
215
215
|
motor.set_value(position)
|
|
216
216
|
|
|
217
217
|
while any([motor.motorIsMoving() for motor in motor_positions_copy]):
|
|
218
|
-
|
|
218
|
+
self.log.info("Waiting for end of motors motion")
|
|
219
219
|
time.sleep(0.02)
|
|
220
220
|
|
|
221
221
|
def open_safety_shutter(self):
|
|
@@ -226,7 +226,7 @@ class ESRFMultiCollect(AbstractMultiCollect, HardwareObject):
|
|
|
226
226
|
HWR.beamline.safety_shutter.VALUES.OPEN, timeout=10
|
|
227
227
|
)
|
|
228
228
|
except Exception:
|
|
229
|
-
|
|
229
|
+
self.log.exception("")
|
|
230
230
|
|
|
231
231
|
def safety_shutter_opened(self):
|
|
232
232
|
state = False
|
|
@@ -234,7 +234,7 @@ class ESRFMultiCollect(AbstractMultiCollect, HardwareObject):
|
|
|
234
234
|
try:
|
|
235
235
|
state = HWR.beamline.safety_shutter.get_value().name == "OPEN"
|
|
236
236
|
except Exception:
|
|
237
|
-
|
|
237
|
+
self.log.exception("")
|
|
238
238
|
state = True
|
|
239
239
|
|
|
240
240
|
return state
|
|
@@ -247,7 +247,7 @@ class ESRFMultiCollect(AbstractMultiCollect, HardwareObject):
|
|
|
247
247
|
HWR.beamline.safety_shutter.VALUES.CLOSED
|
|
248
248
|
)
|
|
249
249
|
except Exception:
|
|
250
|
-
|
|
250
|
+
self.log.exception("")
|
|
251
251
|
|
|
252
252
|
@task
|
|
253
253
|
def prepare_intensity_monitors(self):
|
|
@@ -455,7 +455,7 @@ class ESRFMultiCollect(AbstractMultiCollect, HardwareObject):
|
|
|
455
455
|
try:
|
|
456
456
|
_gaps = HWR.beamline.config.undulators
|
|
457
457
|
except Exception:
|
|
458
|
-
|
|
458
|
+
self.log.exception("Could not get undulator gaps")
|
|
459
459
|
all_gaps.clear()
|
|
460
460
|
for key in _gaps:
|
|
461
461
|
if "_Position" in key:
|
|
@@ -33,8 +33,6 @@ Example xml_ configuration:
|
|
|
33
33
|
controller: bliss.yaml
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
|
-
import logging
|
|
37
|
-
|
|
38
36
|
from gevent import sleep, spawn
|
|
39
37
|
|
|
40
38
|
from mxcubecore import HardwareRepository as HWR
|
|
@@ -62,17 +60,13 @@ class ESRFPhotonFlux(AbstractFlux):
|
|
|
62
60
|
self._flux_calc = self.controller.CalculateFlux()
|
|
63
61
|
self._flux_calc.init()
|
|
64
62
|
except AttributeError:
|
|
65
|
-
|
|
66
|
-
"Could not get flux calculation from BLISS"
|
|
67
|
-
)
|
|
63
|
+
self.log.exception("Could not get flux calculation from BLISS")
|
|
68
64
|
counter_name = self.get_property("counter_name")
|
|
69
65
|
|
|
70
66
|
if counter_name:
|
|
71
67
|
self._counter = getattr(self.controller, counter_name)
|
|
72
68
|
else:
|
|
73
|
-
|
|
74
|
-
"Counter to read the flux is not configured"
|
|
75
|
-
)
|
|
69
|
+
self.log.exception("Counter to read the flux is not configured")
|
|
76
70
|
|
|
77
71
|
try:
|
|
78
72
|
HWR.beamline.safety_shutter.connect("stateChanged", self.update_value)
|