mx-bluesky 1.5.3__py3-none-any.whl → 1.5.4__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.
- mx_bluesky/_version.py +2 -2
- mx_bluesky/beamlines/aithre_lasershaping/__init__.py +2 -0
- mx_bluesky/beamlines/aithre_lasershaping/beamline_safe.py +17 -0
- mx_bluesky/beamlines/i04/experiment_plans/i04_grid_detect_then_xray_centre_plan.py +0 -8
- mx_bluesky/beamlines/i04/thawing_plan.py +3 -3
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl +10 -10
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl +1 -1
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +68 -68
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/ME14E-GeneralPurpose.edl +120 -120
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl +135 -135
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/PMAC_Command.edl +2 -2
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/Shutter_Control.edl +3 -3
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/nudgechip.edl +24 -24
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl +12 -12
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Manager_py3v1.py +13 -12
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_moveonclick.py +10 -10
- mx_bluesky/beamlines/i24/serial/parameters/utils.py +1 -1
- mx_bluesky/beamlines/i24/serial/set_visit_directory.sh +1 -1
- mx_bluesky/beamlines/i24/serial/setup_beamline/pv.py +142 -135
- mx_bluesky/common/device_setup_plans/manipulate_sample.py +2 -2
- mx_bluesky/common/experiment_plans/common_grid_detect_then_xray_centre_plan.py +2 -2
- mx_bluesky/common/experiment_plans/inner_plans/udc_default_state.py +65 -0
- mx_bluesky/common/experiment_plans/oav_snapshot_plan.py +2 -2
- mx_bluesky/common/external_interaction/callbacks/common/grid_detection_callback.py +35 -17
- mx_bluesky/common/external_interaction/callbacks/sample_handling/sample_handling_callback.py +3 -2
- mx_bluesky/common/parameters/constants.py +1 -0
- mx_bluesky/hyperion/baton_handler.py +9 -4
- mx_bluesky/hyperion/experiment_plans/load_centre_collect_full_plan.py +5 -1
- mx_bluesky/hyperion/experiment_plans/robot_load_and_change_energy.py +6 -2
- mx_bluesky/hyperion/external_interaction/callbacks/__main__.py +4 -0
- mx_bluesky/hyperion/external_interaction/callbacks/alert_on_container_change.py +54 -0
- {mx_bluesky-1.5.3.dist-info → mx_bluesky-1.5.4.dist-info}/METADATA +2 -2
- {mx_bluesky-1.5.3.dist-info → mx_bluesky-1.5.4.dist-info}/RECORD +37 -35
- {mx_bluesky-1.5.3.dist-info → mx_bluesky-1.5.4.dist-info}/WHEEL +0 -0
- {mx_bluesky-1.5.3.dist-info → mx_bluesky-1.5.4.dist-info}/entry_points.txt +0 -0
- {mx_bluesky-1.5.3.dist-info → mx_bluesky-1.5.4.dist-info}/licenses/LICENSE +0 -0
- {mx_bluesky-1.5.3.dist-info → mx_bluesky-1.5.4.dist-info}/top_level.txt +0 -0
|
@@ -246,17 +246,21 @@ det_z = "BL24I-EA-DET-01:Z"
|
|
|
246
246
|
# Fast grid diagnostics
|
|
247
247
|
pmc_gridstatus = "BL24I-MO-STEP-10:signal:P2401"
|
|
248
248
|
pmc_gridcounter = "BL24I-MO-STEP-10:signal:P2402"
|
|
249
|
+
|
|
249
250
|
# PMAC Strings
|
|
250
251
|
step08_pmac_str = "BL24I-MO-IOC-08:ASYN8.AOUT"
|
|
251
252
|
step09_pmac_str = "BL24I-MO-IOC-09:ASYN9.AOUT"
|
|
252
253
|
step10_pmac_str = "BL24I-MO-IOC-10:ASYN10.AOUT"
|
|
253
254
|
step11_pmac_str = "BL24I-MO-IOC-11:ASYN11.AOUT"
|
|
254
255
|
step12_pmac_str = "BL24I-MO-IOC-12:ASYN12.AOUT"
|
|
256
|
+
step13_pmac_str = "BL24I-MO-IOC-13:PMAC:console"
|
|
255
257
|
step08_pmac_response = "BL24I-MO-IOC-08:ASYN8.AINP"
|
|
256
258
|
step09_pmac_response = "BL24I-MO-IOC-09:ASYN9.AINP"
|
|
257
259
|
step10_pmac_response = "BL24I-MO-IOC-10:ASYN10.AINP"
|
|
258
260
|
step11_pmac_response = "BL24I-MO-IOC-11:ASYN11.AINP"
|
|
259
261
|
step12_pmac_response = "BL24I-MO-IOC-12:ASYN12.AINP"
|
|
262
|
+
step13_pmac_response = "BL24I-MO-IOC-13:PMAC:console_RBV"
|
|
263
|
+
|
|
260
264
|
# General Purpose PV. Now use STEP13
|
|
261
265
|
ioc13_gp1 = "BL24I-MO-IOC-13:GP1"
|
|
262
266
|
ioc13_gp2 = "BL24I-MO-IOC-13:GP2"
|
|
@@ -273,138 +277,141 @@ ioc13_gp12 = "BL24I-MO-IOC-13:GP12"
|
|
|
273
277
|
ioc13_gp13 = "BL24I-MO-IOC-13:GP13"
|
|
274
278
|
ioc13_gp14 = "BL24I-MO-IOC-13:GP14"
|
|
275
279
|
ioc13_gp15 = "BL24I-MO-IOC-13:GP15"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
280
|
+
|
|
281
|
+
# BL24I beamline-specific labelled PVs
|
|
282
|
+
me14e_filter = "BL24I-EA-CHIP-01:FILTER" # to check
|
|
283
|
+
me14e_filepath = "BL24I-MO-CHIP-01:filePath"
|
|
284
|
+
me14e_chip_name = "BL24I-MO-CHIP-01:chipName"
|
|
285
|
+
me14e_chipcapacity = "BL24I-MO-CHIP-01:chipCapacity"
|
|
286
|
+
me14e_blockcapacity = "BL24I-MO-CHIP-01:blockCapacity"
|
|
287
|
+
me14e_exptime = "BL24I-MO-CHIP-01:expTime"
|
|
288
|
+
me14e_dcdetdist = "BL24I-MO-CHIP-01:detDistance"
|
|
289
|
+
|
|
290
|
+
# STEP-13 chip motion
|
|
291
|
+
ioc13_filepath = "BL24I-MO-CHIP-01:filePath"
|
|
292
|
+
ioc13_chip_name = "BL24I-MO-CHIP-01:chipName"
|
|
293
|
+
ioc13_chipcapacity = "BL24I-MO-CHIP-01:chipCapacity"
|
|
294
|
+
ioc13_blockcapacity = "BL24I-MO-CHIP-01:blockCapacity"
|
|
295
|
+
ioc13_exptime = "BL24I-MO-CHIP-01:expTime"
|
|
296
|
+
ioc13_dcdetdist = "BL24I-MO-CHIP-01:detDistance"
|
|
297
|
+
|
|
298
|
+
me14e_gp1 = "BL24I-MO-IOC-13:GP1"
|
|
299
|
+
me14e_gp2 = "BL24I-MO-IOC-13:GP2"
|
|
300
|
+
me14e_gp3 = "BL24I-MO-IOC-13:GP3"
|
|
301
|
+
me14e_gp4 = "BL24I-MO-IOC-13:GP4"
|
|
302
|
+
me14e_gp5 = "BL24I-MO-IOC-13:GP5"
|
|
303
|
+
me14e_gp6 = "BL24I-MO-IOC-13:GP6"
|
|
304
|
+
me14e_gp7 = "BL24I-MO-IOC-13:GP7"
|
|
305
|
+
me14e_gp8 = "BL24I-MO-IOC-13:GP8"
|
|
306
|
+
me14e_gp9 = "BL24I-MO-IOC-13:GP9"
|
|
307
|
+
me14e_gp10 = "BL24I-MO-IOC-13:GP10"
|
|
308
|
+
me14e_gp11 = "BL24I-MO-IOC-13:GP11"
|
|
309
|
+
me14e_gp12 = "BL24I-MO-IOC-13:GP12"
|
|
310
|
+
me14e_gp13 = "BL24I-MO-IOC-13:GP13"
|
|
311
|
+
me14e_gp14 = "BL24I-MO-IOC-13:GP14"
|
|
312
|
+
me14e_gp15 = "BL24I-MO-IOC-13:GP15"
|
|
313
|
+
me14e_gp16 = "BL24I-MO-IOC-13:GP16"
|
|
314
|
+
me14e_gp17 = "BL24I-MO-IOC-13:GP17"
|
|
315
|
+
me14e_gp18 = "BL24I-MO-IOC-13:GP18"
|
|
316
|
+
me14e_gp19 = "BL24I-MO-IOC-13:GP19"
|
|
317
|
+
me14e_gp20 = "BL24I-MO-IOC-13:GP20"
|
|
318
|
+
me14e_gp21 = "BL24I-MO-IOC-13:GP21"
|
|
319
|
+
me14e_gp22 = "BL24I-MO-IOC-13:GP22"
|
|
320
|
+
me14e_gp23 = "BL24I-MO-IOC-13:GP23"
|
|
321
|
+
me14e_gp24 = "BL24I-MO-IOC-13:GP24"
|
|
322
|
+
me14e_gp25 = "BL24I-MO-IOC-13:GP25"
|
|
323
|
+
me14e_gp26 = "BL24I-MO-IOC-13:GP26"
|
|
324
|
+
me14e_gp27 = "BL24I-MO-IOC-13:GP27"
|
|
325
|
+
me14e_gp28 = "BL24I-MO-IOC-13:GP28"
|
|
326
|
+
me14e_gp29 = "BL24I-MO-IOC-13:GP29"
|
|
327
|
+
me14e_gp30 = "BL24I-MO-IOC-13:GP30"
|
|
328
|
+
me14e_gp31 = "BL24I-MO-IOC-13:GP31"
|
|
329
|
+
me14e_gp32 = "BL24I-MO-IOC-13:GP32"
|
|
330
|
+
me14e_gp33 = "BL24I-MO-IOC-13:GP33"
|
|
331
|
+
me14e_gp34 = "BL24I-MO-IOC-13:GP34"
|
|
332
|
+
me14e_gp35 = "BL24I-MO-IOC-13:GP35"
|
|
333
|
+
me14e_gp36 = "BL24I-MO-IOC-13:GP36"
|
|
334
|
+
me14e_gp37 = "BL24I-MO-IOC-13:GP37"
|
|
335
|
+
me14e_gp38 = "BL24I-MO-IOC-13:GP38"
|
|
336
|
+
me14e_gp39 = "BL24I-MO-IOC-13:GP39"
|
|
337
|
+
me14e_gp40 = "BL24I-MO-IOC-13:GP40"
|
|
338
|
+
me14e_gp41 = "BL24I-MO-IOC-13:GP41"
|
|
339
|
+
me14e_gp42 = "BL24I-MO-IOC-13:GP42"
|
|
340
|
+
me14e_gp43 = "BL24I-MO-IOC-13:GP43"
|
|
341
|
+
me14e_gp44 = "BL24I-MO-IOC-13:GP44"
|
|
342
|
+
me14e_gp45 = "BL24I-MO-IOC-13:GP45"
|
|
343
|
+
me14e_gp46 = "BL24I-MO-IOC-13:GP46"
|
|
344
|
+
me14e_gp47 = "BL24I-MO-IOC-13:GP47"
|
|
345
|
+
me14e_gp48 = "BL24I-MO-IOC-13:GP48"
|
|
346
|
+
me14e_gp49 = "BL24I-MO-IOC-13:GP49"
|
|
347
|
+
me14e_gp50 = "BL24I-MO-IOC-13:GP50"
|
|
348
|
+
me14e_gp51 = "BL24I-MO-IOC-13:GP51"
|
|
349
|
+
me14e_gp52 = "BL24I-MO-IOC-13:GP52"
|
|
350
|
+
me14e_gp53 = "BL24I-MO-IOC-13:GP53"
|
|
351
|
+
me14e_gp54 = "BL24I-MO-IOC-13:GP54"
|
|
352
|
+
me14e_gp55 = "BL24I-MO-IOC-13:GP55"
|
|
353
|
+
me14e_gp56 = "BL24I-MO-IOC-13:GP56"
|
|
354
|
+
me14e_gp57 = "BL24I-MO-IOC-13:GP57"
|
|
355
|
+
me14e_gp58 = "BL24I-MO-IOC-13:GP58"
|
|
356
|
+
me14e_gp59 = "BL24I-MO-IOC-13:GP59"
|
|
357
|
+
me14e_gp60 = "BL24I-MO-IOC-13:GP60"
|
|
358
|
+
me14e_gp61 = "BL24I-MO-IOC-13:GP61"
|
|
359
|
+
me14e_gp62 = "BL24I-MO-IOC-13:GP62"
|
|
360
|
+
me14e_gp63 = "BL24I-MO-IOC-13:GP63"
|
|
361
|
+
me14e_gp64 = "BL24I-MO-IOC-13:GP64"
|
|
362
|
+
me14e_gp65 = "BL24I-MO-IOC-13:GP65"
|
|
363
|
+
me14e_gp66 = "BL24I-MO-IOC-13:GP66"
|
|
364
|
+
me14e_gp67 = "BL24I-MO-IOC-13:GP67"
|
|
365
|
+
me14e_gp68 = "BL24I-MO-IOC-13:GP68"
|
|
366
|
+
me14e_gp69 = "BL24I-MO-IOC-13:GP69"
|
|
367
|
+
me14e_gp70 = "BL24I-MO-IOC-13:GP70"
|
|
368
|
+
me14e_gp71 = "BL24I-MO-IOC-13:GP71"
|
|
369
|
+
me14e_gp72 = "BL24I-MO-IOC-13:GP72"
|
|
370
|
+
me14e_gp73 = "BL24I-MO-IOC-13:GP73"
|
|
371
|
+
me14e_gp74 = "BL24I-MO-IOC-13:GP74"
|
|
372
|
+
me14e_gp75 = "BL24I-MO-IOC-13:GP75"
|
|
373
|
+
me14e_gp76 = "BL24I-MO-IOC-13:GP76"
|
|
374
|
+
me14e_gp77 = "BL24I-MO-IOC-13:GP77"
|
|
375
|
+
me14e_gp78 = "BL24I-MO-IOC-13:GP78"
|
|
376
|
+
me14e_gp79 = "BL24I-MO-IOC-13:GP79"
|
|
377
|
+
me14e_gp80 = "BL24I-MO-IOC-13:GP80"
|
|
378
|
+
me14e_gp81 = "BL24I-MO-IOC-13:GP81"
|
|
379
|
+
me14e_gp82 = "BL24I-MO-IOC-13:GP82"
|
|
380
|
+
me14e_gp83 = "BL24I-MO-IOC-13:GP83"
|
|
381
|
+
me14e_gp84 = "BL24I-MO-IOC-13:GP84"
|
|
382
|
+
me14e_gp85 = "BL24I-MO-IOC-13:GP85"
|
|
383
|
+
me14e_gp86 = "BL24I-MO-IOC-13:GP86"
|
|
384
|
+
me14e_gp87 = "BL24I-MO-IOC-13:GP87"
|
|
385
|
+
me14e_gp88 = "BL24I-MO-IOC-13:GP88"
|
|
386
|
+
me14e_gp89 = "BL24I-MO-IOC-13:GP89"
|
|
387
|
+
me14e_gp90 = "BL24I-MO-IOC-13:GP90"
|
|
388
|
+
me14e_gp91 = "BL24I-MO-IOC-13:GP91"
|
|
389
|
+
me14e_gp92 = "BL24I-MO-IOC-13:GP92"
|
|
390
|
+
me14e_gp93 = "BL24I-MO-IOC-13:GP93"
|
|
391
|
+
me14e_gp94 = "BL24I-MO-IOC-13:GP94"
|
|
392
|
+
me14e_gp95 = "BL24I-MO-IOC-13:GP95"
|
|
393
|
+
me14e_gp96 = "BL24I-MO-IOC-13:GP96"
|
|
394
|
+
me14e_gp97 = "BL24I-MO-IOC-13:GP97"
|
|
395
|
+
me14e_gp98 = "BL24I-MO-IOC-13:GP98"
|
|
396
|
+
me14e_gp99 = "BL24I-MO-IOC-13:GP99"
|
|
397
|
+
me14e_gp100 = "BL24I-MO-IOC-13:GP100"
|
|
398
|
+
me14e_gp101 = "BL24I-MO-IOC-13:GP101" # Detector in use
|
|
399
|
+
me14e_gp102 = "BL24I-MO-IOC-13:GP102"
|
|
400
|
+
me14e_gp103 = "BL24I-MO-IOC-13:GP103"
|
|
401
|
+
me14e_gp104 = "BL24I-MO-IOC-13:GP104"
|
|
402
|
+
me14e_gp105 = "BL24I-MO-IOC-13:GP105"
|
|
403
|
+
me14e_gp106 = "BL24I-MO-IOC-13:GP106"
|
|
404
|
+
me14e_gp107 = "BL24I-MO-IOC-13:GP107"
|
|
405
|
+
me14e_gp108 = "BL24I-MO-IOC-13:GP108"
|
|
406
|
+
me14e_gp109 = "BL24I-MO-IOC-13:GP109"
|
|
407
|
+
me14e_gp110 = "BL24I-MO-IOC-13:GP110"
|
|
408
|
+
me14e_gp111 = "BL24I-MO-IOC-13:GP111"
|
|
409
|
+
me14e_gp112 = "BL24I-MO-IOC-13:GP112"
|
|
410
|
+
me14e_gp113 = "BL24I-MO-IOC-13:GP113"
|
|
411
|
+
me14e_gp114 = "BL24I-MO-IOC-13:GP114"
|
|
412
|
+
me14e_gp115 = "BL24I-MO-IOC-13:GP115"
|
|
413
|
+
me14e_gp116 = "BL24I-MO-IOC-13:GP116"
|
|
414
|
+
me14e_gp117 = "BL24I-MO-IOC-13:GP117"
|
|
415
|
+
me14e_gp118 = "BL24I-MO-IOC-13:GP118"
|
|
416
|
+
me14e_gp119 = "BL24I-MO-IOC-13:GP119"
|
|
417
|
+
me14e_gp120 = "BL24I-MO-IOC-13:GP120"
|
|
@@ -5,7 +5,7 @@ from dodal.devices.aperturescatterguard import (
|
|
|
5
5
|
ApertureScatterguard,
|
|
6
6
|
ApertureValue,
|
|
7
7
|
)
|
|
8
|
-
from dodal.devices.backlight import Backlight,
|
|
8
|
+
from dodal.devices.backlight import Backlight, InOut
|
|
9
9
|
from dodal.devices.detector.detector_motion import DetectorMotion
|
|
10
10
|
from dodal.devices.smargon import CombinedMove, Smargon
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@ def setup_sample_environment(
|
|
|
22
22
|
group="setup_senv",
|
|
23
23
|
):
|
|
24
24
|
"""Move the aperture into required position, move out the backlight."""
|
|
25
|
-
yield from bps.abs_set(backlight,
|
|
25
|
+
yield from bps.abs_set(backlight, InOut.OUT, group=group)
|
|
26
26
|
|
|
27
27
|
aperture_value = (
|
|
28
28
|
None
|
|
@@ -7,7 +7,7 @@ from bluesky import plan_stubs as bps
|
|
|
7
7
|
from bluesky import preprocessors as bpp
|
|
8
8
|
from bluesky.preprocessors import subs_decorator
|
|
9
9
|
from bluesky.utils import MsgGenerator
|
|
10
|
-
from dodal.devices.backlight import
|
|
10
|
+
from dodal.devices.backlight import InOut
|
|
11
11
|
from dodal.devices.eiger import EigerDetector
|
|
12
12
|
from dodal.devices.oav.oav_parameters import OAVParameters
|
|
13
13
|
|
|
@@ -168,7 +168,7 @@ def detect_grid_and_do_gridscan(
|
|
|
168
168
|
|
|
169
169
|
yield from bps.abs_set(
|
|
170
170
|
composite.backlight,
|
|
171
|
-
|
|
171
|
+
InOut.OUT,
|
|
172
172
|
group=PlanGroupCheckpointConstants.GRID_READY_FOR_DC,
|
|
173
173
|
)
|
|
174
174
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import bluesky.plan_stubs as bps
|
|
2
|
+
import pydantic
|
|
3
|
+
from dodal.devices.aperturescatterguard import ApertureScatterguard, ApertureValue
|
|
4
|
+
from dodal.devices.collimation_table import CollimationTable
|
|
5
|
+
from dodal.devices.cryostream import CryoStream
|
|
6
|
+
from dodal.devices.cryostream import InOut as CryoInOut
|
|
7
|
+
from dodal.devices.fluorescence_detector_motion import (
|
|
8
|
+
FluorescenceDetector,
|
|
9
|
+
)
|
|
10
|
+
from dodal.devices.fluorescence_detector_motion import InOut as FlouInOut
|
|
11
|
+
from dodal.devices.mx_phase1.beamstop import Beamstop, BeamstopPositions
|
|
12
|
+
from dodal.devices.scintillator import InOut as ScinInOut
|
|
13
|
+
from dodal.devices.scintillator import Scintillator
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@pydantic.dataclasses.dataclass(config={"arbitrary_types_allowed": True})
|
|
17
|
+
class UDCDefaultDevices:
|
|
18
|
+
cryostream: CryoStream
|
|
19
|
+
fluorescence_det_motion: FluorescenceDetector
|
|
20
|
+
beamstop: Beamstop
|
|
21
|
+
scintillator: Scintillator
|
|
22
|
+
aperture_scatterguard: ApertureScatterguard
|
|
23
|
+
collimation_table: CollimationTable
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def move_to_udc_default_state(devices: UDCDefaultDevices):
|
|
27
|
+
"""Moves beamline to known positions prior to UDC start"""
|
|
28
|
+
|
|
29
|
+
cryostream_temp = yield from bps.rd(devices.cryostream.temperature_k)
|
|
30
|
+
cryostream_pressure = yield from bps.rd(devices.cryostream.back_pressure_bar)
|
|
31
|
+
if cryostream_temp > devices.cryostream.MAX_TEMP_K:
|
|
32
|
+
raise ValueError("Cryostream temperature is too high, not starting UDC")
|
|
33
|
+
if cryostream_pressure > devices.cryostream.MAX_PRESSURE_BAR:
|
|
34
|
+
raise ValueError("Cryostream back pressure is too high, not starting UDC")
|
|
35
|
+
|
|
36
|
+
yield from bps.abs_set(devices.scintillator.selected_pos, ScinInOut.OUT, wait=True)
|
|
37
|
+
|
|
38
|
+
yield from bps.abs_set(
|
|
39
|
+
devices.fluorescence_det_motion.pos, FlouInOut.OUT, group="udc_default"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
yield from bps.abs_set(devices.collimation_table.inboard_y, 0, group="udc_default")
|
|
43
|
+
yield from bps.abs_set(devices.collimation_table.outboard_y, 0, group="udc_default")
|
|
44
|
+
yield from bps.abs_set(devices.collimation_table.upstream_y, 0, group="udc_default")
|
|
45
|
+
yield from bps.abs_set(devices.collimation_table.upstream_x, 0, group="udc_default")
|
|
46
|
+
yield from bps.abs_set(
|
|
47
|
+
devices.collimation_table.downstream_x, 0, group="udc_default"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
yield from bps.abs_set(
|
|
51
|
+
devices.beamstop.selected_pos,
|
|
52
|
+
BeamstopPositions.DATA_COLLECTION,
|
|
53
|
+
group="udc_default",
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
yield from bps.abs_set(
|
|
57
|
+
devices.aperture_scatterguard.selected_aperture,
|
|
58
|
+
ApertureValue.SMALL,
|
|
59
|
+
group="udc_default",
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
yield from bps.abs_set(devices.cryostream.course, CryoInOut.IN, group="udc_default")
|
|
63
|
+
yield from bps.abs_set(devices.cryostream.fine, CryoInOut.IN, group="udc_default")
|
|
64
|
+
|
|
65
|
+
yield from bps.wait("udc_default")
|
|
@@ -4,7 +4,7 @@ from typing import Protocol
|
|
|
4
4
|
from bluesky import plan_stubs as bps
|
|
5
5
|
from bluesky.utils import MsgGenerator
|
|
6
6
|
from dodal.devices.aperturescatterguard import ApertureScatterguard, ApertureValue
|
|
7
|
-
from dodal.devices.backlight import Backlight,
|
|
7
|
+
from dodal.devices.backlight import Backlight, InOut
|
|
8
8
|
from dodal.devices.oav.oav_detector import OAV
|
|
9
9
|
from dodal.devices.oav.oav_parameters import OAVParameters
|
|
10
10
|
from dodal.devices.smargon import Smargon
|
|
@@ -36,7 +36,7 @@ def setup_beamline_for_OAV(
|
|
|
36
36
|
):
|
|
37
37
|
max_vel = yield from bps.rd(smargon.omega.max_velocity)
|
|
38
38
|
yield from bps.abs_set(smargon.omega.velocity, max_vel, group=group)
|
|
39
|
-
yield from bps.abs_set(backlight,
|
|
39
|
+
yield from bps.abs_set(backlight, InOut.IN, group=group)
|
|
40
40
|
yield from bps.abs_set(
|
|
41
41
|
aperture_scatterguard.selected_aperture, ApertureValue.OUT_OF_BEAM, group=group
|
|
42
42
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TypedDict
|
|
1
|
+
from typing import Generic, TypedDict, TypeVar
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
from bluesky.callbacks import CallbackBase
|
|
@@ -7,6 +7,8 @@ from event_model.documents import Event
|
|
|
7
7
|
|
|
8
8
|
from mx_bluesky.common.utils.log import LOGGER
|
|
9
9
|
|
|
10
|
+
T = TypeVar("T", int, float)
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
class GridParamUpdate(TypedDict):
|
|
12
14
|
"""
|
|
@@ -40,14 +42,22 @@ class GridParamUpdate(TypedDict):
|
|
|
40
42
|
z_step_size_um: float
|
|
41
43
|
|
|
42
44
|
|
|
45
|
+
class XYZParams(TypedDict, Generic[T]):
|
|
46
|
+
x: T
|
|
47
|
+
y: T
|
|
48
|
+
z: T
|
|
49
|
+
|
|
50
|
+
|
|
43
51
|
class GridDetectionCallback(CallbackBase):
|
|
52
|
+
OMEGA_TOLERANCE = 1
|
|
53
|
+
|
|
44
54
|
def __init__(
|
|
45
55
|
self,
|
|
46
56
|
*args,
|
|
47
57
|
) -> None:
|
|
48
58
|
super().__init__(*args)
|
|
49
|
-
self.
|
|
50
|
-
self.box_numbers:
|
|
59
|
+
self.start_positions_um: XYZParams[float] = XYZParams(x=0, y=0, z=0)
|
|
60
|
+
self.box_numbers: XYZParams[int] = XYZParams(x=0, y=0, z=0)
|
|
51
61
|
|
|
52
62
|
def event(self, doc: Event):
|
|
53
63
|
data = doc.get("data")
|
|
@@ -82,13 +92,21 @@ class GridDetectionCallback(CallbackBase):
|
|
|
82
92
|
)
|
|
83
93
|
LOGGER.info(f"Calculated start position {position_grid_start_mm}")
|
|
84
94
|
|
|
85
|
-
|
|
86
|
-
self.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
# If data is taken at omega=~0 then it gives us x-y info, at omega=~-90 it is x-z
|
|
96
|
+
if abs(smargon_omega) < self.OMEGA_TOLERANCE:
|
|
97
|
+
self.start_positions_um["x"] = position_grid_start_mm[0] * 1000
|
|
98
|
+
self.start_positions_um["y"] = position_grid_start_mm[1] * 1000
|
|
99
|
+
self.box_numbers["x"] = data["oav-grid_snapshot-num_boxes_x"]
|
|
100
|
+
self.box_numbers["y"] = data["oav-grid_snapshot-num_boxes_y"]
|
|
101
|
+
elif abs(smargon_omega + 90) < self.OMEGA_TOLERANCE:
|
|
102
|
+
self.start_positions_um["x"] = position_grid_start_mm[0] * 1000
|
|
103
|
+
self.start_positions_um["z"] = position_grid_start_mm[2] * 1000
|
|
104
|
+
self.box_numbers["x"] = data["oav-grid_snapshot-num_boxes_x"]
|
|
105
|
+
self.box_numbers["z"] = data["oav-grid_snapshot-num_boxes_y"]
|
|
106
|
+
else:
|
|
107
|
+
raise ValueError(
|
|
108
|
+
f"Grid detection only works at omegas of 0 or -90, omega of {smargon_omega} given."
|
|
90
109
|
)
|
|
91
|
-
)
|
|
92
110
|
|
|
93
111
|
self.x_step_size_um = box_width_px * microns_per_pixel_x
|
|
94
112
|
self.y_step_size_um = box_width_px * microns_per_pixel_y
|
|
@@ -97,14 +115,14 @@ class GridDetectionCallback(CallbackBase):
|
|
|
97
115
|
|
|
98
116
|
def get_grid_parameters(self) -> GridParamUpdate:
|
|
99
117
|
return {
|
|
100
|
-
"x_start_um": self.
|
|
101
|
-
"y_start_um": self.
|
|
102
|
-
"y2_start_um": self.
|
|
103
|
-
"z_start_um": self.
|
|
104
|
-
"z2_start_um": self.
|
|
105
|
-
"x_steps": self.box_numbers[
|
|
106
|
-
"y_steps": self.box_numbers[
|
|
107
|
-
"z_steps": self.box_numbers[
|
|
118
|
+
"x_start_um": self.start_positions_um["x"],
|
|
119
|
+
"y_start_um": self.start_positions_um["y"],
|
|
120
|
+
"y2_start_um": self.start_positions_um["y"],
|
|
121
|
+
"z_start_um": self.start_positions_um["z"],
|
|
122
|
+
"z2_start_um": self.start_positions_um["z"],
|
|
123
|
+
"x_steps": self.box_numbers["x"],
|
|
124
|
+
"y_steps": self.box_numbers["y"],
|
|
125
|
+
"z_steps": self.box_numbers["z"],
|
|
108
126
|
"x_step_size_um": self.x_step_size_um,
|
|
109
127
|
"y_step_size_um": self.y_step_size_um,
|
|
110
128
|
"z_step_size_um": self.z_step_size_um,
|
mx_bluesky/common/external_interaction/callbacks/sample_handling/sample_handling_callback.py
CHANGED
|
@@ -17,8 +17,9 @@ from mx_bluesky.common.utils.log import ISPYB_ZOCALO_CALLBACK_LOGGER
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class SampleHandlingCallback(PlanReactiveCallback):
|
|
20
|
-
"""Intercepts exceptions from experiment plans and
|
|
21
|
-
field according to the type of exception raised.
|
|
20
|
+
"""Intercepts exceptions from experiment plans and:
|
|
21
|
+
* Updates the ISPyB BLSampleStatus field according to the type of exception raised.
|
|
22
|
+
* Triggers an alert with details of the error."""
|
|
22
23
|
|
|
23
24
|
def __init__(self, record_loaded_on_success=False):
|
|
24
25
|
super().__init__(log=ISPYB_ZOCALO_CALLBACK_LOGGER)
|
|
@@ -23,6 +23,7 @@ GDA_DOMAIN_PROPERTIES_PATH = (
|
|
|
23
23
|
@dataclass(frozen=True)
|
|
24
24
|
class DocDescriptorNames:
|
|
25
25
|
# Robot load/unload event descriptor
|
|
26
|
+
ROBOT_PRE_LOAD = "robot_update_pre_load"
|
|
26
27
|
ROBOT_UPDATE = "robot_update"
|
|
27
28
|
# For callbacks to use
|
|
28
29
|
OAV_ROTATION_SNAPSHOT_TRIGGERED = "rotation_snapshot_triggered"
|
|
@@ -8,8 +8,13 @@ from bluesky import preprocessors as bpp
|
|
|
8
8
|
from bluesky.utils import MsgGenerator, RunEngineInterrupted
|
|
9
9
|
from dodal.devices.baton import Baton
|
|
10
10
|
|
|
11
|
+
from mx_bluesky.common.experiment_plans.inner_plans.udc_default_state import (
|
|
12
|
+
UDCDefaultDevices,
|
|
13
|
+
move_to_udc_default_state,
|
|
14
|
+
)
|
|
11
15
|
from mx_bluesky.common.parameters.components import MxBlueskyParameters
|
|
12
16
|
from mx_bluesky.common.utils.context import (
|
|
17
|
+
device_composite_from_context,
|
|
13
18
|
find_device_in_context,
|
|
14
19
|
)
|
|
15
20
|
from mx_bluesky.common.utils.log import LOGGER
|
|
@@ -81,7 +86,7 @@ def run_udc_when_requested(context: BlueskyContext, runner: PlanRunner):
|
|
|
81
86
|
baton: The baton device
|
|
82
87
|
runner: The runner
|
|
83
88
|
"""
|
|
84
|
-
yield from
|
|
89
|
+
yield from _move_to_udc_default_state(context)
|
|
85
90
|
|
|
86
91
|
# re-fetch the baton because the device has been reinstantiated
|
|
87
92
|
baton = _get_baton(context)
|
|
@@ -160,9 +165,9 @@ def _is_requesting_baton(baton: Baton) -> MsgGenerator:
|
|
|
160
165
|
return requested_user == HYPERION_USER
|
|
161
166
|
|
|
162
167
|
|
|
163
|
-
def
|
|
164
|
-
|
|
165
|
-
yield from
|
|
168
|
+
def _move_to_udc_default_state(context: BlueskyContext):
|
|
169
|
+
udc_default_devices = device_composite_from_context(context, UDCDefaultDevices)
|
|
170
|
+
yield from move_to_udc_default_state(udc_default_devices)
|
|
166
171
|
|
|
167
172
|
|
|
168
173
|
def _get_baton(context: BlueskyContext) -> Baton:
|
|
@@ -69,7 +69,11 @@ def load_centre_collect_full(
|
|
|
69
69
|
"visit": parameters.visit,
|
|
70
70
|
"container": parameters.sample_puck,
|
|
71
71
|
},
|
|
72
|
-
"activate_callbacks": [
|
|
72
|
+
"activate_callbacks": [
|
|
73
|
+
"BeamDrawingCallback",
|
|
74
|
+
"SampleHandlingCallback",
|
|
75
|
+
"AlertOnContainerChange",
|
|
76
|
+
],
|
|
73
77
|
"with_snapshot": parameters.multi_rotation_scan.model_dump_json(
|
|
74
78
|
include=WithSnapshot.model_fields.keys() # type: ignore
|
|
75
79
|
),
|
|
@@ -12,7 +12,7 @@ from blueapi.core import BlueskyContext
|
|
|
12
12
|
from bluesky.utils import Msg
|
|
13
13
|
from dodal.devices.aperturescatterguard import ApertureScatterguard
|
|
14
14
|
from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
|
|
15
|
-
from dodal.devices.backlight import Backlight,
|
|
15
|
+
from dodal.devices.backlight import Backlight, InOut
|
|
16
16
|
from dodal.devices.focusing_mirror import FocusingMirrorWithStripes, MirrorVoltages
|
|
17
17
|
from dodal.devices.i03.dcm import DCM
|
|
18
18
|
from dodal.devices.i03.undulator_dcm import UndulatorDCM
|
|
@@ -123,7 +123,11 @@ def robot_load_and_snapshots(
|
|
|
123
123
|
thawing_time: float,
|
|
124
124
|
demand_energy_ev: float | None,
|
|
125
125
|
):
|
|
126
|
-
yield from bps.abs_set(composite.backlight,
|
|
126
|
+
yield from bps.abs_set(composite.backlight, InOut.IN, group="snapshot")
|
|
127
|
+
|
|
128
|
+
yield from bps.create(name=CONST.DESCRIPTORS.ROBOT_PRE_LOAD)
|
|
129
|
+
yield from bps.read(composite.robot)
|
|
130
|
+
yield from bps.save()
|
|
127
131
|
|
|
128
132
|
robot_load_plan = do_robot_load(
|
|
129
133
|
composite,
|
|
@@ -33,6 +33,9 @@ from mx_bluesky.common.utils.log import (
|
|
|
33
33
|
_get_logging_dirs,
|
|
34
34
|
tag_filter,
|
|
35
35
|
)
|
|
36
|
+
from mx_bluesky.hyperion.external_interaction.callbacks.alert_on_container_change import (
|
|
37
|
+
AlertOnContainerChange,
|
|
38
|
+
)
|
|
36
39
|
from mx_bluesky.hyperion.external_interaction.callbacks.robot_actions.ispyb_callback import (
|
|
37
40
|
RobotLoadISPyBCallback,
|
|
38
41
|
)
|
|
@@ -89,6 +92,7 @@ def setup_callbacks() -> list[CallbackBase]:
|
|
|
89
92
|
LogUidTaggingCallback(),
|
|
90
93
|
RobotLoadISPyBCallback(),
|
|
91
94
|
SampleHandlingCallback(),
|
|
95
|
+
AlertOnContainerChange(),
|
|
92
96
|
]
|
|
93
97
|
|
|
94
98
|
|