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.
- mxcubecore/BaseHardwareObjects.py +1 -1
- mxcubecore/Command/Epics.py +2 -2
- mxcubecore/Command/Pool.py +4 -4
- mxcubecore/Command/Sardana.py +7 -3
- mxcubecore/Command/Taco.py +2 -2
- mxcubecore/Command/Tango.py +2 -2
- mxcubecore/Command/Tine.py +1 -1
- mxcubecore/Command/exporter/ExporterClient.py +2 -2
- mxcubecore/Command/exporter/StandardClient.py +4 -3
- mxcubecore/HardwareObjects/ALBA/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 +3 -3
- mxcubecore/HardwareObjects/BlissMotorWPositions.py +4 -7
- mxcubecore/HardwareObjects/Cats90.py +33 -43
- mxcubecore/HardwareObjects/CatsBessy.py +1 -1
- mxcubecore/HardwareObjects/CatsMaint.py +2 -2
- mxcubecore/HardwareObjects/CentringMath.py +5 -4
- mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +4 -4
- mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +2 -0
- mxcubecore/HardwareObjects/DESY/P11Collect.py +7 -7
- mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +14 -16
- mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +6 -10
- mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +6 -4
- 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/EMBLBeamlineTest.py +2 -0
- mxcubecore/HardwareObjects/EMBL/EMBLDoorInterlock.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLEnergy.py +10 -18
- mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +10 -12
- 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 -2
- 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 -2
- mxcubecore/HardwareObjects/ESRF/ESRFEnergyScan.py +3 -3
- mxcubecore/HardwareObjects/ESRF/ESRFMetadataManagerClient.py +1 -1
- 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 +3 -3
- 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 -1
- 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 +21 -29
- mxcubecore/HardwareObjects/LNLS/LNLSDetDistMotor.py +7 -11
- mxcubecore/HardwareObjects/LNLS/LNLSEnergy.py +4 -6
- mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +55 -51
- 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 -1
- mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffKappaMotor.py +3 -4
- mxcubecore/HardwareObjects/MiniDiff.py +35 -57
- mxcubecore/HardwareObjects/MotorWPositions.py +4 -2
- 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 -1
- 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 -1
- 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 -1
- mxcubecore/HardwareObjects/UserTypeISPyBLims.py +8 -8
- 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/AbstractMultiCollect.py +6 -6
- mxcubecore/HardwareObjects/abstract/AbstractNState.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractProcedure.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +5 -5
- mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +2 -0
- mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +11 -13
- mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py +3 -3
- mxcubecore/HardwareObjects/abstract/sample_changer/Crims.py +8 -0
- mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +12 -13
- 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/TaskUtils.py +2 -0
- mxcubecore/queue_entry/base_queue_entry.py +2 -2
- mxcubecore/queue_entry/energy_scan.py +1 -1
- mxcubecore/saferef.py +2 -1
- mxcubecore/utils/qt_import.py +8 -7
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/RECORD +195 -195
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/WHEEL +0 -0
|
@@ -63,7 +63,7 @@ class TINEMotor(AbstractMotor):
|
|
|
63
63
|
if self.get_property("default_limits"):
|
|
64
64
|
self.update_limits(eval(self.get_property("default_limits")))
|
|
65
65
|
except Exception:
|
|
66
|
-
|
|
66
|
+
self.log.exception("")
|
|
67
67
|
|
|
68
68
|
self.chan_position = self.get_channel_object("axisPosition")
|
|
69
69
|
if self.chan_position is not None:
|
|
@@ -92,7 +92,7 @@ class TINEMotor(AbstractMotor):
|
|
|
92
92
|
try:
|
|
93
93
|
self.step_limits = eval(self.get_property("stepLimits"))
|
|
94
94
|
except Exception:
|
|
95
|
-
|
|
95
|
+
self.log.exception("")
|
|
96
96
|
|
|
97
97
|
def connected(self):
|
|
98
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")
|
|
@@ -69,7 +69,7 @@ class ESRFBeamlineActions(BeamlineActions):
|
|
|
69
69
|
action = getattr(controller, key)
|
|
70
70
|
self.ctrl_list.append(ControllerCommand(name, action))
|
|
71
71
|
except KeyError:
|
|
72
|
-
|
|
72
|
+
self.log.exception("")
|
|
73
73
|
|
|
74
74
|
try:
|
|
75
75
|
hwobj_cmd_roles = ast.literal_eval(
|
|
@@ -86,7 +86,7 @@ class ESRFBeamlineActions(BeamlineActions):
|
|
|
86
86
|
except:
|
|
87
87
|
pass
|
|
88
88
|
except AttributeError:
|
|
89
|
-
|
|
89
|
+
self.log.exception("")
|
|
90
90
|
|
|
91
91
|
def get_commands(self):
|
|
92
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)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""ESRF SC3 Sample Changer Hardware Object"""
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
|
-
import logging
|
|
5
4
|
|
|
6
5
|
import SC3
|
|
7
6
|
|
|
@@ -40,7 +39,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
40
39
|
try:
|
|
41
40
|
self.operationalFlagsChanged(chan)
|
|
42
41
|
except Exception:
|
|
43
|
-
|
|
42
|
+
self.log.exception(
|
|
44
43
|
"%s: error getting SC vs MD operational flags" % self.name()
|
|
45
44
|
)
|
|
46
45
|
|
|
@@ -53,7 +52,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
53
52
|
|
|
54
53
|
def __getSample(self, sample_id, sample_location):
|
|
55
54
|
if sample_id and sample_location:
|
|
56
|
-
|
|
55
|
+
self.log.debug(
|
|
57
56
|
"%s: both sample barcode and location provided, discarding barcode...",
|
|
58
57
|
self.name(),
|
|
59
58
|
)
|
|
@@ -103,10 +102,10 @@ class ESRFSC3(SC3.SC3):
|
|
|
103
102
|
)
|
|
104
103
|
|
|
105
104
|
if loaded:
|
|
106
|
-
|
|
105
|
+
self.log.debug("%s: sample is loaded", self.name())
|
|
107
106
|
|
|
108
107
|
if self.prepareCentringAfterLoad and prepareCentring:
|
|
109
|
-
|
|
108
|
+
self.log.debug(
|
|
110
109
|
"%s: preparing minidiff for sample centring", self.name()
|
|
111
110
|
)
|
|
112
111
|
self.emit("stateChanged", SC3.SampleChangerState.Moving)
|
|
@@ -125,7 +124,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
125
124
|
pass
|
|
126
125
|
|
|
127
126
|
def __load_sample(self, holderLength, sample_id, sample_location):
|
|
128
|
-
|
|
127
|
+
self.log.debug("%s: in load_sample", self.name())
|
|
129
128
|
|
|
130
129
|
sample = self.__getSample(sample_id, sample_location)
|
|
131
130
|
|
|
@@ -134,7 +133,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
134
133
|
|
|
135
134
|
if not holderLength:
|
|
136
135
|
holderLength = 22
|
|
137
|
-
|
|
136
|
+
self.log.debug(
|
|
138
137
|
"%s: loading sample: using default holder length (%d mm)",
|
|
139
138
|
self.name(),
|
|
140
139
|
holderLength,
|
|
@@ -185,9 +184,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
185
184
|
)
|
|
186
185
|
|
|
187
186
|
if unloaded:
|
|
188
|
-
|
|
189
|
-
"%s: sample has been unloaded", self.name()
|
|
190
|
-
)
|
|
187
|
+
self.log.debug("%s: sample has been unloaded", self.name())
|
|
191
188
|
|
|
192
189
|
self.emit("statusChanged", "Ready")
|
|
193
190
|
|
|
@@ -199,7 +196,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
199
196
|
|
|
200
197
|
if not holderLength:
|
|
201
198
|
holderLength = 22
|
|
202
|
-
|
|
199
|
+
self.log.debug(
|
|
203
200
|
"%s: unloading sample: using default holder length (%d mm)",
|
|
204
201
|
self.name(),
|
|
205
202
|
holderLength,
|
|
@@ -236,9 +233,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
236
233
|
try:
|
|
237
234
|
val = int(val)
|
|
238
235
|
except Exception:
|
|
239
|
-
|
|
240
|
-
"%s: error reading operational flags" % self.name()
|
|
241
|
-
)
|
|
236
|
+
self.log.exception("%s: error reading operational flags" % self.name())
|
|
242
237
|
return
|
|
243
238
|
|
|
244
239
|
old_sc_can_load = self.lastOperationalFlags & ESRFSC3.FLAG_SC_CAN_LOAD
|
|
@@ -274,9 +269,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
274
269
|
try:
|
|
275
270
|
self.unlockMinidiffMotors()
|
|
276
271
|
except Exception:
|
|
277
|
-
|
|
278
|
-
"%s: error unlocking minidiff motors" % self.name()
|
|
279
|
-
)
|
|
272
|
+
self.log.exception("%s: error unlocking minidiff motors" % self.name())
|
|
280
273
|
return False
|
|
281
274
|
return True
|
|
282
275
|
|
|
@@ -285,7 +278,7 @@ class ESRFSC3(SC3.SC3):
|
|
|
285
278
|
try:
|
|
286
279
|
r=self._moveToLoadingPosition()
|
|
287
280
|
except:
|
|
288
|
-
|
|
281
|
+
self.log.exception("%s: error moving sample changer to loading position" % self.name())
|
|
289
282
|
return False
|
|
290
283
|
return True
|
|
291
284
|
"""
|
|
@@ -26,9 +26,7 @@ class ID29HutchTrigger(BaseHardwareObjects.HardwareObject):
|
|
|
26
26
|
self.device = PyTango.gevent.DeviceProxy(self.get_property("tangoname"))
|
|
27
27
|
except PyTango.DevFailed as traceback:
|
|
28
28
|
last_error = traceback[-1]
|
|
29
|
-
|
|
30
|
-
"%s: %s", str(self.name()), last_error["desc"]
|
|
31
|
-
)
|
|
29
|
+
self.log.error("%s: %s", str(self.name()), last_error["desc"])
|
|
32
30
|
self.device = None
|
|
33
31
|
|
|
34
32
|
self.pollingTask = None
|
|
@@ -42,6 +40,8 @@ class ID29HutchTrigger(BaseHardwareObjects.HardwareObject):
|
|
|
42
40
|
self.card, self.channel = map(int, PSSinfo.split("/"))
|
|
43
41
|
except Exception:
|
|
44
42
|
logging.getLogger().error("%s: cannot find PSS number", self.name())
|
|
43
|
+
|
|
44
|
+
self.log.exception("")
|
|
45
45
|
return
|
|
46
46
|
|
|
47
47
|
if self.device is not None:
|
|
@@ -22,7 +22,7 @@ class MD2MultiCollect(ESRFMultiCollect):
|
|
|
22
22
|
comment = HWR.beamline.sample_changer.get_crystal_id()
|
|
23
23
|
data_collect_parameters["comment"] = comment
|
|
24
24
|
except Exception:
|
|
25
|
-
|
|
25
|
+
self.log.exception("")
|
|
26
26
|
|
|
27
27
|
@task
|
|
28
28
|
def get_beam_size(self):
|
|
@@ -67,7 +67,7 @@ class MD2MultiCollect(ESRFMultiCollect):
|
|
|
67
67
|
try:
|
|
68
68
|
diffr.open_detector_cover()
|
|
69
69
|
except Exception:
|
|
70
|
-
|
|
70
|
+
self.log.exception("Could not open detector cover")
|
|
71
71
|
"""
|
|
72
72
|
try:
|
|
73
73
|
detcover = self.get_object_by_role("controller").detcover
|
|
@@ -75,7 +75,7 @@ class MD2MultiCollect(ESRFMultiCollect):
|
|
|
75
75
|
if detcover.state == "IN":
|
|
76
76
|
detcover.set_out(10)
|
|
77
77
|
except:
|
|
78
|
-
|
|
78
|
+
self.log.exception("Could not open detector cover")
|
|
79
79
|
"""
|
|
80
80
|
|
|
81
81
|
# send again the command as MD2 software only handles one
|
|
@@ -114,7 +114,7 @@ class MD2MultiCollect(ESRFMultiCollect):
|
|
|
114
114
|
|
|
115
115
|
if sequence_trigger:
|
|
116
116
|
msg = "Using LIMA sequnce trigger mode for Eiger"
|
|
117
|
-
|
|
117
|
+
self.log.info(msg)
|
|
118
118
|
mesh_total_nb_frames = self.mesh_num_lines
|
|
119
119
|
else:
|
|
120
120
|
mesh_total_nb_frames = self.mesh_total_nb_frames
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import json
|
|
2
|
-
import logging
|
|
3
2
|
import pathlib
|
|
4
3
|
|
|
5
4
|
from mxcubecore import HardwareRepository as HWR
|
|
@@ -18,7 +17,7 @@ class SSXICATLIMS(ICATLIMS):
|
|
|
18
17
|
pass
|
|
19
18
|
|
|
20
19
|
def finalize_data_collection(self, parameters):
|
|
21
|
-
|
|
20
|
+
self.log.info("Storing data to ICAT")
|
|
22
21
|
collection_parameters = parameters["collection_parameters"]
|
|
23
22
|
beamline_parameters = parameters["beamline_parameters"]
|
|
24
23
|
data_path = parameters["data_path"]
|
|
@@ -32,10 +31,14 @@ class SSXICATLIMS(ICATLIMS):
|
|
|
32
31
|
"MX_beamSizeAtSampleY": beamline_parameters.beam_size_y,
|
|
33
32
|
"MX_detectorDistance": beamline_parameters.detector_distance,
|
|
34
33
|
"MX_directory": data_path,
|
|
35
|
-
"MX_exposureTime":
|
|
34
|
+
"MX_exposureTime": (
|
|
35
|
+
collection_parameters.user_collection_parameters.exp_time
|
|
36
|
+
),
|
|
36
37
|
"MX_flux": extra_lims_values.flux_start,
|
|
37
38
|
"MX_fluxEnd": extra_lims_values.flux_end,
|
|
38
|
-
"MX_numberOfImages":
|
|
39
|
+
"MX_numberOfImages": (
|
|
40
|
+
collection_parameters.collection_parameters.num_images
|
|
41
|
+
),
|
|
39
42
|
"MX_resolution": beamline_parameters.resolution,
|
|
40
43
|
"MX_transmission": beamline_parameters.transmission,
|
|
41
44
|
"MX_xBeam": beamline_parameters.beam_x,
|
|
@@ -63,7 +66,7 @@ class SSXICATLIMS(ICATLIMS):
|
|
|
63
66
|
icat_metadata_path = pathlib.Path(data_path) / "metadata.json"
|
|
64
67
|
with open(icat_metadata_path, "w") as f:
|
|
65
68
|
f.write(json.dumps(data, indent=4))
|
|
66
|
-
|
|
69
|
+
self.log.info(f"Wrote {icat_metadata_path}")
|
|
67
70
|
|
|
68
71
|
except Exception as e:
|
|
69
|
-
|
|
72
|
+
self.log.exception("Failed uploading to ICAT (%s)", e)
|
|
@@ -97,12 +97,12 @@ class EdnaWorkflow(HardwareObject):
|
|
|
97
97
|
return self.command_failed
|
|
98
98
|
|
|
99
99
|
def set_command_failed(self, *args):
|
|
100
|
-
|
|
100
|
+
self.log.error("Workflow '%s' Tango command failed!", args[1])
|
|
101
101
|
self.command_failed = True
|
|
102
102
|
|
|
103
103
|
def state_changed(self, new_value):
|
|
104
104
|
new_value = str(new_value)
|
|
105
|
-
|
|
105
|
+
self.log.debug(f"{self.name}: state changed to {new_value}")
|
|
106
106
|
self.emit("stateChanged", (new_value,))
|
|
107
107
|
|
|
108
108
|
def workflow_end(self):
|
|
@@ -155,7 +155,7 @@ class EdnaWorkflow(HardwareObject):
|
|
|
155
155
|
|
|
156
156
|
def abort(self):
|
|
157
157
|
self.generateNewToken()
|
|
158
|
-
|
|
158
|
+
self.log.info("Aborting current workflow")
|
|
159
159
|
# If necessary unblock dialog
|
|
160
160
|
if not self.gevent_event.is_set():
|
|
161
161
|
self.gevent_event.set()
|
|
@@ -164,11 +164,11 @@ class EdnaWorkflow(HardwareObject):
|
|
|
164
164
|
abort_URL = (
|
|
165
165
|
f"http://{self.bes_host}:{self.bes_port}/ABORT/{self.bes_workflow_id}"
|
|
166
166
|
)
|
|
167
|
-
|
|
167
|
+
self.log.info("BES abort web service URL: %r", abort_URL)
|
|
168
168
|
response = requests.get(abort_URL)
|
|
169
169
|
if response.status_code == 200:
|
|
170
170
|
workflow_status = response.text
|
|
171
|
-
|
|
171
|
+
self.log.info(
|
|
172
172
|
"BES workflow id %s: %s", self.bes_workflow_id, workflow_status
|
|
173
173
|
)
|
|
174
174
|
self.state.value = "ON"
|
|
@@ -221,7 +221,7 @@ class EdnaWorkflow(HardwareObject):
|
|
|
221
221
|
|
|
222
222
|
xml_rpc_server = HWR.beamline.xml_rpc_server
|
|
223
223
|
if xml_rpc_server is None:
|
|
224
|
-
|
|
224
|
+
self.log.warning("No XMLRPCServer configured")
|
|
225
225
|
return
|
|
226
226
|
|
|
227
227
|
logging.info(
|
|
@@ -256,15 +256,13 @@ class EdnaWorkflow(HardwareObject):
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
start_URL = f"http://{self.bes_host}:{self.bes_port}/RUN/{self.workflow_name}"
|
|
259
|
-
|
|
259
|
+
self.log.info("BES start URL: %r", start_URL)
|
|
260
260
|
response = requests.post(start_URL, json=self.dict_parameters)
|
|
261
261
|
if response.status_code == 200:
|
|
262
262
|
self.state.value = "RUNNING"
|
|
263
263
|
request_id = response.text
|
|
264
|
-
|
|
265
|
-
"Workflow started, BES request id: %r", request_id
|
|
266
|
-
)
|
|
264
|
+
self.log.info("Workflow started, BES request id: %r", request_id)
|
|
267
265
|
self.bes_workflow_id = request_id
|
|
268
266
|
else:
|
|
269
|
-
|
|
267
|
+
self.log.error("Workflow didn't start!")
|
|
270
268
|
self.state.value = "ON"
|
|
@@ -36,22 +36,22 @@ class Energy(HardwareObject):
|
|
|
36
36
|
try:
|
|
37
37
|
self.energy_motor = self.get_object_by_role("energy")
|
|
38
38
|
except KeyError:
|
|
39
|
-
|
|
39
|
+
self.log.warning("Energy: error initializing energy motor")
|
|
40
40
|
|
|
41
41
|
try:
|
|
42
42
|
self.default_en = self.get_property("default_energy")
|
|
43
43
|
except KeyError:
|
|
44
|
-
|
|
44
|
+
self.log.warning("Energy: no default energy")
|
|
45
45
|
|
|
46
46
|
try:
|
|
47
47
|
self.tunable = self.get_property("tunable_energy")
|
|
48
48
|
except KeyError:
|
|
49
|
-
|
|
49
|
+
self.log.warning("Energy: will set to fixed energy")
|
|
50
50
|
|
|
51
51
|
try:
|
|
52
52
|
self.ctrl = self.get_object_by_role("controller")
|
|
53
53
|
except KeyError:
|
|
54
|
-
|
|
54
|
+
self.log.info("No controller used")
|
|
55
55
|
|
|
56
56
|
if self.energy_motor is not None:
|
|
57
57
|
self.energy_motor.connect("valueChanged", self.energyPositionChanged)
|
|
@@ -65,9 +65,7 @@ class Energy(HardwareObject):
|
|
|
65
65
|
try:
|
|
66
66
|
return self.energy_motor.get_value()
|
|
67
67
|
except Exception:
|
|
68
|
-
|
|
69
|
-
"EnergyHO: could not read current energy"
|
|
70
|
-
)
|
|
68
|
+
self.log.exception("EnergyHO: could not read current energy")
|
|
71
69
|
return None
|
|
72
70
|
return self.default_en
|
|
73
71
|
|
|
@@ -78,7 +76,7 @@ class Energy(HardwareObject):
|
|
|
78
76
|
return None
|
|
79
77
|
|
|
80
78
|
def get_limits(self):
|
|
81
|
-
|
|
79
|
+
self.log.debug("Get energy limits")
|
|
82
80
|
if not self.tunable:
|
|
83
81
|
energy = self.get_value()
|
|
84
82
|
return (energy, energy)
|
|
@@ -88,14 +86,12 @@ class Energy(HardwareObject):
|
|
|
88
86
|
self.en_lims = self.energy_motor.get_limits()
|
|
89
87
|
return self.en_lims
|
|
90
88
|
except Exception:
|
|
91
|
-
|
|
92
|
-
"EnergyHO: could not read energy motor limits"
|
|
93
|
-
)
|
|
89
|
+
self.log.exception("EnergyHO: could not read energy motor limits")
|
|
94
90
|
return None
|
|
95
91
|
return None
|
|
96
92
|
|
|
97
93
|
def get_wavelength_limits(self):
|
|
98
|
-
|
|
94
|
+
self.log.debug("Get wavelength limits")
|
|
99
95
|
if not self.tunable:
|
|
100
96
|
return None
|
|
101
97
|
self.en_lims = self.get_limits()
|
|
@@ -154,16 +150,16 @@ class Energy(HardwareObject):
|
|
|
154
150
|
self.emit("moveEnergyFinished", ())
|
|
155
151
|
|
|
156
152
|
def checkLimits(self, value):
|
|
157
|
-
|
|
153
|
+
self.log.debug("Checking the move limits")
|
|
158
154
|
if self.get_limits():
|
|
159
155
|
if value >= self.en_lims[0] and value <= self.en_lims[1]:
|
|
160
|
-
|
|
156
|
+
self.log.info("Limits ok")
|
|
161
157
|
return True
|
|
162
158
|
logging.getLogger("user_level_log").info("Requested value is out of limits")
|
|
163
159
|
return False
|
|
164
160
|
|
|
165
161
|
# def start_move_wavelength(self, value, wait=True):
|
|
166
|
-
#
|
|
162
|
+
# self.log.info("Moving wavelength to (%s)" % value)
|
|
167
163
|
# return self.startMoveEnergy(12.3984 / value, wait)
|
|
168
164
|
|
|
169
165
|
def cancelMoveEnergy(self):
|
|
@@ -35,7 +35,6 @@ differ from the default ones.
|
|
|
35
35
|
<use_global_state>False</use_global_state>
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
|
-
import logging
|
|
39
38
|
import math
|
|
40
39
|
import sys
|
|
41
40
|
|
|
@@ -194,7 +193,7 @@ class ExporterMotor(AbstractMotor):
|
|
|
194
193
|
_val = self.motor_position_chan.get_value()
|
|
195
194
|
|
|
196
195
|
if _val is None or math.isnan(_val):
|
|
197
|
-
|
|
196
|
+
self.log.debug("Value of %s is NaN" % self.actuator_name)
|
|
198
197
|
_val = self._nominal_value
|
|
199
198
|
|
|
200
199
|
self._nominal_value = _val
|