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
|
@@ -44,7 +44,6 @@ Specific HwObj for M2D2 diffractometer @ ALBA
|
|
|
44
44
|
- None
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
|
-
import logging
|
|
48
47
|
import time
|
|
49
48
|
|
|
50
49
|
import gevent
|
|
@@ -81,7 +80,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
81
80
|
self.super_hwobj = self.get_object_by_role("beamline-supervisor")
|
|
82
81
|
|
|
83
82
|
if self.centring_hwobj is None:
|
|
84
|
-
|
|
83
|
+
self.log.debug("ALBAMinidiff: Centring math is not defined")
|
|
85
84
|
|
|
86
85
|
if self.super_hwobj is not None:
|
|
87
86
|
self.connect(
|
|
@@ -110,7 +109,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
110
109
|
)
|
|
111
110
|
self.connect(self.phi_motor_hwobj, "valueChanged", self.phi_motor_moved)
|
|
112
111
|
else:
|
|
113
|
-
|
|
112
|
+
self.log.error("ALBAMiniDiff: Phi motor is not defined")
|
|
114
113
|
|
|
115
114
|
if self.phiz_motor_hwobj is not None:
|
|
116
115
|
self.connect(
|
|
@@ -118,7 +117,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
118
117
|
)
|
|
119
118
|
self.connect(self.phiz_motor_hwobj, "valueChanged", self.phiz_motor_moved)
|
|
120
119
|
else:
|
|
121
|
-
|
|
120
|
+
self.log.error("ALBAMiniDiff: Phiz motor is not defined")
|
|
122
121
|
|
|
123
122
|
if self.phiy_motor_hwobj is not None:
|
|
124
123
|
self.connect(
|
|
@@ -126,7 +125,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
126
125
|
)
|
|
127
126
|
self.connect(self.phiy_motor_hwobj, "valueChanged", self.phiy_motor_moved)
|
|
128
127
|
else:
|
|
129
|
-
|
|
128
|
+
self.log.error("ALBAMiniDiff: Phiy motor is not defined")
|
|
130
129
|
|
|
131
130
|
if self.zoom_motor_hwobj is not None:
|
|
132
131
|
self.connect(
|
|
@@ -141,7 +140,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
141
140
|
self.zoom_motor_hwobj, "stateChanged", self.zoom_motor_state_changed
|
|
142
141
|
)
|
|
143
142
|
else:
|
|
144
|
-
|
|
143
|
+
self.log.error("ALBAMiniDiff: Zoom motor is not defined")
|
|
145
144
|
|
|
146
145
|
if self.sample_x_motor_hwobj is not None:
|
|
147
146
|
self.connect(
|
|
@@ -153,7 +152,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
153
152
|
self.sample_x_motor_hwobj, "valueChanged", self.sampleX_motor_moved
|
|
154
153
|
)
|
|
155
154
|
else:
|
|
156
|
-
|
|
155
|
+
self.log.error("ALBAMiniDiff: Sampx motor is not defined")
|
|
157
156
|
|
|
158
157
|
if self.sample_y_motor_hwobj is not None:
|
|
159
158
|
self.connect(
|
|
@@ -165,7 +164,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
165
164
|
self.sample_y_motor_hwobj, "valueChanged", self.sampleY_motor_moved
|
|
166
165
|
)
|
|
167
166
|
else:
|
|
168
|
-
|
|
167
|
+
self.log.error("ALBAMiniDiff: Sampx motor is not defined")
|
|
169
168
|
|
|
170
169
|
if self.focus_motor_hwobj is not None:
|
|
171
170
|
self.connect(self.focus_motor_hwobj, "valueChanged", self.focus_motor_moved)
|
|
@@ -187,7 +186,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
187
186
|
state = DiffractometerState.tostring(DiffractometerState.Ready)
|
|
188
187
|
|
|
189
188
|
if state != self.current_state:
|
|
190
|
-
|
|
189
|
+
self.log.debug(
|
|
191
190
|
"ALBAMinidiff: State changed %s (was: %s)"
|
|
192
191
|
% (str(state), self.current_state)
|
|
193
192
|
)
|
|
@@ -242,9 +241,9 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
242
241
|
|
|
243
242
|
y = xy["Y"] * self.pixels_per_mm_y + self.zoom_centre["y"]
|
|
244
243
|
|
|
245
|
-
#
|
|
246
|
-
#
|
|
247
|
-
#
|
|
244
|
+
# self.log.debug(" motor_positions_to_screen ")
|
|
245
|
+
# self.log.debug(" positions = %s " % str(centred_positions_dict))
|
|
246
|
+
# self.log.debug(" x,y = %s, %s " % (x,y))
|
|
248
247
|
|
|
249
248
|
return x, y
|
|
250
249
|
|
|
@@ -297,9 +296,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
297
296
|
if self.prepare_centring():
|
|
298
297
|
GenericDiffractometer.start_manual_centring(self, *args, **kwargs)
|
|
299
298
|
else:
|
|
300
|
-
|
|
301
|
-
" Failed to prepare diffractometer for centring"
|
|
302
|
-
)
|
|
299
|
+
self.log.info(" Failed to prepare diffractometer for centring")
|
|
303
300
|
self.invalidate_centring()
|
|
304
301
|
|
|
305
302
|
def start_auto_centring(self, *args, **kwargs):
|
|
@@ -310,9 +307,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
310
307
|
if self.prepare_centring():
|
|
311
308
|
GenericDiffractometer.start_auto_centring(self, *args, **kwargs)
|
|
312
309
|
else:
|
|
313
|
-
|
|
314
|
-
" Failed to prepare diffractometer for centring"
|
|
315
|
-
)
|
|
310
|
+
self.log.info(" Failed to prepare diffractometer for centring")
|
|
316
311
|
self.invalidate_centring()
|
|
317
312
|
|
|
318
313
|
def prepare_centring(self):
|
|
@@ -320,12 +315,10 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
320
315
|
Prepare beamline for to sample_view phase.
|
|
321
316
|
"""
|
|
322
317
|
if not self.is_sample_view_phase():
|
|
323
|
-
|
|
324
|
-
" Not in sample view phase. Asking supervisor to go"
|
|
325
|
-
)
|
|
318
|
+
self.log.info(" Not in sample view phase. Asking supervisor to go")
|
|
326
319
|
success = self.go_sample_view()
|
|
327
320
|
if not success:
|
|
328
|
-
|
|
321
|
+
self.log.info("Cannot set SAMPLE VIEW phase")
|
|
329
322
|
return False
|
|
330
323
|
|
|
331
324
|
return True
|
|
@@ -341,10 +334,10 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
341
334
|
|
|
342
335
|
# # go to sample_view phase
|
|
343
336
|
# if not self.is_sample_view_phase():
|
|
344
|
-
#
|
|
337
|
+
# self.log.info(" Not in sample view phase. Asking supervisor to go")
|
|
345
338
|
# success = self.go_sample_view()
|
|
346
339
|
# if not success:
|
|
347
|
-
#
|
|
340
|
+
# self.log.info("Cannot set SAMPLE VIEW phase")
|
|
348
341
|
# return False
|
|
349
342
|
|
|
350
343
|
# phi_init_position = self.phi_motor_hwobj.get_value()
|
|
@@ -366,7 +359,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
366
359
|
# if click < 2:
|
|
367
360
|
# self.phi_motor_hwobj.set_value_relative(-90, timeout=None)
|
|
368
361
|
|
|
369
|
-
# #
|
|
362
|
+
# #self.log.info(" Returning phi to initial position %s" % phi_init_position)
|
|
370
363
|
# #self.phi_motor_hwobj.set_value(phi_init_position, timeout=None)
|
|
371
364
|
#
|
|
372
365
|
# return self.centring_hwobj.centeredPosition(return_by_name=False)
|
|
@@ -388,7 +381,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
388
381
|
while True:
|
|
389
382
|
super_state = str(self.super_hwobj.get_state()).upper()
|
|
390
383
|
if super_state != "MOVING":
|
|
391
|
-
|
|
384
|
+
self.log.debug(
|
|
392
385
|
"ALBAMinidiff: go_sample_view done . super_state is %s"
|
|
393
386
|
% super_state
|
|
394
387
|
)
|
|
@@ -550,7 +543,7 @@ class ALBAMiniDiff(GenericDiffractometer):
|
|
|
550
543
|
elif phase == "Centring":
|
|
551
544
|
self.super_hwobj.go_sample_view()
|
|
552
545
|
else:
|
|
553
|
-
|
|
546
|
+
self.log.warning(
|
|
554
547
|
"Diffractometer set_phase asked for un-handled phase: %s" % phase
|
|
555
548
|
)
|
|
556
549
|
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
from __future__ import print_function
|
|
21
21
|
|
|
22
|
-
import logging
|
|
23
22
|
import time
|
|
24
23
|
|
|
25
24
|
from PyTango.gevent import DeviceProxy
|
|
@@ -64,7 +63,7 @@ class ALBAPilatus(AbstractDetector, HardwareObject):
|
|
|
64
63
|
self.latency_time = None
|
|
65
64
|
|
|
66
65
|
if self.latency_time is None:
|
|
67
|
-
|
|
66
|
+
self.log.debug(
|
|
68
67
|
"Cannot obtain latency time from Pilatus XML. Using %s"
|
|
69
68
|
% self.default_latency_time
|
|
70
69
|
)
|
|
@@ -112,7 +111,7 @@ class ALBAPilatus(AbstractDetector, HardwareObject):
|
|
|
112
111
|
beam_x = self.beamx_chan.get_value()
|
|
113
112
|
beam_y = self.beamy_chan.get_value()
|
|
114
113
|
except Exception:
|
|
115
|
-
|
|
114
|
+
self.log.exception("")
|
|
116
115
|
return beam_x, beam_y
|
|
117
116
|
|
|
118
117
|
def get_manufacturer(self):
|
|
@@ -161,7 +160,7 @@ class ALBAPilatus(AbstractDetector, HardwareObject):
|
|
|
161
160
|
kev_diff = abs(det_energy - currentenergy)
|
|
162
161
|
|
|
163
162
|
if kev_diff > 1.2:
|
|
164
|
-
|
|
163
|
+
self.log.debug(
|
|
165
164
|
"programming energy_threshold on pilatus to: %s" % currentenergy
|
|
166
165
|
)
|
|
167
166
|
# if self.wait_standby():
|
|
@@ -197,19 +196,17 @@ class ALBAPilatus(AbstractDetector, HardwareObject):
|
|
|
197
196
|
trig_mode = "EXTERNAL_TRIGGER"
|
|
198
197
|
# latency_time = 0.003
|
|
199
198
|
|
|
200
|
-
|
|
199
|
+
self.log.debug(
|
|
201
200
|
" Preparing detector (dev=%s) for data collection" % self.devname
|
|
202
201
|
)
|
|
203
202
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
)
|
|
212
|
-
logging.getLogger("HWR").debug(" /latency_time : %s" % self.latency_time)
|
|
203
|
+
self.log.debug(" /saving directory: %s" % basedir)
|
|
204
|
+
self.log.debug(" /prefix : %s" % prefix)
|
|
205
|
+
self.log.debug(" /saving_format : %s" % fileformat)
|
|
206
|
+
self.log.debug(" /trigger_mode : %s" % trig_mode)
|
|
207
|
+
self.log.debug(" /acq_nb_frames : %s" % nb_frames)
|
|
208
|
+
self.log.debug(" /acq_expo_time : %s" % str(exp_time - self.latency_time))
|
|
209
|
+
self.log.debug(" /latency_time : %s" % self.latency_time)
|
|
213
210
|
|
|
214
211
|
self.device.write_attribute("saving_mode", "AUTO_FRAME")
|
|
215
212
|
self.device.write_attribute("saving_directory", basedir)
|
|
@@ -234,7 +231,7 @@ class ALBAPilatus(AbstractDetector, HardwareObject):
|
|
|
234
231
|
return True
|
|
235
232
|
|
|
236
233
|
def prepare_collection(self, nb_frames, first_img_no):
|
|
237
|
-
|
|
234
|
+
self.log.debug(
|
|
238
235
|
"ALBAPilatus. preparing collection. nb_images: %s, first_no: %s"
|
|
239
236
|
% (nb_frames, first_img_no)
|
|
240
237
|
)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import os
|
|
3
2
|
import time
|
|
4
3
|
|
|
@@ -53,9 +52,7 @@ class ALBASession(Session.Session):
|
|
|
53
52
|
# else:
|
|
54
53
|
# thedir = os.path.join(thedir, 'ARCHIVE')
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
"ALBASession. returning archive directory: %s" % archive_dir
|
|
58
|
-
)
|
|
55
|
+
self.log.debug("ALBASession. returning archive directory: %s" % archive_dir)
|
|
59
56
|
return archive_dir
|
|
60
57
|
|
|
61
58
|
def set_ldap_homedir(self, homedir):
|
|
@@ -56,8 +56,6 @@ Example Hardware Object XML file :
|
|
|
56
56
|
</object>
|
|
57
57
|
"""
|
|
58
58
|
|
|
59
|
-
import logging
|
|
60
|
-
|
|
61
59
|
import PyTango
|
|
62
60
|
|
|
63
61
|
from mxcubecore import BaseHardwareObjects
|
|
@@ -79,7 +77,7 @@ class ALBAZoomMotor(BaseHardwareObjects.Device, AbstractMotor):
|
|
|
79
77
|
super().__init__(name)
|
|
80
78
|
|
|
81
79
|
def init(self):
|
|
82
|
-
|
|
80
|
+
self.log.debug("Initializing zoom motor IOR")
|
|
83
81
|
self.positionChannel = self.get_channel_object("position")
|
|
84
82
|
self.stateChannel = self.get_channel_object("state")
|
|
85
83
|
self.labelsChannel = self.get_channel_object("labels")
|
|
@@ -98,22 +96,22 @@ class ALBAZoomMotor(BaseHardwareObjects.Device, AbstractMotor):
|
|
|
98
96
|
# retlist.append(int(pos))
|
|
99
97
|
pos = str(label.replace(":", " "))
|
|
100
98
|
retlist.append(pos)
|
|
101
|
-
|
|
99
|
+
self.log.debug("Zoom positions list: %s" % repr(retlist))
|
|
102
100
|
new_retlist = []
|
|
103
101
|
for n, e in enumerate(retlist):
|
|
104
102
|
name = e.split()
|
|
105
103
|
new_retlist.append("%s %s" % (n + 1, name[0]))
|
|
106
|
-
|
|
104
|
+
self.log.debug("Zoom positions list: %s" % repr(new_retlist))
|
|
107
105
|
|
|
108
106
|
# retlist = ["z1 1","z2 2"]
|
|
109
|
-
#
|
|
107
|
+
# self.log.debug("Zoom positions list: %s" % repr(retlist))
|
|
110
108
|
return new_retlist
|
|
111
109
|
|
|
112
110
|
def moveToPosition(self, posno):
|
|
113
111
|
no = posno.split()[0]
|
|
114
|
-
|
|
112
|
+
self.log.debug("type %s" % type(no))
|
|
115
113
|
# no = posno
|
|
116
|
-
|
|
114
|
+
self.log.debug("Moving to position %s" % no)
|
|
117
115
|
state = self.positionChannel.set_value(int(no))
|
|
118
116
|
|
|
119
117
|
def motorIsMoving(self):
|
|
@@ -148,16 +146,14 @@ class ALBAZoomMotor(BaseHardwareObjects.Device, AbstractMotor):
|
|
|
148
146
|
try:
|
|
149
147
|
n = int(self.positionChannel.get_value())
|
|
150
148
|
value = "%s z%s" % (n, n)
|
|
151
|
-
|
|
152
|
-
"get_current_position_name: %s" % repr(value)
|
|
153
|
-
)
|
|
149
|
+
self.log.debug("get_current_position_name: %s" % repr(value))
|
|
154
150
|
return value
|
|
155
151
|
except Exception:
|
|
156
|
-
|
|
152
|
+
self.log.debug("cannot get name zoom value")
|
|
157
153
|
return None
|
|
158
154
|
|
|
159
155
|
def stateChanged(self, state):
|
|
160
|
-
|
|
156
|
+
self.log.debug("stateChanged emitted: %s" % state)
|
|
161
157
|
the_state = self.get_state()
|
|
162
158
|
if the_state != self.currentstate:
|
|
163
159
|
self.currentstate = the_state
|
|
@@ -167,7 +163,7 @@ class ALBAZoomMotor(BaseHardwareObjects.Device, AbstractMotor):
|
|
|
167
163
|
previous_position = self.currentposition
|
|
168
164
|
self.currentposition = self.get_current_position_name()
|
|
169
165
|
if self.currentposition != previous_position:
|
|
170
|
-
|
|
166
|
+
self.log.debug(
|
|
171
167
|
"predefinedPositionChanged emitted: %s" % self.currentposition
|
|
172
168
|
)
|
|
173
169
|
self.emit("predefinedPositionChanged", (self.currentposition, 0))
|
|
@@ -49,8 +49,6 @@ Example Hardware Object XML file :
|
|
|
49
49
|
</object>
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
-
import logging
|
|
53
|
-
|
|
54
52
|
from mxcubecore import BaseHardwareObjects
|
|
55
53
|
from mxcubecore.HardwareObjects.abstract.AbstractMotor import AbstractMotor
|
|
56
54
|
|
|
@@ -70,7 +68,7 @@ class ALBAZoomMotorAutoBrightness(BaseHardwareObjects.HardwareObject, AbstractMo
|
|
|
70
68
|
super().__init__(name)
|
|
71
69
|
|
|
72
70
|
def init(self):
|
|
73
|
-
|
|
71
|
+
self.log.debug("Initializing zoom motor autobrightness IOR")
|
|
74
72
|
|
|
75
73
|
self.zoom = self.get_object_by_role("zoom")
|
|
76
74
|
self.blight = self.get_object_by_role("blight")
|
|
@@ -80,12 +78,12 @@ class ALBAZoomMotorAutoBrightness(BaseHardwareObjects.HardwareObject, AbstractMo
|
|
|
80
78
|
|
|
81
79
|
def get_predefined_positions_list(self):
|
|
82
80
|
retlist = self.zoom.get_predefined_positions_list()
|
|
83
|
-
|
|
81
|
+
self.log.debug("Zoom positions list: %s" % repr(retlist))
|
|
84
82
|
return retlist
|
|
85
83
|
|
|
86
84
|
def moveToPosition(self, posno):
|
|
87
85
|
# no = posno.split()[0]
|
|
88
|
-
#
|
|
86
|
+
# self.log.debug("Moving to position %s" % no)
|
|
89
87
|
|
|
90
88
|
# self.blight.moveToPosition(posno)
|
|
91
89
|
self.zoom.moveToPosition(posno)
|
|
@@ -124,22 +122,20 @@ class ALBAZoomMotorAutoBrightness(BaseHardwareObjects.HardwareObject, AbstractMo
|
|
|
124
122
|
def get_current_position_name(self):
|
|
125
123
|
# n = int(self.positionChannel.get_value())
|
|
126
124
|
# value = "%s z%s" % (n, n)
|
|
127
|
-
#
|
|
125
|
+
# self.log.debug("get_current_position_name: %s" % repr(value))
|
|
128
126
|
# return value
|
|
129
127
|
return self.zoom.get_current_position_name()
|
|
130
128
|
|
|
131
129
|
def stateChanged(self, state):
|
|
132
|
-
|
|
130
|
+
self.log.debug("stateChanged emitted: %s" % state)
|
|
133
131
|
self.emit("stateChanged", (self.get_state(),))
|
|
134
132
|
|
|
135
133
|
def positionChanged(self, currentposition):
|
|
136
134
|
currentposition = self.get_current_position_name()
|
|
137
|
-
|
|
138
|
-
"predefinedPositionChanged emitted: %s" % currentposition
|
|
139
|
-
)
|
|
135
|
+
self.log.debug("predefinedPositionChanged emitted: %s" % currentposition)
|
|
140
136
|
# Update light brightness step-by-step
|
|
141
137
|
posno = currentposition.split()[0]
|
|
142
|
-
|
|
138
|
+
self.log.debug("Moving brightness to: %s" % posno)
|
|
143
139
|
|
|
144
140
|
self.blight.moveToPosition(posno)
|
|
145
141
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import time
|
|
3
2
|
|
|
4
3
|
import gevent
|
|
@@ -15,7 +14,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
15
14
|
self.calibration = self.get_object_by_role("calibration")
|
|
16
15
|
self.centring_hwobj = self.get_object_by_role("centring")
|
|
17
16
|
if self.centring_hwobj is None:
|
|
18
|
-
|
|
17
|
+
self.log.debug("EMBLMinidiff: Centring math is not defined")
|
|
19
18
|
|
|
20
19
|
self.cmd_start_auto_focus = self.get_command_object("startAutoFocus")
|
|
21
20
|
|
|
@@ -33,7 +32,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
33
32
|
)
|
|
34
33
|
self.connect(self.phi_motor_hwobj, "valueChanged", self.phi_motor_moved)
|
|
35
34
|
else:
|
|
36
|
-
|
|
35
|
+
self.log.error("EMBLMiniDiff: Phi motor is not defined")
|
|
37
36
|
|
|
38
37
|
if self.phiz_motor_hwobj is not None:
|
|
39
38
|
self.connect(
|
|
@@ -41,7 +40,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
41
40
|
)
|
|
42
41
|
self.connect(self.phiz_motor_hwobj, "valueChanged", self.phiz_motor_moved)
|
|
43
42
|
else:
|
|
44
|
-
|
|
43
|
+
self.log.error("EMBLMiniDiff: Phiz motor is not defined")
|
|
45
44
|
|
|
46
45
|
if self.phiy_motor_hwobj is not None:
|
|
47
46
|
self.connect(
|
|
@@ -49,7 +48,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
49
48
|
)
|
|
50
49
|
self.connect(self.phiy_motor_hwobj, "valueChanged", self.phiy_motor_moved)
|
|
51
50
|
else:
|
|
52
|
-
|
|
51
|
+
self.log.error("EMBLMiniDiff: Phiy motor is not defined")
|
|
53
52
|
|
|
54
53
|
if self.zoom_motor_hwobj is not None:
|
|
55
54
|
self.connect(
|
|
@@ -64,7 +63,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
64
63
|
self.zoom_motor_hwobj, "stateChanged", self.zoom_motor_state_changed
|
|
65
64
|
)
|
|
66
65
|
else:
|
|
67
|
-
|
|
66
|
+
self.log.error("EMBLMiniDiff: Zoom motor is not defined")
|
|
68
67
|
|
|
69
68
|
if self.sample_x_motor_hwobj is not None:
|
|
70
69
|
self.connect(
|
|
@@ -76,7 +75,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
76
75
|
self.sample_x_motor_hwobj, "valueChanged", self.sampleX_motor_moved
|
|
77
76
|
)
|
|
78
77
|
else:
|
|
79
|
-
|
|
78
|
+
self.log.error("EMBLMiniDiff: Sampx motor is not defined")
|
|
80
79
|
|
|
81
80
|
if self.sample_y_motor_hwobj is not None:
|
|
82
81
|
self.connect(
|
|
@@ -88,7 +87,7 @@ class XalocMiniDiff(GenericDiffractometer):
|
|
|
88
87
|
self.sample_y_motor_hwobj, "valueChanged", self.sampleY_motor_moved
|
|
89
88
|
)
|
|
90
89
|
else:
|
|
91
|
-
|
|
90
|
+
self.log.error("EMBLMiniDiff: Sampx motor is not defined")
|
|
92
91
|
|
|
93
92
|
if self.focus_motor_hwobj is not None:
|
|
94
93
|
self.connect(self.focus_motor_hwobj, "valueChanged", self.focus_motor_moved)
|
|
@@ -19,8 +19,6 @@ beamPosChanged
|
|
|
19
19
|
-----------------------------------------------------------------------
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
import logging
|
|
23
|
-
|
|
24
22
|
from mxcubecore.BaseHardwareObjects import HardwareObject
|
|
25
23
|
|
|
26
24
|
|
|
@@ -66,20 +64,20 @@ class BeamInfo(HardwareObject):
|
|
|
66
64
|
self.aperture_hwobj, "apertureChanged", self.aperture_pos_changed
|
|
67
65
|
)
|
|
68
66
|
else:
|
|
69
|
-
|
|
67
|
+
self.log.debug("BeamInfo: Aperture hwobj not defined")
|
|
70
68
|
|
|
71
69
|
self.slits_hwobj = self.get_object_by_role("slits")
|
|
72
70
|
if self.slits_hwobj is not None:
|
|
73
71
|
self.connect(self.slits_hwobj, "gapSizeChanged", self.slits_gap_changed)
|
|
74
72
|
else:
|
|
75
|
-
|
|
73
|
+
self.log.debug("BeamInfo: Slits hwobj not defined")
|
|
76
74
|
|
|
77
75
|
if self.beam_definer is not None:
|
|
78
76
|
self.connect(
|
|
79
77
|
self.beam_definer, "definerPosChanged", self.definer_pos_changed
|
|
80
78
|
)
|
|
81
79
|
else:
|
|
82
|
-
|
|
80
|
+
self.log.debug("BeamInfo: Beam definer hwobj not defined")
|
|
83
81
|
|
|
84
82
|
default_beam_divergence_vertical = None
|
|
85
83
|
default_beam_divergence_horizontal = None
|
|
@@ -91,7 +89,7 @@ class BeamInfo(HardwareObject):
|
|
|
91
89
|
self.get_property("beam_divergence_horizontal")
|
|
92
90
|
)
|
|
93
91
|
except Exception:
|
|
94
|
-
|
|
92
|
+
self.log.exception("")
|
|
95
93
|
self.default_beam_divergence = [
|
|
96
94
|
default_beam_divergence_horizontal,
|
|
97
95
|
default_beam_divergence_vertical,
|
|
@@ -42,7 +42,6 @@ __copyright__ = """ Copyright © 2019 by the MXCuBE collaboration """
|
|
|
42
42
|
__license__ = "LGPLv3+"
|
|
43
43
|
__author__ = "Rasmus H Fogh"
|
|
44
44
|
|
|
45
|
-
import logging
|
|
46
45
|
|
|
47
46
|
from mxcubecore.BaseHardwareObjects import (
|
|
48
47
|
ConfiguredObject,
|
|
@@ -330,7 +329,7 @@ class Beamline(HardwareObject):
|
|
|
330
329
|
if acquisition_type != "default":
|
|
331
330
|
dd0 = self.config.default_acquisition_parameters.get(acquisition_type)
|
|
332
331
|
if dd0 is None:
|
|
333
|
-
|
|
332
|
+
self.log.warning(
|
|
334
333
|
"No separate parameters for acquisition type: %s - using default."
|
|
335
334
|
% acquisition_type
|
|
336
335
|
)
|
|
@@ -362,7 +361,7 @@ class Beamline(HardwareObject):
|
|
|
362
361
|
try:
|
|
363
362
|
acq_parameters.resolution = self.resolution.get_value()
|
|
364
363
|
except Exception:
|
|
365
|
-
|
|
364
|
+
self.log.warning(
|
|
366
365
|
"get_default_acquisition_parameters: "
|
|
367
366
|
"No current resolution, setting to 0.0"
|
|
368
367
|
)
|
|
@@ -371,7 +370,7 @@ class Beamline(HardwareObject):
|
|
|
371
370
|
try:
|
|
372
371
|
acq_parameters.energy = self.energy.get_value()
|
|
373
372
|
except Exception:
|
|
374
|
-
|
|
373
|
+
self.log.warning(
|
|
375
374
|
"get_default_acquisition_parameters: No current energy, setting to 0.0"
|
|
376
375
|
)
|
|
377
376
|
acq_parameters.energy = 0.0
|
|
@@ -379,7 +378,7 @@ class Beamline(HardwareObject):
|
|
|
379
378
|
try:
|
|
380
379
|
acq_parameters.transmission = self.transmission.get_value()
|
|
381
380
|
except Exception:
|
|
382
|
-
|
|
381
|
+
self.log.warning(
|
|
383
382
|
"get_default_acquisition_parameters: "
|
|
384
383
|
"No current transmission, setting to 0.0"
|
|
385
384
|
)
|
|
@@ -390,7 +389,7 @@ class Beamline(HardwareObject):
|
|
|
390
389
|
try:
|
|
391
390
|
acq_parameters.detector_binning_mode = self.detector.get_binning_mode()
|
|
392
391
|
except Exception:
|
|
393
|
-
|
|
392
|
+
self.log.warning(
|
|
394
393
|
"get_default_acquisition_parameters: "
|
|
395
394
|
"Could not get detector mode, setting to ''"
|
|
396
395
|
)
|
|
@@ -399,7 +398,7 @@ class Beamline(HardwareObject):
|
|
|
399
398
|
try:
|
|
400
399
|
acq_parameters.detector_roi_mode = self.detector.get_roi_mode()
|
|
401
400
|
except Exception:
|
|
402
|
-
|
|
401
|
+
self.log.warning(
|
|
403
402
|
"get_default_acquisition_parameters: "
|
|
404
403
|
"Could not get roi mode, setting to ''"
|
|
405
404
|
)
|
|
@@ -53,9 +53,7 @@ class ControllerCommand(CommandObject):
|
|
|
53
53
|
res = cmd_execution.get()
|
|
54
54
|
res = res if res else ""
|
|
55
55
|
except Exception:
|
|
56
|
-
|
|
57
|
-
"%s: execution failed", str(self.name())
|
|
58
|
-
)
|
|
56
|
+
self.log.exception("%s: execution failed", str(self.name()))
|
|
59
57
|
self.emit("commandFailed", (str(self.name()),))
|
|
60
58
|
else:
|
|
61
59
|
if isinstance(res, gevent.GreenletExit):
|
|
@@ -199,7 +197,7 @@ class BeamlineActions(HardwareObject):
|
|
|
199
197
|
"Command with name %s already exists"
|
|
200
198
|
% command["command"].split(".")[-1]
|
|
201
199
|
)
|
|
202
|
-
|
|
200
|
+
self.log.warning(msg)
|
|
203
201
|
continue
|
|
204
202
|
|
|
205
203
|
if command["type"] == "annotated":
|
|
@@ -292,9 +290,7 @@ class BeamlineActions(HardwareObject):
|
|
|
292
290
|
try:
|
|
293
291
|
result = greenlet.get()
|
|
294
292
|
except Exception:
|
|
295
|
-
|
|
296
|
-
"%s: execution failed", self._current_command.cmd_name
|
|
297
|
-
)
|
|
293
|
+
self.log.exception("%s: execution failed", self._current_command.cmd_name)
|
|
298
294
|
cmd_obj.emit("commandFailed", (self._current_command.cmd_name,))
|
|
299
295
|
else:
|
|
300
296
|
self._current_command.set_last_result(result)
|
|
@@ -44,9 +44,7 @@ class BlissHutchTrigger(BaseHardwareObjects.HardwareObject):
|
|
|
44
44
|
self.device = PyTango.gevent.DeviceProxy(self.get_property("pss_tangoname"))
|
|
45
45
|
except PyTango.DevFailed as traceback:
|
|
46
46
|
last_error = traceback[-1]
|
|
47
|
-
|
|
48
|
-
"%s: %s", str(self.name()), last_error["desc"]
|
|
49
|
-
)
|
|
47
|
+
self.log.error("%s: %s", str(self.name()), last_error["desc"])
|
|
50
48
|
self.device = None
|
|
51
49
|
|
|
52
50
|
self.pollingTask = None
|
|
@@ -60,6 +58,8 @@ class BlissHutchTrigger(BaseHardwareObjects.HardwareObject):
|
|
|
60
58
|
self.card, self.channel = map(int, PSSinfo.split("/"))
|
|
61
59
|
except Exception:
|
|
62
60
|
logging.getLogger().error("%s: cannot find PSS number", self.name())
|
|
61
|
+
|
|
62
|
+
self.log.exception("")
|
|
63
63
|
return
|
|
64
64
|
|
|
65
65
|
if self.device is not None:
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
from warnings import warn
|
|
3
2
|
|
|
4
3
|
from BlissMotor import BlissMotor
|
|
@@ -22,9 +21,7 @@ class BlissMotorWPositions(BlissMotor):
|
|
|
22
21
|
try:
|
|
23
22
|
positions = self["positions"]
|
|
24
23
|
except Exception:
|
|
25
|
-
|
|
26
|
-
"%s does not define positions.", str(self.name())
|
|
27
|
-
)
|
|
24
|
+
self.log.error("%s does not define positions.", str(self.name()))
|
|
28
25
|
else:
|
|
29
26
|
for definedPosition in positions:
|
|
30
27
|
positionUsername = definedPosition.get_property("username")
|
|
@@ -32,7 +29,7 @@ class BlissMotorWPositions(BlissMotor):
|
|
|
32
29
|
try:
|
|
33
30
|
offset = float(definedPosition.get_property("offset"))
|
|
34
31
|
except Exception:
|
|
35
|
-
|
|
32
|
+
self.log.warning(
|
|
36
33
|
"%s, ignoring position %s: invalid offset.",
|
|
37
34
|
str(self.name()),
|
|
38
35
|
positionUsername,
|
|
@@ -93,7 +90,7 @@ class BlissMotorWPositions(BlissMotor):
|
|
|
93
90
|
try:
|
|
94
91
|
self.set_value(self.predefinedPositions[positionName])
|
|
95
92
|
except Exception:
|
|
96
|
-
|
|
93
|
+
self.log.exception(
|
|
97
94
|
"Cannot move motor %s: invalid position name.", str(self.username)
|
|
98
95
|
)
|
|
99
96
|
|
|
@@ -116,4 +113,4 @@ class BlissMotorWPositions(BlissMotor):
|
|
|
116
113
|
self.predefinedPositions[str(positionName)] = float(positionOffset)
|
|
117
114
|
self.sortPredefinedPositionsList()
|
|
118
115
|
except Exception:
|
|
119
|
-
|
|
116
|
+
self.log.exception("Cannot set new predefined position")
|