mxcubecore 1.393.0__py3-none-any.whl → 1.394.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mxcubecore might be problematic. Click here for more details.
- mxcubecore/HardwareObjects/ALBA/ALBAAutoProcessing.py +4 -7
- mxcubecore/HardwareObjects/ALBA/ALBABackLight.py +6 -7
- mxcubecore/HardwareObjects/ALBA/ALBABeamInfo.py +2 -4
- mxcubecore/HardwareObjects/ALBA/ALBACats.py +19 -25
- mxcubecore/HardwareObjects/ALBA/ALBAClusterJob.py +10 -11
- mxcubecore/HardwareObjects/ALBA/ALBACollect.py +49 -71
- mxcubecore/HardwareObjects/ALBA/ALBADataAnalysis.py +26 -31
- mxcubecore/HardwareObjects/ALBA/ALBAEnergy.py +1 -5
- mxcubecore/HardwareObjects/ALBA/ALBAEpsActuator.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAFastShutter.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAFlux.py +2 -6
- mxcubecore/HardwareObjects/ALBA/ALBAFrontLight.py +5 -9
- mxcubecore/HardwareObjects/ALBA/ALBAISPyBClient.py +4 -4
- mxcubecore/HardwareObjects/ALBA/ALBAMiniDiff.py +20 -27
- mxcubecore/HardwareObjects/ALBA/ALBAPilatus.py +12 -15
- mxcubecore/HardwareObjects/ALBA/ALBASession.py +1 -4
- mxcubecore/HardwareObjects/ALBA/ALBAZoomMotor.py +10 -14
- mxcubecore/HardwareObjects/ALBA/ALBAZoomMotorAutoBrightness.py +7 -11
- mxcubecore/HardwareObjects/ALBA/XalocMiniDiff.py +7 -8
- mxcubecore/HardwareObjects/BeamInfo.py +4 -6
- mxcubecore/HardwareObjects/Beamline.py +6 -7
- mxcubecore/HardwareObjects/BeamlineActions.py +3 -7
- mxcubecore/HardwareObjects/BlissHutchTrigger.py +2 -4
- mxcubecore/HardwareObjects/BlissMotorWPositions.py +4 -7
- mxcubecore/HardwareObjects/Cats90.py +33 -43
- mxcubecore/HardwareObjects/CatsBessy.py +1 -2
- mxcubecore/HardwareObjects/CatsMaint.py +2 -2
- mxcubecore/HardwareObjects/CentringMath.py +5 -4
- mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +3 -5
- mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +1 -3
- mxcubecore/HardwareObjects/DESY/P11Collect.py +6 -8
- mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +14 -16
- mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +6 -10
- mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +5 -5
- mxcubecore/HardwareObjects/DataPublisher.py +2 -3
- mxcubecore/HardwareObjects/EDNACharacterisation.py +2 -4
- mxcubecore/HardwareObjects/EMBL/EMBLBeam.py +3 -3
- mxcubecore/HardwareObjects/EMBL/EMBLBeamCentering.py +2 -4
- mxcubecore/HardwareObjects/EMBL/EMBLBeamFocusing.py +3 -3
- mxcubecore/HardwareObjects/EMBL/EMBLDoorInterlock.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLEnergy.py +10 -18
- mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +9 -13
- mxcubecore/HardwareObjects/EMBL/EMBLFlux.py +10 -12
- mxcubecore/HardwareObjects/EMBL/EMBLMachineInfo.py +2 -2
- mxcubecore/HardwareObjects/EMBL/EMBLMiniDiff.py +18 -18
- mxcubecore/HardwareObjects/EMBL/EMBLMotorsGroup.py +6 -9
- mxcubecore/HardwareObjects/EMBL/EMBLOnlineProcessing.py +6 -6
- mxcubecore/HardwareObjects/EMBL/EMBLPPUControl.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLSSXChip.py +1 -4
- mxcubecore/HardwareObjects/EMBL/EMBLSlitBox.py +1 -3
- mxcubecore/HardwareObjects/EMBL/EMBLTableMotor.py +2 -3
- mxcubecore/HardwareObjects/EMBL/EMBLXRFSpectrum.py +4 -4
- mxcubecore/HardwareObjects/EMBL/EMBLXrayImaging.py +1 -1
- mxcubecore/HardwareObjects/EMBL/TINEMotor.py +2 -4
- mxcubecore/HardwareObjects/EMBLFlexHCD.py +5 -5
- mxcubecore/HardwareObjects/EMBLFlexHarvester.py +2 -2
- mxcubecore/HardwareObjects/ESRF/ESRFBeam.py +3 -5
- mxcubecore/HardwareObjects/ESRF/ESRFBeamInfo.py +1 -5
- mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py +2 -3
- mxcubecore/HardwareObjects/ESRF/ESRFEnergyScan.py +3 -3
- mxcubecore/HardwareObjects/ESRF/ESRFMultiCollect.py +7 -7
- mxcubecore/HardwareObjects/ESRF/ESRFPhotonFlux.py +2 -8
- mxcubecore/HardwareObjects/ESRF/ESRFSC3.py +11 -18
- mxcubecore/HardwareObjects/ESRF/ID29HutchTrigger.py +2 -4
- mxcubecore/HardwareObjects/ESRF/MD2MultiCollect.py +4 -4
- mxcubecore/HardwareObjects/ESRF/SSXICATLIMS.py +9 -6
- mxcubecore/HardwareObjects/EdnaWorkflow.py +9 -11
- mxcubecore/HardwareObjects/Energy.py +11 -15
- mxcubecore/HardwareObjects/ExporterMotor.py +1 -2
- mxcubecore/HardwareObjects/FlexHCD.py +7 -8
- mxcubecore/HardwareObjects/FlexHCDMaintenance.py +1 -2
- mxcubecore/HardwareObjects/GenericDiffractometer.py +26 -46
- mxcubecore/HardwareObjects/Gphl/CollectEmulator.py +6 -7
- mxcubecore/HardwareObjects/Gphl/GphlQueueEntry.py +2 -2
- mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py +29 -43
- mxcubecore/HardwareObjects/Gphl/GphlWorkflowConnection.py +25 -35
- mxcubecore/HardwareObjects/ICATLIMS.py +17 -13
- mxcubecore/HardwareObjects/LNLS/EPICSMotor.py +1 -4
- mxcubecore/HardwareObjects/LNLS/LNLSAperture.py +2 -5
- mxcubecore/HardwareObjects/LNLS/LNLSCamera.py +14 -16
- mxcubecore/HardwareObjects/LNLS/LNLSCollect.py +20 -30
- mxcubecore/HardwareObjects/LNLS/LNLSDetDistMotor.py +7 -11
- mxcubecore/HardwareObjects/LNLS/LNLSEnergy.py +4 -6
- mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +49 -57
- mxcubecore/HardwareObjects/LNLS/LNLSTransmission.py +4 -7
- mxcubecore/HardwareObjects/LdapAuthenticator.py +11 -15
- mxcubecore/HardwareObjects/Lima2Detector.py +1 -1
- mxcubecore/HardwareObjects/LimaEigerDetector.py +1 -1
- mxcubecore/HardwareObjects/LimaPilatusDetector.py +1 -4
- mxcubecore/HardwareObjects/MAXIV/MAXIVAutoProcessing.py +3 -5
- mxcubecore/HardwareObjects/MD3UP.py +1 -2
- mxcubecore/HardwareObjects/MachCurrent.py +5 -5
- mxcubecore/HardwareObjects/Marvin.py +23 -35
- mxcubecore/HardwareObjects/Microdiff.py +6 -8
- mxcubecore/HardwareObjects/MicrodiffActuator.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffBeamstop.py +1 -3
- mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffKappaMotor.py +3 -4
- mxcubecore/HardwareObjects/MiniDiff.py +35 -57
- mxcubecore/HardwareObjects/MotorWPositions.py +3 -3
- mxcubecore/HardwareObjects/PlateManipulator.py +2 -2
- mxcubecore/HardwareObjects/ProposalTypeISPyBLims.py +8 -16
- mxcubecore/HardwareObjects/PyISPyBClient.py +8 -5
- mxcubecore/HardwareObjects/QtGraphicsLib.py +2 -2
- mxcubecore/HardwareObjects/QtGraphicsManager.py +13 -19
- mxcubecore/HardwareObjects/QtInstanceServer.py +27 -55
- mxcubecore/HardwareObjects/QtLimaVideo.py +1 -5
- mxcubecore/HardwareObjects/QueueManager.py +7 -9
- mxcubecore/HardwareObjects/QueueModel.py +6 -8
- mxcubecore/HardwareObjects/RedisClient.py +12 -16
- mxcubecore/HardwareObjects/SC3.py +1 -2
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Attenuator.py +1 -3
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1BeamInfo.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1CatsMaint.py +3 -4
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Collect.py +11 -11
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Cryotong.py +8 -18
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Energy.py +6 -7
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1EnergyScan.py +21 -31
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Environment.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1MiniDiff.py +11 -21
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pilatus.py +9 -9
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pss.py +1 -2
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Resolution.py +1 -5
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1TangoLight.py +3 -8
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Attenuator.py +9 -13
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Collect.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Diffractometer.py +22 -22
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Energy.py +4 -6
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Guillotine.py +2 -2
- mxcubecore/HardwareObjects/SOLEIL/SOLEILCatsMaint.py +6 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILEnergyScan.py +44 -56
- mxcubecore/HardwareObjects/SOLEIL/SOLEILGuillotine.py +2 -2
- mxcubecore/HardwareObjects/SOLEIL/SOLEILISPyBClient.py +10 -10
- mxcubecore/HardwareObjects/SOLEIL/SOLEILMachineInfo.py +4 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILPss.py +3 -4
- mxcubecore/HardwareObjects/SOLEIL/SOLEILRuche.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/TangoDCMotor.py +10 -16
- mxcubecore/HardwareObjects/SardanaMotor.py +4 -5
- mxcubecore/HardwareObjects/Session.py +1 -2
- mxcubecore/HardwareObjects/SpecMotorWPositions.py +5 -9
- mxcubecore/HardwareObjects/SpecMotorWSpecPositions.py +2 -4
- mxcubecore/HardwareObjects/SpecShell.py +7 -9
- mxcubecore/HardwareObjects/SpecState.py +5 -7
- mxcubecore/HardwareObjects/StateMachine.py +9 -10
- mxcubecore/HardwareObjects/TangoLimaMpegVideo.py +2 -3
- mxcubecore/HardwareObjects/TangoLimaVideo.py +3 -4
- mxcubecore/HardwareObjects/TangoMachineInfo.py +1 -3
- mxcubecore/HardwareObjects/TangoMotor.py +1 -3
- mxcubecore/HardwareObjects/UserTypeISPyBLims.py +7 -9
- mxcubecore/HardwareObjects/XMLRPCServer.py +19 -21
- mxcubecore/HardwareObjects/abstract/AbstractAperture.py +6 -11
- mxcubecore/HardwareObjects/abstract/AbstractCollect.py +6 -16
- mxcubecore/HardwareObjects/abstract/AbstractDetector.py +2 -7
- mxcubecore/HardwareObjects/abstract/AbstractEnergyScan.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractLims.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractNState.py +1 -2
- mxcubecore/HardwareObjects/abstract/AbstractProcedure.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +4 -4
- mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +1 -1
- mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +11 -13
- mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +11 -14
- mxcubecore/HardwareObjects/mockup/EnergyScanMockup.py +10 -11
- mxcubecore/HardwareObjects/mockup/ISPyBClientMockup.py +6 -6
- mxcubecore/HardwareObjects/mockup/ISPyBRestClientMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/LimaDetectorMockup.py +1 -2
- mxcubecore/HardwareObjects/mockup/MDCameraMockup.py +5 -6
- mxcubecore/HardwareObjects/mockup/MicrodiffInOutMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/MultiCollectMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/ShapeHistoryMockup.py +1 -2
- mxcubecore/HardwareObjects/mockup/XRFMockup.py +3 -6
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/RECORD +176 -176
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.393.0.dist-info → mxcubecore-1.394.0.dist-info}/WHEEL +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import os
|
|
3
2
|
import sys
|
|
4
3
|
import time
|
|
@@ -73,36 +72,34 @@ class ALBADataAnalysis(EDNACharacterisation):
|
|
|
73
72
|
|
|
74
73
|
jobname = os.path.basename(os.path.dirname(edna_directory))
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
self.log.debug(" XalocJob submiting ")
|
|
76
|
+
self.log.debug(" job_name: %s" % jobname)
|
|
77
|
+
self.log.debug(" sls_script: %s, " % sls_script)
|
|
78
|
+
self.log.debug(" input file: %s" % input_file)
|
|
79
|
+
self.log.debug(" results file: %s" % results_file)
|
|
80
|
+
self.log.debug(" edna directory: %s" % edna_directory)
|
|
82
81
|
|
|
83
82
|
self.job = XalocJob(
|
|
84
83
|
"edna-strategy", jobname, sls_script, input_file, edna_directory
|
|
85
84
|
)
|
|
86
85
|
self.job.submit()
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
self.log.debug(" XalocJob submitted %s" % self.job.id)
|
|
89
88
|
|
|
90
89
|
self.edna_directory = os.path.dirname(input_file)
|
|
91
90
|
self.input_file = os.path.basename(input_file)
|
|
92
91
|
# self.results_file = self.fix_path(results_file)
|
|
93
92
|
self.results_file = results_file
|
|
94
|
-
|
|
95
|
-
" self.results file: %s" % self.results_file
|
|
96
|
-
)
|
|
93
|
+
self.log.debug(" self.results file: %s" % self.results_file)
|
|
97
94
|
|
|
98
95
|
state = self.wait_done()
|
|
99
96
|
|
|
100
97
|
if state == "COMPLETED":
|
|
101
|
-
|
|
98
|
+
self.log.debug("EDNA Job completed")
|
|
102
99
|
time.sleep(0.5)
|
|
103
100
|
result = self.get_result()
|
|
104
101
|
else:
|
|
105
|
-
|
|
102
|
+
self.log.debug(
|
|
106
103
|
"EDNA Job finished without success / state was %s" % (self.job.state)
|
|
107
104
|
)
|
|
108
105
|
result = ""
|
|
@@ -117,28 +114,26 @@ class ALBADataAnalysis(EDNACharacterisation):
|
|
|
117
114
|
return outpath
|
|
118
115
|
|
|
119
116
|
def wait_done(self):
|
|
120
|
-
|
|
117
|
+
self.log.debug("Polling for Job state")
|
|
121
118
|
time.sleep(0.5)
|
|
122
|
-
|
|
119
|
+
self.log.debug("Polling for Job state 2")
|
|
123
120
|
|
|
124
121
|
try:
|
|
125
122
|
state = self.job.state
|
|
126
|
-
|
|
123
|
+
self.log.debug("Job / is %s" % str(state))
|
|
127
124
|
except Exception:
|
|
128
125
|
import traceback
|
|
129
126
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
)
|
|
133
|
-
logging.getLogger("HWR").debug(" %s " % traceback.format_exc())
|
|
127
|
+
self.log.debug("Polling for Job state 3. exception happened")
|
|
128
|
+
self.log.debug(" %s " % traceback.format_exc())
|
|
134
129
|
|
|
135
130
|
while state in ["RUNNING", "PENDING"]:
|
|
136
|
-
|
|
131
|
+
self.log.debug("Job / is %s" % state)
|
|
137
132
|
time.sleep(0.5)
|
|
138
133
|
state = self.job.state
|
|
139
134
|
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
self.log.debug("Returning")
|
|
136
|
+
self.log.debug("Returning %s" % str(state))
|
|
142
137
|
return state
|
|
143
138
|
|
|
144
139
|
def get_result(self):
|
|
@@ -147,22 +142,22 @@ class ALBADataAnalysis(EDNACharacterisation):
|
|
|
147
142
|
# outname = self.input_file.replace("Input", "Output")
|
|
148
143
|
# outfile = os.path.join( self.edna_directory, outname)
|
|
149
144
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
self.log.debug("Job / state is COMPLETED")
|
|
146
|
+
self.log.debug(" job status dump: %s" % jobstatus)
|
|
147
|
+
self.log.debug(" looking for file: %s" % self.results_file)
|
|
153
148
|
|
|
154
149
|
if os.path.exists(self.results_file):
|
|
155
150
|
# job_output = open(outfile).read()
|
|
156
|
-
#
|
|
151
|
+
# self.log.debug(" EDNA results file found. loading it")
|
|
157
152
|
# open(self.results_file, "w").write(job_output)
|
|
158
|
-
|
|
153
|
+
self.log.debug(" EDNA results file found 2")
|
|
159
154
|
result = XSDataResultMXCuBE.parseFile(self.results_file)
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
self.log.debug(" EDNA results file found 3")
|
|
156
|
+
self.log.debug(
|
|
162
157
|
"EDNA Result loaded from file / result is=%s" % str(type(result))
|
|
163
158
|
)
|
|
164
159
|
else:
|
|
165
|
-
|
|
160
|
+
self.log.debug(
|
|
166
161
|
"EDNA Job finished without success / cannot find output file "
|
|
167
162
|
)
|
|
168
163
|
result = ""
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
1
|
from mxcubecore import HardwareRepository as HWR
|
|
4
2
|
from mxcubecore.BaseHardwareObjects import HardwareObject
|
|
5
3
|
|
|
@@ -45,9 +43,7 @@ class ALBAEnergy(HardwareObject):
|
|
|
45
43
|
def set_value(self, value):
|
|
46
44
|
current_egy = self.get_value()
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
"moving energy to %s. now is %s" % (value, current_egy)
|
|
50
|
-
)
|
|
46
|
+
self.log.debug("moving energy to %s. now is %s" % (value, current_egy))
|
|
51
47
|
HWR.beamline.energy.set_value(value)
|
|
52
48
|
|
|
53
49
|
def wait_move_energy_done(self):
|
|
@@ -90,7 +90,7 @@ class ALBAEpsActuator(BaseHardwareObjects.HardwareObject):
|
|
|
90
90
|
except Exception:
|
|
91
91
|
import traceback
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
self.log.warning(traceback.format_exc())
|
|
94
94
|
self.state_strings = self.default_state_strings
|
|
95
95
|
|
|
96
96
|
def get_state(self):
|
|
@@ -101,7 +101,7 @@ class ALBAFastShutter(BaseHardwareObjects.HardwareObject):
|
|
|
101
101
|
except Exception:
|
|
102
102
|
import traceback
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
self.log.warning(traceback.format_exc())
|
|
105
105
|
self.state_strings = self.default_state_strings
|
|
106
106
|
|
|
107
107
|
def get_state(self):
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
1
|
import taurus
|
|
4
2
|
|
|
5
3
|
from mxcubecore.HardwareObjects.abstract import AbstractFlux
|
|
@@ -19,11 +17,9 @@ class ALBAFlux(Device, AbstractFlux.AbstractFlux):
|
|
|
19
17
|
if fluxlast > 1e7:
|
|
20
18
|
return self.last_current_trans()
|
|
21
19
|
except Exception:
|
|
22
|
-
|
|
20
|
+
self.log.exception("")
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
" Abnormally low value of flux. Returning default value"
|
|
26
|
-
)
|
|
22
|
+
self.log.debug(" Abnormally low value of flux. Returning default value")
|
|
27
23
|
default_flux = 6e11 * self.get_transmission()
|
|
28
24
|
return default_flux
|
|
29
25
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
1
|
from mxcubecore import HardwareRepository as HWR
|
|
4
2
|
from mxcubecore.BaseHardwareObjects import HardwareObject
|
|
5
3
|
|
|
@@ -29,7 +27,7 @@ class ALBAFrontLight(HardwareObject):
|
|
|
29
27
|
self.off_threshold = float(threshold)
|
|
30
28
|
except Exception:
|
|
31
29
|
self.off_threshold = self.default_threshold
|
|
32
|
-
|
|
30
|
+
self.log.info(
|
|
33
31
|
"OFF Threshold for front light is not valid. Using %s"
|
|
34
32
|
% self.off_threshold
|
|
35
33
|
)
|
|
@@ -95,25 +93,23 @@ class ALBAFrontLight(HardwareObject):
|
|
|
95
93
|
return self.current_level
|
|
96
94
|
|
|
97
95
|
def setLevel(self, level):
|
|
98
|
-
|
|
99
|
-
"Setting level in %s to %s" % (self.username, level)
|
|
100
|
-
)
|
|
96
|
+
self.log.debug("Setting level in %s to %s" % (self.username, level))
|
|
101
97
|
self.level_channel.set_value(float(level))
|
|
102
98
|
|
|
103
99
|
def setOn(self):
|
|
104
|
-
|
|
100
|
+
self.log.debug("Setting front light on")
|
|
105
101
|
if self.memorized_level is not None:
|
|
106
102
|
if self.memorized_level < self.off_threshold:
|
|
107
103
|
value = self.off_threshold
|
|
108
104
|
else:
|
|
109
105
|
value = self.memorized_level
|
|
110
|
-
|
|
106
|
+
self.log.debug(" setting value to")
|
|
111
107
|
self.level_channel.set_value(value)
|
|
112
108
|
else:
|
|
113
109
|
self.level_channel.set_value(self.off_threshold)
|
|
114
110
|
|
|
115
111
|
def setOff(self):
|
|
116
|
-
|
|
112
|
+
self.log.debug("Setting front light off")
|
|
117
113
|
self.level_channel.set_value(0.0)
|
|
118
114
|
|
|
119
115
|
|
|
@@ -22,7 +22,7 @@ class ALBAISPyBClient(ProposalISPyBClient):
|
|
|
22
22
|
vals = ldap_connection.get_field_values()
|
|
23
23
|
if "homeDirectory" in vals:
|
|
24
24
|
home_dir = vals["homeDirectory"][0]
|
|
25
|
-
|
|
25
|
+
self.log.debug(
|
|
26
26
|
" homeDirectory for user %s is %s" % (login_name, home_dir)
|
|
27
27
|
)
|
|
28
28
|
# HWR.beamline.session.set_base_data_directories(home_dir, home_dir, home_dir)
|
|
@@ -38,7 +38,7 @@ class ALBAISPyBClient(ProposalISPyBClient):
|
|
|
38
38
|
Given a proposal code, returns the correct code to use in the GUI,
|
|
39
39
|
or what to send to LDAP, user office database, or the ISPyB database.
|
|
40
40
|
"""
|
|
41
|
-
|
|
41
|
+
self.log.debug("translating %s %s" % (code, what))
|
|
42
42
|
if what == "ldap":
|
|
43
43
|
if code == "mx":
|
|
44
44
|
return "u"
|
|
@@ -60,7 +60,7 @@ class ALBAISPyBClient(ProposalISPyBClient):
|
|
|
60
60
|
logging.debug("ALBA ISPyBClient - %s is %s " % (prop, ispyb_path))
|
|
61
61
|
mx_collect_dict[prop] = ispyb_path
|
|
62
62
|
except Exception:
|
|
63
|
-
|
|
63
|
+
self.log.exception("")
|
|
64
64
|
|
|
65
65
|
def prepare_image_for_lims(self, image_dict):
|
|
66
66
|
for prop in ["jpegThumbnailFileFullPath", "jpegFileFullPath"]:
|
|
@@ -69,7 +69,7 @@ class ALBAISPyBClient(ProposalISPyBClient):
|
|
|
69
69
|
ispyb_path = HWR.beamline.session.path_to_ispyb(path)
|
|
70
70
|
image_dict[prop] = ispyb_path
|
|
71
71
|
except Exception:
|
|
72
|
-
|
|
72
|
+
self.log.exception("")
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
def test_hwo(hwo):
|
|
@@ -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
|
|