mxcubecore 1.393.0__py3-none-any.whl → 1.395.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 +20 -22
- 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.395.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.395.0.dist-info}/RECORD +176 -176
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.395.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.395.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.395.0.dist-info}/WHEEL +0 -0
|
@@ -227,7 +227,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
227
227
|
self.log_filename = os.path.join(
|
|
228
228
|
tempfile.gettempdir(), "mxcube", "marvin.log"
|
|
229
229
|
)
|
|
230
|
-
|
|
230
|
+
self.log.debug("Marvin log filename: %s" % self.log_filename)
|
|
231
231
|
AbstractSampleChanger.SampleChanger.init(self)
|
|
232
232
|
|
|
233
233
|
self.update_state(HardwareObjectState.READY)
|
|
@@ -268,9 +268,9 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
268
268
|
"""Updates sample is loaded"""
|
|
269
269
|
if self._sample_detected != sample_detected:
|
|
270
270
|
if sample_detected:
|
|
271
|
-
|
|
271
|
+
self.log.debug("Sample changer: sample re-appeared")
|
|
272
272
|
else:
|
|
273
|
-
|
|
273
|
+
self.log.debug("Sample changer: sample disappeared")
|
|
274
274
|
|
|
275
275
|
self._sample_detected = sample_detected
|
|
276
276
|
self._info_dict["sample_detected"] = sample_detected
|
|
@@ -281,44 +281,32 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
281
281
|
with gevent.Timeout(
|
|
282
282
|
timeout, Exception("Timeout waiting for command acknowldegement")
|
|
283
283
|
):
|
|
284
|
-
|
|
285
|
-
"Sample changer: start waiting command acknowldegement"
|
|
286
|
-
)
|
|
284
|
+
self.log.debug("Sample changer: start waiting command acknowldegement")
|
|
287
285
|
while not self._command_acknowledgement:
|
|
288
286
|
gevent.sleep(0.05)
|
|
289
|
-
|
|
290
|
-
"Sample changer: done waiting command acknowldegement"
|
|
291
|
-
)
|
|
287
|
+
self.log.debug("Sample changer: done waiting command acknowldegement")
|
|
292
288
|
|
|
293
289
|
def wait_sample_to_disappear(self, timeout):
|
|
294
290
|
with gevent.Timeout(
|
|
295
291
|
timeout, Exception("Timeout waiting for sample to disappear")
|
|
296
292
|
):
|
|
297
|
-
|
|
298
|
-
"Sample changer: start waiting sample to disappear"
|
|
299
|
-
)
|
|
293
|
+
self.log.debug("Sample changer: start waiting sample to disappear")
|
|
300
294
|
while self._sample_detected:
|
|
301
295
|
if self._was_mount_error:
|
|
302
296
|
self._was_mount_error = False
|
|
303
297
|
return
|
|
304
298
|
gevent.sleep(0.05)
|
|
305
|
-
|
|
306
|
-
"Sample changer: done waiting sample to disappear"
|
|
307
|
-
)
|
|
299
|
+
self.log.debug("Sample changer: done waiting sample to disappear")
|
|
308
300
|
|
|
309
301
|
def wait_sample_to_appear(self, timeout):
|
|
310
302
|
with gevent.Timeout(timeout, Exception("Timeout waiting for sample to appear")):
|
|
311
|
-
|
|
312
|
-
"Sample changer: start waiting sample to appear"
|
|
313
|
-
)
|
|
303
|
+
self.log.debug("Sample changer: start waiting sample to appear")
|
|
314
304
|
while not self._sample_detected:
|
|
315
305
|
if self._was_mount_error:
|
|
316
306
|
self._was_mount_error = False
|
|
317
307
|
return
|
|
318
308
|
gevent.sleep(0.05)
|
|
319
|
-
|
|
320
|
-
"Sample changer: done waiting sample to appear"
|
|
321
|
-
)
|
|
309
|
+
self.log.debug("Sample changer: done waiting sample to appear")
|
|
322
310
|
|
|
323
311
|
def wait_sample_on_gonio(self, timeout):
|
|
324
312
|
# with gevent.Timeout(timeout, Exception("Timeout waiting for sample on gonio")):
|
|
@@ -543,7 +531,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
543
531
|
self.emit("progressInit", (msg, 100, False))
|
|
544
532
|
|
|
545
533
|
# 2. Set diffractometer transfer phase
|
|
546
|
-
|
|
534
|
+
self.log.debug(
|
|
547
535
|
"%s %s"
|
|
548
536
|
% (
|
|
549
537
|
HWR.beamline.diffractometer.get_current_phase(),
|
|
@@ -554,7 +542,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
554
542
|
HWR.beamline.diffractometer.get_current_phase()
|
|
555
543
|
!= HWR.beamline.diffractometer.PHASE_TRANSFER
|
|
556
544
|
):
|
|
557
|
-
|
|
545
|
+
self.log.debug("set transfer")
|
|
558
546
|
HWR.beamline.diffractometer.set_phase(
|
|
559
547
|
HWR.beamline.diffractometer.PHASE_TRANSFER, 60.0
|
|
560
548
|
)
|
|
@@ -569,9 +557,9 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
569
557
|
)
|
|
570
558
|
raise Exception("Unable to set Transfer phase")
|
|
571
559
|
|
|
572
|
-
#
|
|
560
|
+
# self.log.debug("Sample changer: Closing guillotine...")
|
|
573
561
|
# HWR.beamline.detector.close_cover()
|
|
574
|
-
#
|
|
562
|
+
# self.log.debug("Sample changer: Guillotine closed")
|
|
575
563
|
# 3. If necessary move detector to save position
|
|
576
564
|
if self._focusing_mode == "P13mode":
|
|
577
565
|
if HWR.beamline.detector.distance.get_value() < 399.0:
|
|
@@ -583,9 +571,9 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
583
571
|
log.info("Sample changer: Detector moved to save position")
|
|
584
572
|
else:
|
|
585
573
|
pass
|
|
586
|
-
#
|
|
574
|
+
# self.log.debug("Sample changer: Closing guillotine...")
|
|
587
575
|
# HWR.beamline.detector.close_cover()
|
|
588
|
-
##
|
|
576
|
+
##self.log.debug("Sample changer: Guillotine closed")
|
|
589
577
|
|
|
590
578
|
# 4. Executed command and wait till device is ready
|
|
591
579
|
if self._focusing_mode == "P13mode":
|
|
@@ -770,14 +758,14 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
770
758
|
for arg in args:
|
|
771
759
|
arg_arr.append(arg)
|
|
772
760
|
|
|
773
|
-
|
|
761
|
+
self.log.debug(
|
|
774
762
|
"Sample changer: Sending cmd with arguments: %s..." % str(arg_arr)
|
|
775
763
|
)
|
|
776
764
|
|
|
777
765
|
self._command_acknowledgement = False
|
|
778
766
|
|
|
779
767
|
method(arg_arr)
|
|
780
|
-
|
|
768
|
+
self.log.debug("Sample changer: Waiting ready...")
|
|
781
769
|
self.wait_command_acknowledgement(5.0)
|
|
782
770
|
self._action_started = True
|
|
783
771
|
gevent.sleep(5)
|
|
@@ -788,10 +776,10 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
788
776
|
self.wait_sample_to_appear(60.0)
|
|
789
777
|
else:
|
|
790
778
|
self.wait_ready(120.0)
|
|
791
|
-
|
|
792
|
-
|
|
779
|
+
self.log.debug("Sample changer: Ready")
|
|
780
|
+
self.log.debug("Sample changer: Waiting veto...")
|
|
793
781
|
self.waitVeto(20.0)
|
|
794
|
-
|
|
782
|
+
self.log.debug("Sample changer: Veto ready")
|
|
795
783
|
# if self._is_device_busy():
|
|
796
784
|
# raise Exception("Action finished to early. Sample changer is not ready!!!")
|
|
797
785
|
self.sample_is_loaded_changed(self.chan_sample_is_loaded.get_value())
|
|
@@ -871,7 +859,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
871
859
|
Container.Pin.get_sample_address(basket_no, sample_no)
|
|
872
860
|
)
|
|
873
861
|
except Exception:
|
|
874
|
-
|
|
862
|
+
self.log.exception("")
|
|
875
863
|
self._set_selected_component(basket)
|
|
876
864
|
self._set_selected_sample(sample)
|
|
877
865
|
|
|
@@ -1031,7 +1019,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
1031
1019
|
and self._action_started
|
|
1032
1020
|
):
|
|
1033
1021
|
self._state_string = prop_value
|
|
1034
|
-
|
|
1022
|
+
self.log.debug(
|
|
1035
1023
|
"Sample changer: status changed: %s" % self._state_string
|
|
1036
1024
|
)
|
|
1037
1025
|
self._update_state()
|
|
@@ -1042,7 +1030,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
|
|
|
1042
1030
|
self.emit("progressStep", self._progress)
|
|
1043
1031
|
self._info_dict["progress"] = self._progress
|
|
1044
1032
|
except Exception:
|
|
1045
|
-
|
|
1033
|
+
self.log.exception("")
|
|
1046
1034
|
elif prop_name == "CPuck":
|
|
1047
1035
|
if prop_value == "1":
|
|
1048
1036
|
centre_puck = True
|
|
@@ -396,9 +396,7 @@ class Microdiff(MiniDiff.MiniDiff):
|
|
|
396
396
|
# None means infinite timeout
|
|
397
397
|
# <=0 means default timeout
|
|
398
398
|
if timeout is not None and timeout <= 0:
|
|
399
|
-
|
|
400
|
-
"DEBUG: Strange timeout value passed %s" % str(timeout)
|
|
401
|
-
)
|
|
399
|
+
self.log.warning("DEBUG: Strange timeout value passed %s" % str(timeout))
|
|
402
400
|
timeout = 30
|
|
403
401
|
with gevent.Timeout(
|
|
404
402
|
timeout, RuntimeError("Timeout waiting for diffractometer to be ready")
|
|
@@ -454,18 +452,18 @@ class Microdiff(MiniDiff.MiniDiff):
|
|
|
454
452
|
diffr = self.get_object_by_role("controller").diffractometer
|
|
455
453
|
diffr.prepare("centre")
|
|
456
454
|
except Exception:
|
|
457
|
-
|
|
455
|
+
self.log.exception("Cannot prepare centring")
|
|
458
456
|
|
|
459
457
|
def set_light_in(self):
|
|
460
458
|
"""Set the backlight in - used by the XMLRPC calls"""
|
|
461
|
-
|
|
459
|
+
self.log.info("Moving backlight in")
|
|
462
460
|
light_hwobj = self.get_object_by_role("BackLightSwitch")
|
|
463
461
|
light_hwobj.set_value(light_hwobj.VALUES.IN)
|
|
464
462
|
self._wait_ready(20)
|
|
465
463
|
|
|
466
464
|
def set_light_out(self):
|
|
467
465
|
"""Set the backlight out - used by the XMLRPC calls"""
|
|
468
|
-
|
|
466
|
+
self.log.info("Moving backlight out")
|
|
469
467
|
light_hwobj = self.get_object_by_role("BackLightSwitch")
|
|
470
468
|
light_hwobj.set_value(light_hwobj.VALUES.OUT)
|
|
471
469
|
self._wait_ready(20)
|
|
@@ -474,7 +472,7 @@ class Microdiff(MiniDiff.MiniDiff):
|
|
|
474
472
|
"""Set the phase"""
|
|
475
473
|
_use_custom = self.get_property("use_custom_phase_script", False)
|
|
476
474
|
if not self._ready():
|
|
477
|
-
|
|
475
|
+
self.log.exception("MD not ready - phase not set.")
|
|
478
476
|
return
|
|
479
477
|
|
|
480
478
|
current_phase = self.get_current_phase()
|
|
@@ -790,7 +788,7 @@ class Microdiff(MiniDiff.MiniDiff):
|
|
|
790
788
|
|
|
791
789
|
beam_pos_x, beam_pos_y = HWR.beamline.beam.get_beam_position_on_screen()
|
|
792
790
|
|
|
793
|
-
|
|
791
|
+
self.log.info("Starting centring procedure ...")
|
|
794
792
|
|
|
795
793
|
if self.in_plate_mode():
|
|
796
794
|
plateTranslation = self.get_object_by_role("plateTranslation")
|
|
@@ -54,7 +54,7 @@ class MicrodiffActuator(AbstractActuator):
|
|
|
54
54
|
tt = float(self.get_property("timeout"))
|
|
55
55
|
self.timeout = tt
|
|
56
56
|
except TypeError:
|
|
57
|
-
|
|
57
|
+
self.log.exception("")
|
|
58
58
|
|
|
59
59
|
if self.get_property("use_hwstate"):
|
|
60
60
|
self.hwstate_attr = self.add_channel(
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
1
|
from mxcubecore.BaseHardwareObjects import HardwareObject
|
|
4
2
|
|
|
5
3
|
"""
|
|
@@ -94,7 +92,7 @@ class MicrodiffBeamstop(HardwareObject):
|
|
|
94
92
|
try:
|
|
95
93
|
pos = self.beamstop.states[pos]
|
|
96
94
|
except Exception:
|
|
97
|
-
|
|
95
|
+
self.log.exception("")
|
|
98
96
|
|
|
99
97
|
if not noEmit:
|
|
100
98
|
if pos:
|
|
@@ -57,7 +57,7 @@ class MicrodiffInOut(HardwareObject):
|
|
|
57
57
|
tt = float(self.get_property("timeout"))
|
|
58
58
|
self.timeout = tt
|
|
59
59
|
except Exception:
|
|
60
|
-
|
|
60
|
+
self.log.exception("")
|
|
61
61
|
|
|
62
62
|
if self.get_property("use_hwstate"):
|
|
63
63
|
self.hwstate_attr = self.add_channel(
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import time
|
|
3
2
|
|
|
4
3
|
import gevent
|
|
@@ -94,8 +93,8 @@ class MicrodiffKappaMotor(ExporterMotor):
|
|
|
94
93
|
For more info see Acta Cryst.(2011). A67, 219-228, Sandor Brockhauser et al., formula (3).
|
|
95
94
|
See also MXSUP-1823.
|
|
96
95
|
"""
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
self.log.info("In MicrodiffKappaMotor.getNewSamplePosition")
|
|
97
|
+
self.log.info(
|
|
99
98
|
"Input arguments: Kappa %.2f Phi %.2f sampx %.3f sampy %.3f phiy %.3f Kappa2 %.2f Phi2 %.2f"
|
|
100
99
|
% (kappaAngle1, phiAngle1, sampx, sampy, phiy, kappaAngle2, phiAngle2)
|
|
101
100
|
)
|
|
@@ -123,7 +122,7 @@ class MicrodiffKappaMotor(ExporterMotor):
|
|
|
123
122
|
new_motor_pos["sampx"] = float(-t_end[0])
|
|
124
123
|
new_motor_pos["sampy"] = float(-t_end[1])
|
|
125
124
|
new_motor_pos["phiy"] = float(-t_end[2])
|
|
126
|
-
|
|
125
|
+
self.log.info("New motor positions: %r" % new_motor_pos)
|
|
127
126
|
return new_motor_pos
|
|
128
127
|
|
|
129
128
|
def rotation_invariant(self, v):
|
|
@@ -142,13 +142,13 @@ class MiniDiff(HardwareObject):
|
|
|
142
142
|
try:
|
|
143
143
|
self.lightWago = hwr.get_hardware_object(wl_prop)
|
|
144
144
|
except Exception:
|
|
145
|
-
|
|
145
|
+
self.log.exception("")
|
|
146
146
|
|
|
147
147
|
if self.phiMotor is not None:
|
|
148
148
|
self.connect(self.phiMotor, "stateChanged", self.phiMotorStateChanged)
|
|
149
149
|
self.connect(self.phiMotor, "valueChanged", self.emit_diffractometer_moved)
|
|
150
150
|
else:
|
|
151
|
-
|
|
151
|
+
self.log.error(
|
|
152
152
|
"MiniDiff: phi motor is not defined in minidiff equipment %s",
|
|
153
153
|
str(self.name),
|
|
154
154
|
)
|
|
@@ -157,7 +157,7 @@ class MiniDiff(HardwareObject):
|
|
|
157
157
|
self.connect(self.phizMotor, "valueChanged", self.phizMotorMoved)
|
|
158
158
|
self.connect(self.phizMotor, "valueChanged", self.emit_diffractometer_moved)
|
|
159
159
|
else:
|
|
160
|
-
|
|
160
|
+
self.log.error(
|
|
161
161
|
"MiniDiff: phiz motor is not defined in minidiff equipment %s",
|
|
162
162
|
str(self.name),
|
|
163
163
|
)
|
|
@@ -166,7 +166,7 @@ class MiniDiff(HardwareObject):
|
|
|
166
166
|
self.connect(self.phiyMotor, "valueChanged", self.phiyMotorMoved)
|
|
167
167
|
self.connect(self.phiyMotor, "valueChanged", self.emit_diffractometer_moved)
|
|
168
168
|
else:
|
|
169
|
-
|
|
169
|
+
self.log.error(
|
|
170
170
|
"MiniDiff: phiy motor is not defined in minidiff equipment %s",
|
|
171
171
|
str(self.name),
|
|
172
172
|
)
|
|
@@ -182,7 +182,7 @@ class MiniDiff(HardwareObject):
|
|
|
182
182
|
)
|
|
183
183
|
self.connect(self.zoomMotor, "stateChanged", self.zoomMotorStateChanged)
|
|
184
184
|
else:
|
|
185
|
-
|
|
185
|
+
self.log.error(
|
|
186
186
|
"MiniDiff: zoom motor is not defined in minidiff equipment %s",
|
|
187
187
|
str(self.name),
|
|
188
188
|
)
|
|
@@ -195,7 +195,7 @@ class MiniDiff(HardwareObject):
|
|
|
195
195
|
self.sampleXMotor, "valueChanged", self.emit_diffractometer_moved
|
|
196
196
|
)
|
|
197
197
|
else:
|
|
198
|
-
|
|
198
|
+
self.log.error(
|
|
199
199
|
"MiniDiff: sampx motor is not defined in minidiff equipment %s",
|
|
200
200
|
str(self.name),
|
|
201
201
|
)
|
|
@@ -208,13 +208,13 @@ class MiniDiff(HardwareObject):
|
|
|
208
208
|
self.sampleYMotor, "valueChanged", self.emit_diffractometer_moved
|
|
209
209
|
)
|
|
210
210
|
else:
|
|
211
|
-
|
|
211
|
+
self.log.error(
|
|
212
212
|
"MiniDiff: sampx motor is not defined in minidiff equipment %s",
|
|
213
213
|
str(self.name),
|
|
214
214
|
)
|
|
215
215
|
|
|
216
216
|
if HWR.beamline.sample_changer is None:
|
|
217
|
-
|
|
217
|
+
self.log.warning(
|
|
218
218
|
"MiniDiff: sample changer is not defined in minidiff equipment %s",
|
|
219
219
|
str(self.name),
|
|
220
220
|
)
|
|
@@ -226,13 +226,13 @@ class MiniDiff(HardwareObject):
|
|
|
226
226
|
self.sampleChangerSampleIsLoaded,
|
|
227
227
|
)
|
|
228
228
|
except Exception:
|
|
229
|
-
|
|
229
|
+
self.log.exception(
|
|
230
230
|
"MiniDiff: could not connect to sample changer smart magnet"
|
|
231
231
|
)
|
|
232
232
|
if self.lightWago is not None:
|
|
233
233
|
self.connect(self.lightWago, "wagoStateChanged", self.wagoLightStateChanged)
|
|
234
234
|
else:
|
|
235
|
-
|
|
235
|
+
self.log.warning(
|
|
236
236
|
"MiniDiff: wago light is not defined in minidiff equipment %s",
|
|
237
237
|
str(self.name),
|
|
238
238
|
)
|
|
@@ -249,13 +249,11 @@ class MiniDiff(HardwareObject):
|
|
|
249
249
|
self._set_rotation_axis_position(value, motor_name="phiz")
|
|
250
250
|
|
|
251
251
|
def _set_rotation_axis_position(self, value: float, motor_name="phiz"):
|
|
252
|
-
|
|
253
|
-
f"Setting rotation axis ({motor_name}) position to {value}"
|
|
254
|
-
)
|
|
252
|
+
self.log.info(f"Setting rotation axis ({motor_name}) position to {value}")
|
|
255
253
|
|
|
256
254
|
try:
|
|
257
255
|
fname = self.get_xml_path()
|
|
258
|
-
|
|
256
|
+
self.log.info(f"Updating {fname}")
|
|
259
257
|
|
|
260
258
|
tree = ET.parse(fname)
|
|
261
259
|
motor_tag = (
|
|
@@ -266,10 +264,10 @@ class MiniDiff(HardwareObject):
|
|
|
266
264
|
motor_tag.text = str(value)
|
|
267
265
|
tree.write(fname)
|
|
268
266
|
except:
|
|
269
|
-
|
|
267
|
+
self.log.info(f"Could not update {fname}")
|
|
270
268
|
# raise
|
|
271
269
|
else:
|
|
272
|
-
|
|
270
|
+
self.log.info(f"Wrote {fname}")
|
|
273
271
|
|
|
274
272
|
if motor_name == "phiz":
|
|
275
273
|
self.centringPhiz = sample_centring.CentringMotor(
|
|
@@ -285,13 +283,11 @@ class MiniDiff(HardwareObject):
|
|
|
285
283
|
)
|
|
286
284
|
|
|
287
285
|
try:
|
|
288
|
-
|
|
286
|
+
self.log.info(f"Setting MD Alignment reference position")
|
|
289
287
|
print(f" script name {script_name} value {value}")
|
|
290
288
|
self.run_script(f"{script_name}, {value}")
|
|
291
289
|
except:
|
|
292
|
-
|
|
293
|
-
f"Setting MD Alignment reference position failed"
|
|
294
|
-
)
|
|
290
|
+
self.log.exception(f"Setting MD Alignment reference position failed")
|
|
295
291
|
raise
|
|
296
292
|
|
|
297
293
|
# Contained Objects
|
|
@@ -550,9 +546,7 @@ class MiniDiff(HardwareObject):
|
|
|
550
546
|
self.centringSampley.set_value(sampy)
|
|
551
547
|
self.centringPhiy.set_value(-phiy)
|
|
552
548
|
except Exception:
|
|
553
|
-
|
|
554
|
-
"MiniDiff: could not center to beam, aborting"
|
|
555
|
-
)
|
|
549
|
+
self.log.exception("MiniDiff: could not center to beam, aborting")
|
|
556
550
|
|
|
557
551
|
def getAvailableCentringMethods(self):
|
|
558
552
|
return self.centringMethods.keys()
|
|
@@ -565,7 +559,7 @@ class MiniDiff(HardwareObject):
|
|
|
565
559
|
else:
|
|
566
560
|
time.sleep(0.5)
|
|
567
561
|
self.wait_ready(60)
|
|
568
|
-
|
|
562
|
+
self.log.info("Using MD script for sample centring")
|
|
569
563
|
self.run_script("sample_centering")
|
|
570
564
|
time.sleep(0.5)
|
|
571
565
|
self.wait_ready(120)
|
|
@@ -577,23 +571,17 @@ class MiniDiff(HardwareObject):
|
|
|
577
571
|
res_centering[0].endswith("sample_centering.java")
|
|
578
572
|
and res_centering[6] == "-1"
|
|
579
573
|
):
|
|
580
|
-
|
|
581
|
-
"MiniDiff: problem while centring"
|
|
582
|
-
)
|
|
574
|
+
self.log.exception("MiniDiff: problem while centring")
|
|
583
575
|
self.emitCentringFailed()
|
|
584
576
|
else:
|
|
585
|
-
|
|
577
|
+
self.log.info(
|
|
586
578
|
"MiniDiff: centring went fine with %s" % str(res_centering)
|
|
587
579
|
)
|
|
588
580
|
except:
|
|
589
|
-
|
|
590
|
-
"MD script for sample centering had a problem"
|
|
591
|
-
)
|
|
581
|
+
self.log.exception("MD script for sample centering had a problem")
|
|
592
582
|
|
|
593
583
|
except KeyError as diag:
|
|
594
|
-
|
|
595
|
-
"MiniDiff: unknown centring method (%s)" % str(diag)
|
|
596
|
-
)
|
|
584
|
+
self.log.error("MiniDiff: unknown centring method (%s)" % str(diag))
|
|
597
585
|
self.emitCentringFailed()
|
|
598
586
|
else:
|
|
599
587
|
try:
|
|
@@ -603,7 +591,7 @@ class MiniDiff(HardwareObject):
|
|
|
603
591
|
pass
|
|
604
592
|
|
|
605
593
|
except Exception:
|
|
606
|
-
|
|
594
|
+
self.log.exception("MiniDiff: problem while centring")
|
|
607
595
|
self.emitCentringFailed()
|
|
608
596
|
|
|
609
597
|
def run_standard_centring(self, method, sample_info):
|
|
@@ -613,15 +601,13 @@ class MiniDiff(HardwareObject):
|
|
|
613
601
|
self.wait_ready(30)
|
|
614
602
|
fun = self.centringMethods[method]
|
|
615
603
|
except KeyError as diag:
|
|
616
|
-
|
|
617
|
-
"MiniDiff: unknown centring method (%s)" % str(diag)
|
|
618
|
-
)
|
|
604
|
+
self.log.error("MiniDiff: unknown centring method (%s)" % str(diag))
|
|
619
605
|
self.emitCentringFailed()
|
|
620
606
|
else:
|
|
621
607
|
try:
|
|
622
608
|
fun(sample_info)
|
|
623
609
|
except Exception:
|
|
624
|
-
|
|
610
|
+
self.log.exception("MiniDiff: problem while centring")
|
|
625
611
|
self.emitCentringFailed()
|
|
626
612
|
|
|
627
613
|
def start_centring_method(self, method, sample_info=None):
|
|
@@ -636,7 +622,7 @@ class MiniDiff(HardwareObject):
|
|
|
636
622
|
return
|
|
637
623
|
|
|
638
624
|
if self.current_centring_procedure is not None:
|
|
639
|
-
|
|
625
|
+
self.log.error(
|
|
640
626
|
"MiniDiff: already in centring method %s" % self.currentCentringMethod
|
|
641
627
|
)
|
|
642
628
|
return
|
|
@@ -656,11 +642,9 @@ class MiniDiff(HardwareObject):
|
|
|
656
642
|
try:
|
|
657
643
|
self.current_centring_procedure.kill(block=True)
|
|
658
644
|
except Exception:
|
|
659
|
-
|
|
660
|
-
"MiniDiff: problem aborting the centring method"
|
|
661
|
-
)
|
|
645
|
+
self.log.exception("MiniDiff: problem aborting the centring method")
|
|
662
646
|
|
|
663
|
-
|
|
647
|
+
self.log.exception("MiniDiff: Centring canceled")
|
|
664
648
|
|
|
665
649
|
try:
|
|
666
650
|
fun = self.cancel_centring_methods[self.currentCentringMethod]
|
|
@@ -689,7 +673,7 @@ class MiniDiff(HardwareObject):
|
|
|
689
673
|
self.accept_centring()
|
|
690
674
|
|
|
691
675
|
def start_manual_centring(self, sample_info=None):
|
|
692
|
-
|
|
676
|
+
self.log.info("Starting centring procedure ...")
|
|
693
677
|
|
|
694
678
|
beam_pos_x, beam_pos_y = HWR.beamline.beam.get_beam_position_on_screen()
|
|
695
679
|
|
|
@@ -913,7 +897,7 @@ class MiniDiff(HardwareObject):
|
|
|
913
897
|
# save position in MD2 software
|
|
914
898
|
self.save_centring_positions()
|
|
915
899
|
|
|
916
|
-
|
|
900
|
+
self.log.info("DEBUG %s" % self.get_centring_status())
|
|
917
901
|
logging.getLogger("user_level_log").info("Centring successful")
|
|
918
902
|
|
|
919
903
|
def reject_centring(self):
|
|
@@ -955,12 +939,12 @@ class MiniDiff(HardwareObject):
|
|
|
955
939
|
self.currentCentringMethod = None
|
|
956
940
|
self.current_centring_procedure = None
|
|
957
941
|
else:
|
|
958
|
-
|
|
942
|
+
self.log.debug(
|
|
959
943
|
"MiniDiff: trying to emit centringSuccessful outside of a centring"
|
|
960
944
|
)
|
|
961
945
|
|
|
962
946
|
def emitProgressMessage(self, msg=None):
|
|
963
|
-
#
|
|
947
|
+
# self.log.debug("%s: %s", self.name, msg)
|
|
964
948
|
self.emit("progressMessage", (msg,))
|
|
965
949
|
|
|
966
950
|
def get_centring_status(self):
|
|
@@ -1035,9 +1019,7 @@ class MiniDiff(HardwareObject):
|
|
|
1035
1019
|
try:
|
|
1036
1020
|
self.centringStatus["images"] = snapshotsProcedure.get()
|
|
1037
1021
|
except Exception:
|
|
1038
|
-
|
|
1039
|
-
"MiniDiff: could not take crystal snapshots"
|
|
1040
|
-
)
|
|
1022
|
+
self.log.exception("MiniDiff: could not take crystal snapshots")
|
|
1041
1023
|
self.emit("centringSnapshots", (False,))
|
|
1042
1024
|
self.emitProgressMessage("")
|
|
1043
1025
|
else:
|
|
@@ -1067,9 +1049,7 @@ class MiniDiff(HardwareObject):
|
|
|
1067
1049
|
try:
|
|
1068
1050
|
data = GonioHeadConfiguration(**chip_def)
|
|
1069
1051
|
except ValidationError:
|
|
1070
|
-
|
|
1071
|
-
"Validation error in %s" % chip_def_fpath
|
|
1072
|
-
)
|
|
1052
|
+
self.log.exception("Validation error in %s" % chip_def_fpath)
|
|
1073
1053
|
|
|
1074
1054
|
return data
|
|
1075
1055
|
|
|
@@ -1086,9 +1066,7 @@ class MiniDiff(HardwareObject):
|
|
|
1086
1066
|
try:
|
|
1087
1067
|
GonioHeadConfiguration(**data)
|
|
1088
1068
|
except ValidationError:
|
|
1089
|
-
|
|
1090
|
-
"Validation error in %s" % chip_def_fpath
|
|
1091
|
-
)
|
|
1069
|
+
self.log.exception("Validation error in %s" % chip_def_fpath)
|
|
1092
1070
|
|
|
1093
1071
|
_f.write(json.dumps(data, indent=4))
|
|
1094
1072
|
|
|
@@ -66,9 +66,9 @@ class MotorWPositions(AbstractMotor, Device):
|
|
|
66
66
|
role = roles[0]
|
|
67
67
|
self.motor = self.get_object_by_role(role)
|
|
68
68
|
except KeyError:
|
|
69
|
-
|
|
69
|
+
self.log.error("MotorWPositions: motor not defined")
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
self.log.exception("")
|
|
72
72
|
return
|
|
73
73
|
try:
|
|
74
74
|
self.delta = self["deltas"].get_property(role)
|
|
@@ -108,7 +108,7 @@ class MotorWPositions(AbstractMotor, Device):
|
|
|
108
108
|
try:
|
|
109
109
|
self.motor.set_value(self.predefined_positions[position_name])
|
|
110
110
|
except Exception:
|
|
111
|
-
|
|
111
|
+
self.log.exception("MotorWPositions: invalid position name")
|
|
112
112
|
|
|
113
113
|
def setNewPredefinedPosition(self, positionName, positionOffset):
|
|
114
114
|
raise NotImplementedError
|
|
@@ -242,7 +242,7 @@ class PlateManipulator(SampleChanger):
|
|
|
242
242
|
self.num_drops,
|
|
243
243
|
) = cmd_get_config.get_value()
|
|
244
244
|
except Exception:
|
|
245
|
-
|
|
245
|
+
self.log.exception("")
|
|
246
246
|
else:
|
|
247
247
|
self.num_cols = self.get_property("numCols")
|
|
248
248
|
self.num_rows = self.get_property("numRows")
|
|
@@ -323,7 +323,7 @@ class PlateManipulator(SampleChanger):
|
|
|
323
323
|
self.plate_location_changed(self.chan_plate_location.get_value())
|
|
324
324
|
self._on_state_changed(state)
|
|
325
325
|
except AttributeError:
|
|
326
|
-
|
|
326
|
+
self.log.exception("")
|
|
327
327
|
|
|
328
328
|
def _on_state_changed(self, state):
|
|
329
329
|
"""
|