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
|
@@ -85,7 +85,7 @@ class ALBACollect(AbstractCollect):
|
|
|
85
85
|
for undulator in self["undulators"]:
|
|
86
86
|
undulators.append(undulator)
|
|
87
87
|
except Exception:
|
|
88
|
-
|
|
88
|
+
self.log.exception("")
|
|
89
89
|
|
|
90
90
|
self.exp_type_dict = {"Mesh": "raster", "Helical": "Helical"}
|
|
91
91
|
|
|
@@ -118,14 +118,14 @@ class ALBACollect(AbstractCollect):
|
|
|
118
118
|
def data_collection_hook(self):
|
|
119
119
|
"""Main collection hook"""
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
self.log.info("Running ALBA data collection hook")
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
self.log.info(" -- wait for devices to finish moving --")
|
|
124
|
+
self.log.info(" + wait for resolution...")
|
|
125
125
|
HWR.beamline.resolution.wait_end_of_move()
|
|
126
|
-
|
|
126
|
+
self.log.info(" + wait for detector distance...")
|
|
127
127
|
HWR.beamline.detector.wait_move_distance_done()
|
|
128
|
-
|
|
128
|
+
self.log.info(" + wait for energy...")
|
|
129
129
|
HWR.beamline.energy.wait_move_energy_done()
|
|
130
130
|
|
|
131
131
|
if self.aborted_by_user:
|
|
@@ -136,44 +136,34 @@ class ALBACollect(AbstractCollect):
|
|
|
136
136
|
### EDNA_REF, OSC, MESH, HELICAL
|
|
137
137
|
|
|
138
138
|
exp_type = self.current_dc_parameters["experiment_type"]
|
|
139
|
-
|
|
139
|
+
self.log.debug("Running a collect (exp_type=%s)" % exp_type)
|
|
140
140
|
|
|
141
141
|
if exp_type == "Characterization":
|
|
142
|
-
|
|
142
|
+
self.log.debug("Running a collect (CHARACTERIZATION)")
|
|
143
143
|
elif exp_type == "Helical":
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
" helical positions are: %s" % str(self.helical_positions)
|
|
147
|
-
)
|
|
144
|
+
self.log.debug("Running a helical collection")
|
|
145
|
+
self.log.debug(" helical positions are: %s" % str(self.helical_positions))
|
|
148
146
|
hpos = self.helical_positions
|
|
149
|
-
|
|
147
|
+
self.log.debug(
|
|
150
148
|
" phiy from %3.4f to %3.4f" % (hpos[0], hpos[4])
|
|
151
149
|
)
|
|
152
|
-
|
|
150
|
+
self.log.debug(
|
|
153
151
|
" phiz from %3.4f to %3.4f" % (hpos[1], hpos[5])
|
|
154
152
|
)
|
|
155
|
-
|
|
153
|
+
self.log.debug(
|
|
156
154
|
" sampx from %3.4f to %3.4f" % (hpos[2], hpos[6])
|
|
157
155
|
)
|
|
158
|
-
|
|
156
|
+
self.log.debug(
|
|
159
157
|
" sampy from %3.4f to %3.4f" % (hpos[3], hpos[7])
|
|
160
158
|
)
|
|
161
159
|
elif exp_type == "Mesh":
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
" total nb of frames: %s" % self.mesh_total_nb_frames
|
|
168
|
-
)
|
|
169
|
-
logging.getLogger("HWR").debug(
|
|
170
|
-
" mesh range : %s" % self.mesh_range
|
|
171
|
-
)
|
|
172
|
-
logging.getLogger("HWR").debug(
|
|
173
|
-
" mesh center : %s" % self.mesh_center
|
|
174
|
-
)
|
|
160
|
+
self.log.debug("Running a raster collection ()")
|
|
161
|
+
self.log.debug(" number of lines are: %s" % self.mesh_num_lines)
|
|
162
|
+
self.log.debug(" total nb of frames: %s" % self.mesh_total_nb_frames)
|
|
163
|
+
self.log.debug(" mesh range : %s" % self.mesh_range)
|
|
164
|
+
self.log.debug(" mesh center : %s" % self.mesh_center)
|
|
175
165
|
else:
|
|
176
|
-
|
|
166
|
+
self.log.debug("Running a collect (STANDARD)")
|
|
177
167
|
|
|
178
168
|
osc_seq = self.current_dc_parameters["oscillation_sequence"][0]
|
|
179
169
|
|
|
@@ -194,7 +184,7 @@ class ALBACollect(AbstractCollect):
|
|
|
194
184
|
|
|
195
185
|
omega_pos = osc_seq["start"]
|
|
196
186
|
|
|
197
|
-
|
|
187
|
+
self.log.info("Starting detector")
|
|
198
188
|
self.emit("collectStarted", (self.owner, 1))
|
|
199
189
|
|
|
200
190
|
first_image_no = osc_seq["start_image_number"]
|
|
@@ -221,9 +211,7 @@ class ALBACollect(AbstractCollect):
|
|
|
221
211
|
#
|
|
222
212
|
# Run
|
|
223
213
|
#
|
|
224
|
-
|
|
225
|
-
"collecting images, by moving omega to %s" % final_pos
|
|
226
|
-
)
|
|
214
|
+
self.log.info("collecting images, by moving omega to %s" % final_pos)
|
|
227
215
|
HWR.beamline.diffractometer.omega.set_value(final_pos)
|
|
228
216
|
self.wait_collection_done(nb_images, first_image_no)
|
|
229
217
|
self.data_collection_end()
|
|
@@ -235,9 +223,7 @@ class ALBACollect(AbstractCollect):
|
|
|
235
223
|
self.unconfigure_ni()
|
|
236
224
|
|
|
237
225
|
def data_collection_failed(self):
|
|
238
|
-
|
|
239
|
-
"Data collection failed. recovering sequence should go here"
|
|
240
|
-
)
|
|
226
|
+
self.log.info("Data collection failed. recovering sequence should go here")
|
|
241
227
|
|
|
242
228
|
def prepare_acquisition(self):
|
|
243
229
|
fileinfo = self.current_dc_parameters["fileinfo"]
|
|
@@ -269,19 +255,17 @@ class ALBACollect(AbstractCollect):
|
|
|
269
255
|
return False
|
|
270
256
|
|
|
271
257
|
gevent.sleep(1)
|
|
272
|
-
|
|
258
|
+
self.log.info(
|
|
273
259
|
" Waiting for diffractometer to be ready. Now %s"
|
|
274
260
|
% str(HWR.beamline.diffractometer.current_state)
|
|
275
261
|
)
|
|
276
262
|
HWR.beamline.diffractometer.wait_device_ready(timeout=10)
|
|
277
|
-
|
|
263
|
+
self.log.info(" diffractometer is now ready.")
|
|
278
264
|
|
|
279
265
|
# go to collect phase
|
|
280
266
|
if not self.is_collect_phase():
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
)
|
|
284
|
-
logging.getLogger("HWR").info(
|
|
267
|
+
self.log.info(" Not in collect phase. Asking supervisor to go")
|
|
268
|
+
self.log.info(
|
|
285
269
|
" diffractometer is now ready. Now %s"
|
|
286
270
|
% str(HWR.beamline.diffractometer.current_state)
|
|
287
271
|
)
|
|
@@ -310,16 +294,14 @@ class ALBACollect(AbstractCollect):
|
|
|
310
294
|
total_time = nb_images * exp_time
|
|
311
295
|
omega_speed = float(total_dist / total_time)
|
|
312
296
|
|
|
313
|
-
|
|
297
|
+
self.log.info(" prepare detector was not ok.")
|
|
314
298
|
self.write_image_headers(start_angle)
|
|
315
299
|
|
|
316
|
-
|
|
300
|
+
self.log.info(
|
|
317
301
|
" nb_images: %s / img_range: %s / exp_time: %s / total_distance: %s / speed: %s"
|
|
318
302
|
% (nb_images, img_range, exp_time, total_dist, omega_speed)
|
|
319
303
|
)
|
|
320
|
-
|
|
321
|
-
" setting omega velocity to 60 to go to intial position"
|
|
322
|
-
)
|
|
304
|
+
self.log.info(" setting omega velocity to 60 to go to intial position")
|
|
323
305
|
HWR.beamline.diffractometer.omega.set_velocity(60)
|
|
324
306
|
|
|
325
307
|
omega_acceltime = HWR.beamline.diffractometer.omega.get_acceleration()
|
|
@@ -329,21 +311,21 @@ class ALBACollect(AbstractCollect):
|
|
|
329
311
|
init_pos = start_angle - safe_delta
|
|
330
312
|
final_pos = start_angle + total_dist + safe_delta
|
|
331
313
|
|
|
332
|
-
|
|
314
|
+
self.log.info("Moving omega to initial position %s" % init_pos)
|
|
333
315
|
HWR.beamline.diffractometer.omega.set_value(init_pos)
|
|
334
316
|
|
|
335
317
|
HWR.beamline.detector.prepare_collection(nb_images, first_image_no)
|
|
336
318
|
|
|
337
319
|
HWR.beamline.diffractometer.omega.wait_end_of_move(timeout=10)
|
|
338
320
|
|
|
339
|
-
|
|
321
|
+
self.log.info(
|
|
340
322
|
"Moving omega finished at %s"
|
|
341
323
|
% HWR.beamline.diffractometer.omega.get_value()
|
|
342
324
|
)
|
|
343
325
|
|
|
344
326
|
# program omega speed depending on exposure time
|
|
345
327
|
|
|
346
|
-
|
|
328
|
+
self.log.info("Setting omega velocity to %s" % omega_speed)
|
|
347
329
|
HWR.beamline.diffractometer.omega.set_velocity(omega_speed)
|
|
348
330
|
if omega_speed != 0:
|
|
349
331
|
self.configure_ni(start_angle, total_dist)
|
|
@@ -452,12 +434,12 @@ class ALBACollect(AbstractCollect):
|
|
|
452
434
|
|
|
453
435
|
start_wait = time.time()
|
|
454
436
|
|
|
455
|
-
|
|
437
|
+
self.log.debug(" waiting for image on disk: %s", fullpath)
|
|
456
438
|
|
|
457
439
|
while not os.path.exists(fullpath):
|
|
458
440
|
dirlist = os.listdir(basedir) # forces directory flush ?
|
|
459
441
|
if (time.time() - start_wait) > timeout:
|
|
460
|
-
|
|
442
|
+
self.log.debug(" giving up waiting for image")
|
|
461
443
|
return False
|
|
462
444
|
time.sleep(0.2)
|
|
463
445
|
|
|
@@ -473,7 +455,7 @@ class ALBACollect(AbstractCollect):
|
|
|
473
455
|
thumb_fullpath = os.path.join(archive_dir, thumb_filename)
|
|
474
456
|
jpeg_fullpath = os.path.join(archive_dir, jpeg_filename)
|
|
475
457
|
|
|
476
|
-
|
|
458
|
+
self.log.debug(
|
|
477
459
|
" creating thumbnails for %s in: %s and %s"
|
|
478
460
|
% (fullpath, jpeg_fullpath, thumb_fullpath)
|
|
479
461
|
)
|
|
@@ -482,7 +464,7 @@ class ALBACollect(AbstractCollect):
|
|
|
482
464
|
cmd = "adxv_thumb 0.1 %s %s" % (fullpath, thumb_fullpath)
|
|
483
465
|
os.system(cmd)
|
|
484
466
|
|
|
485
|
-
|
|
467
|
+
self.log.debug(" writing thumbnails info in LIMS")
|
|
486
468
|
self._store_image_in_lims(frame_number)
|
|
487
469
|
|
|
488
470
|
return True
|
|
@@ -514,7 +496,7 @@ class ALBACollect(AbstractCollect):
|
|
|
514
496
|
#
|
|
515
497
|
# data collection end (or abort)
|
|
516
498
|
#
|
|
517
|
-
|
|
499
|
+
self.log.info(" finishing data collection ")
|
|
518
500
|
HWR.beamline.fast_shutter.cmdOut()
|
|
519
501
|
self.emit("progressStop")
|
|
520
502
|
|
|
@@ -552,9 +534,9 @@ class ALBACollect(AbstractCollect):
|
|
|
552
534
|
self.data_collection_end()
|
|
553
535
|
|
|
554
536
|
def go_to_collect(self, timeout=180):
|
|
555
|
-
|
|
537
|
+
self.log.debug("sending supervisor to collect phase")
|
|
556
538
|
self.supervisor_hwobj.go_collect()
|
|
557
|
-
|
|
539
|
+
self.log.debug("supervisor sent to collect phase")
|
|
558
540
|
|
|
559
541
|
gevent.sleep(0.5)
|
|
560
542
|
|
|
@@ -565,13 +547,11 @@ class ALBACollect(AbstractCollect):
|
|
|
565
547
|
if super_state != "MOVING" and cphase == "COLLECT":
|
|
566
548
|
break
|
|
567
549
|
if time.time() - t0 > timeout:
|
|
568
|
-
|
|
569
|
-
"timeout sending supervisor to collect phase"
|
|
570
|
-
)
|
|
550
|
+
self.log.debug("timeout sending supervisor to collect phase")
|
|
571
551
|
break
|
|
572
552
|
gevent.sleep(0.5)
|
|
573
553
|
|
|
574
|
-
|
|
554
|
+
self.log.debug(
|
|
575
555
|
"supervisor finished go collect phase task. phase is now: %s" % cphase
|
|
576
556
|
)
|
|
577
557
|
|
|
@@ -581,9 +561,9 @@ class ALBACollect(AbstractCollect):
|
|
|
581
561
|
return self.supervisor_hwobj.get_current_phase().upper() == "COLLECT"
|
|
582
562
|
|
|
583
563
|
def go_to_sampleview(self, timeout=180):
|
|
584
|
-
|
|
564
|
+
self.log.debug("sending supervisor to sample view phase")
|
|
585
565
|
self.supervisor_hwobj.go_sample_view()
|
|
586
|
-
|
|
566
|
+
self.log.debug("supervisor sent to sample view phase")
|
|
587
567
|
|
|
588
568
|
gevent.sleep(0.5)
|
|
589
569
|
|
|
@@ -594,13 +574,11 @@ class ALBACollect(AbstractCollect):
|
|
|
594
574
|
if super_state != "MOVING" and cphase == "SAMPLE":
|
|
595
575
|
break
|
|
596
576
|
if time.time() - t0 > timeout:
|
|
597
|
-
|
|
598
|
-
"timeout sending supervisor to sample view phase"
|
|
599
|
-
)
|
|
577
|
+
self.log.debug("timeout sending supervisor to sample view phase")
|
|
600
578
|
break
|
|
601
579
|
gevent.sleep(0.5)
|
|
602
580
|
|
|
603
|
-
|
|
581
|
+
self.log.debug(
|
|
604
582
|
"supervisor finished go sample view phase task. phase is now: %s" % cphase
|
|
605
583
|
)
|
|
606
584
|
|
|
@@ -610,7 +588,7 @@ class ALBACollect(AbstractCollect):
|
|
|
610
588
|
return self.supervisor_hwobj.get_current_phase().upper() == "SAMPLE"
|
|
611
589
|
|
|
612
590
|
def configure_ni(self, startang, total_dist):
|
|
613
|
-
|
|
591
|
+
self.log.debug(
|
|
614
592
|
"Configuring NI660 with pars 0, %s, %s, 0, 1" % (startang, total_dist)
|
|
615
593
|
)
|
|
616
594
|
self.ni_conf_cmd(0.0, startang, total_dist, 0, 1)
|
|
@@ -693,7 +671,7 @@ class ALBACollect(AbstractCollect):
|
|
|
693
671
|
self.go_to_sampleview()
|
|
694
672
|
|
|
695
673
|
HWR.beamline.sample_view.save_snapshot(filename)
|
|
696
|
-
|
|
674
|
+
self.log.debug(" - snapshot saved to %s" % filename)
|
|
697
675
|
|
|
698
676
|
@task
|
|
699
677
|
def move_motors(self, motor_position_dict):
|
|
@@ -815,7 +793,7 @@ class ALBACollect(AbstractCollect):
|
|
|
815
793
|
else:
|
|
816
794
|
return und_gaps
|
|
817
795
|
except Exception:
|
|
818
|
-
|
|
796
|
+
self.log.exception("")
|
|
819
797
|
return {}
|
|
820
798
|
|
|
821
799
|
def get_slit_gaps(self):
|
|
@@ -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):
|