mx-bluesky 1.5.11__py3-none-any.whl → 1.5.14__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/Getting started.ipynb +170 -0
- mx_bluesky/_version.py +2 -2
- mx_bluesky/beamlines/aithre_lasershaping/experiment_plans/__init__.py +0 -0
- mx_bluesky/beamlines/aithre_lasershaping/experiment_plans/robot_load_plan.py +198 -0
- mx_bluesky/beamlines/aithre_lasershaping/parameters/__init__.py +0 -0
- mx_bluesky/beamlines/aithre_lasershaping/parameters/constants.py +17 -0
- mx_bluesky/beamlines/aithre_lasershaping/parameters/robot_load_parameters.py +13 -0
- mx_bluesky/beamlines/aithre_lasershaping/pin_tip_centring.py +31 -0
- mx_bluesky/beamlines/aithre_lasershaping/robot_load.py +74 -0
- mx_bluesky/beamlines/i04/__init__.py +6 -2
- mx_bluesky/beamlines/i04/callbacks/murko_callback.py +27 -12
- mx_bluesky/beamlines/i04/experiment_plans/i04_grid_detect_then_xray_centre_plan.py +88 -13
- mx_bluesky/beamlines/i04/external_interaction/__init__.py +0 -0
- mx_bluesky/beamlines/i04/external_interaction/config_server.py +15 -0
- mx_bluesky/beamlines/i04/oav_centering_plans/__init__.py +0 -0
- mx_bluesky/beamlines/i04/oav_centering_plans/oav_imaging.py +115 -0
- mx_bluesky/beamlines/i04/parameters/__init__.py +0 -0
- mx_bluesky/beamlines/i04/parameters/constants.py +21 -0
- mx_bluesky/beamlines/i04/redis_to_murko_forwarder.py +24 -1
- mx_bluesky/beamlines/i04/thawing_plan.py +147 -152
- mx_bluesky/beamlines/i24/serial/dcid.py +4 -5
- mx_bluesky/beamlines/i24/serial/extruder/i24ssx_extruder_collect_py3v2.py +5 -2
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl +11 -11
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl +3 -3
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +142 -142
- 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 +8 -8
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl +13 -13
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_chip_collect_py3v1.py +7 -4
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_chip_manager_py3v1.py +35 -32
- mx_bluesky/beamlines/i24/serial/parameters/utils.py +5 -5
- mx_bluesky/beamlines/i24/serial/setup_beamline/pv.py +113 -306
- mx_bluesky/beamlines/i24/serial/setup_beamline/setup_beamline.py +8 -2
- mx_bluesky/beamlines/i24/serial/setup_beamline/setup_detector.py +1 -1
- mx_bluesky/beamlines/i24/serial/web_gui_plans/general_plans.py +6 -6
- mx_bluesky/beamlines/i24/serial/web_gui_plans/oav_plans.py +64 -0
- mx_bluesky/{hyperion/device_setup_plans/smargon.py → common/device_setup_plans/gonio.py} +9 -6
- mx_bluesky/common/device_setup_plans/manipulate_sample.py +8 -1
- mx_bluesky/common/device_setup_plans/robot_load_unload.py +1 -1
- mx_bluesky/common/device_setup_plans/setup_oav.py +8 -0
- mx_bluesky/common/device_setup_plans/setup_zebra_and_shutter.py +0 -5
- mx_bluesky/common/device_setup_plans/xbpm_feedback.py +8 -1
- mx_bluesky/common/experiment_plans/beamstop_check.py +229 -0
- mx_bluesky/common/experiment_plans/common_flyscan_xray_centre_plan.py +2 -0
- mx_bluesky/common/experiment_plans/inner_plans/read_hardware.py +5 -2
- mx_bluesky/common/experiment_plans/oav_snapshot_plan.py +0 -1
- mx_bluesky/{hyperion → common}/experiment_plans/pin_tip_centring_plan.py +20 -21
- mx_bluesky/common/external_interaction/callbacks/common/grid_detection_callback.py +5 -0
- mx_bluesky/common/external_interaction/callbacks/common/ispyb_callback_base.py +10 -12
- mx_bluesky/common/external_interaction/callbacks/common/ispyb_mapping.py +3 -5
- mx_bluesky/common/external_interaction/callbacks/xray_centre/ispyb_callback.py +5 -5
- mx_bluesky/common/external_interaction/config_server.py +2 -2
- mx_bluesky/common/external_interaction/ispyb/data_model.py +11 -4
- mx_bluesky/common/external_interaction/ispyb/exp_eye_store.py +159 -2
- mx_bluesky/common/external_interaction/ispyb/ispyb_store.py +76 -166
- mx_bluesky/common/external_interaction/ispyb/ispyb_utils.py +0 -14
- mx_bluesky/common/parameters/components.py +1 -0
- mx_bluesky/common/parameters/constants.py +5 -2
- mx_bluesky/common/parameters/device_composites.py +4 -2
- mx_bluesky/common/utils/exceptions.py +15 -0
- mx_bluesky/common/utils/log.py +9 -0
- mx_bluesky/common/utils/utils.py +48 -0
- mx_bluesky/hyperion/__main__.py +3 -13
- mx_bluesky/hyperion/baton_handler.py +23 -6
- mx_bluesky/hyperion/experiment_plans/hyperion_flyscan_xray_centre_plan.py +1 -0
- mx_bluesky/hyperion/experiment_plans/pin_centre_then_xray_centre_plan.py +5 -6
- mx_bluesky/hyperion/experiment_plans/robot_load_and_change_energy.py +3 -10
- mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py +4 -2
- mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py +8 -2
- mx_bluesky/hyperion/experiment_plans/set_energy_plan.py +2 -2
- mx_bluesky/hyperion/experiment_plans/udc_default_state.py +166 -0
- mx_bluesky/hyperion/external_interaction/agamemnon.py +1 -1
- mx_bluesky/hyperion/external_interaction/callbacks/__main__.py +48 -21
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_callback.py +2 -2
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_mapping.py +1 -0
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/nexus_callback.py +1 -4
- mx_bluesky/hyperion/external_interaction/config_server.py +5 -5
- mx_bluesky/hyperion/parameters/constants.py +10 -3
- mx_bluesky/hyperion/parameters/device_composites.py +4 -2
- mx_bluesky/hyperion/parameters/robot_load.py +1 -9
- mx_bluesky/hyperion/plan_runner.py +31 -0
- mx_bluesky/hyperion/plan_runner_api.py +14 -1
- mx_bluesky/hyperion/utils/context.py +2 -2
- mx_bluesky/jupyter_example.ipynb +9 -1
- {mx_bluesky-1.5.11.dist-info → mx_bluesky-1.5.14.dist-info}/METADATA +7 -6
- {mx_bluesky-1.5.11.dist-info → mx_bluesky-1.5.14.dist-info}/RECORD +90 -75
- mx_bluesky/common/experiment_plans/inner_plans/udc_default_state.py +0 -86
- mx_bluesky/common/external_interaction/callbacks/common/logging_callback.py +0 -29
- {mx_bluesky-1.5.11.dist-info → mx_bluesky-1.5.14.dist-info}/WHEEL +0 -0
- {mx_bluesky-1.5.11.dist-info → mx_bluesky-1.5.14.dist-info}/entry_points.txt +0 -0
- {mx_bluesky-1.5.11.dist-info → mx_bluesky-1.5.14.dist-info}/licenses/LICENSE +0 -0
- {mx_bluesky-1.5.11.dist-info → mx_bluesky-1.5.14.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ major 4
|
|
|
4
4
|
minor 0
|
|
5
5
|
release 1
|
|
6
6
|
x 535
|
|
7
|
-
y
|
|
7
|
+
y 171
|
|
8
8
|
w 500
|
|
9
9
|
h 150
|
|
10
10
|
font "arial-medium-r-18.0"
|
|
@@ -29,8 +29,8 @@ minor 1
|
|
|
29
29
|
release 1
|
|
30
30
|
x 20
|
|
31
31
|
y 31
|
|
32
|
-
w
|
|
33
|
-
h
|
|
32
|
+
w 146
|
|
33
|
+
h 21
|
|
34
34
|
font "arial-medium-r-18.0"
|
|
35
35
|
fgColor index 14
|
|
36
36
|
bgColor index 0
|
|
@@ -51,7 +51,7 @@ x 188
|
|
|
51
51
|
y 17
|
|
52
52
|
w 178
|
|
53
53
|
h 43
|
|
54
|
-
controlPv "BL24I-
|
|
54
|
+
controlPv "BL24I-MO-IOC-13:PMAC:console"
|
|
55
55
|
fgColor index 25
|
|
56
56
|
fgAlarm
|
|
57
57
|
bgColor index 5
|
|
@@ -68,8 +68,8 @@ release 0
|
|
|
68
68
|
x 188
|
|
69
69
|
y 88
|
|
70
70
|
w 198
|
|
71
|
-
h
|
|
72
|
-
controlPv "BL24I-
|
|
71
|
+
h 21
|
|
72
|
+
controlPv "BL24I-MO-IOC-13:PMAC:console_RBV"
|
|
73
73
|
font "arial-medium-r-18.0"
|
|
74
74
|
fgColor index 16
|
|
75
75
|
bgColor index 14
|
|
@@ -89,8 +89,8 @@ minor 1
|
|
|
89
89
|
release 1
|
|
90
90
|
x 17
|
|
91
91
|
y 86
|
|
92
|
-
w
|
|
93
|
-
h
|
|
92
|
+
w 142
|
|
93
|
+
h 21
|
|
94
94
|
font "arial-medium-r-18.0"
|
|
95
95
|
fgColor index 14
|
|
96
96
|
bgColor index 0
|
|
@@ -4,7 +4,7 @@ major 4
|
|
|
4
4
|
minor 0
|
|
5
5
|
release 1
|
|
6
6
|
x 830
|
|
7
|
-
y
|
|
7
|
+
y 274
|
|
8
8
|
w 900
|
|
9
9
|
h 700
|
|
10
10
|
font "arial-medium-r-18.0"
|
|
@@ -195,7 +195,7 @@ x 155
|
|
|
195
195
|
y 428
|
|
196
196
|
w 75
|
|
197
197
|
h 25
|
|
198
|
-
controlPv "BL24I-
|
|
198
|
+
controlPv "BL24I-MO-CHIP-01:expTime"
|
|
199
199
|
font "arial-medium-r-16.0"
|
|
200
200
|
fgColor index 16
|
|
201
201
|
bgColor index 10
|
|
@@ -216,7 +216,7 @@ x 422
|
|
|
216
216
|
y 398
|
|
217
217
|
w 75
|
|
218
218
|
h 25
|
|
219
|
-
controlPv "BL24I-MO-IOC-
|
|
219
|
+
controlPv "BL24I-MO-IOC-13:GP104"
|
|
220
220
|
font "arial-medium-r-16.0"
|
|
221
221
|
fgColor index 16
|
|
222
222
|
bgColor index 10
|
|
@@ -553,7 +553,7 @@ x 422
|
|
|
553
553
|
y 431
|
|
554
554
|
w 75
|
|
555
555
|
h 25
|
|
556
|
-
controlPv "BL24I-MO-IOC-
|
|
556
|
+
controlPv "BL24I-MO-IOC-13:GP105"
|
|
557
557
|
font "arial-medium-r-16.0"
|
|
558
558
|
fgColor index 16
|
|
559
559
|
bgColor index 10
|
|
@@ -574,7 +574,7 @@ x 422
|
|
|
574
574
|
y 464
|
|
575
575
|
w 75
|
|
576
576
|
h 25
|
|
577
|
-
controlPv "BL24I-MO-IOC-
|
|
577
|
+
controlPv "BL24I-MO-IOC-13:GP106"
|
|
578
578
|
font "arial-medium-r-16.0"
|
|
579
579
|
fgColor index 16
|
|
580
580
|
bgColor index 10
|
|
@@ -595,7 +595,7 @@ x 422
|
|
|
595
595
|
y 495
|
|
596
596
|
w 75
|
|
597
597
|
h 25
|
|
598
|
-
controlPv "BL24I-MO-IOC-
|
|
598
|
+
controlPv "BL24I-MO-IOC-13:GP107"
|
|
599
599
|
font "arial-medium-r-16.0"
|
|
600
600
|
fgColor index 16
|
|
601
601
|
bgColor index 10
|
|
@@ -616,7 +616,7 @@ x 422
|
|
|
616
616
|
y 526
|
|
617
617
|
w 75
|
|
618
618
|
h 25
|
|
619
|
-
controlPv "BL24I-MO-IOC-
|
|
619
|
+
controlPv "BL24I-MO-IOC-13:GP108"
|
|
620
620
|
font "arial-medium-r-16.0"
|
|
621
621
|
fgColor index 16
|
|
622
622
|
bgColor index 10
|
|
@@ -658,7 +658,7 @@ x 156
|
|
|
658
658
|
y 382
|
|
659
659
|
w 75
|
|
660
660
|
h 25
|
|
661
|
-
controlPv "BL24I-MO-IOC-
|
|
661
|
+
controlPv "BL24I-MO-IOC-13:GP103"
|
|
662
662
|
font "helvetica-medium-r-18.0"
|
|
663
663
|
fgColor index 25
|
|
664
664
|
bgColor index 3
|
|
@@ -866,7 +866,7 @@ x 141
|
|
|
866
866
|
y 637
|
|
867
867
|
w 75
|
|
868
868
|
h 25
|
|
869
|
-
controlPv "BL24I-MO-IOC-
|
|
869
|
+
controlPv "BL24I-MO-IOC-13:GP109"
|
|
870
870
|
font "helvetica-medium-r-18.0"
|
|
871
871
|
fgColor index 25
|
|
872
872
|
bgColor index 3
|
|
@@ -1058,7 +1058,7 @@ fontAlign "center"
|
|
|
1058
1058
|
fgColor index 38
|
|
1059
1059
|
bgColor index 0
|
|
1060
1060
|
useDisplayBg
|
|
1061
|
-
visPv "BL24I-MO-IOC-
|
|
1061
|
+
visPv "BL24I-MO-IOC-13:GP109"
|
|
1062
1062
|
visMin "0.00001"
|
|
1063
1063
|
visMax "999"
|
|
1064
1064
|
value {
|
|
@@ -1158,7 +1158,7 @@ x 144
|
|
|
1158
1158
|
y 124
|
|
1159
1159
|
w 75
|
|
1160
1160
|
h 25
|
|
1161
|
-
controlPv "BL24I-MO-IOC-
|
|
1161
|
+
controlPv "BL24I-MO-IOC-13:GP103"
|
|
1162
1162
|
font "helvetica-medium-r-18.0"
|
|
1163
1163
|
fgColor index 25
|
|
1164
1164
|
bgColor index 3
|
|
@@ -1451,7 +1451,7 @@ x 144
|
|
|
1451
1451
|
y 155
|
|
1452
1452
|
w 75
|
|
1453
1453
|
h 25
|
|
1454
|
-
controlPv "BL24I-MO-IOC-
|
|
1454
|
+
controlPv "BL24I-MO-IOC-13:GP110"
|
|
1455
1455
|
font "helvetica-medium-r-18.0"
|
|
1456
1456
|
fgColor index 25
|
|
1457
1457
|
bgColor index 3
|
|
@@ -1573,7 +1573,7 @@ fgColor index 14
|
|
|
1573
1573
|
bgColor index 3
|
|
1574
1574
|
topShadowColor index 1
|
|
1575
1575
|
botShadowColor index 8
|
|
1576
|
-
controlPv "BL24I-MO-IOC-
|
|
1576
|
+
controlPv "BL24I-MO-IOC-13:GP111"
|
|
1577
1577
|
font "arial-medium-r-18.0"
|
|
1578
1578
|
numItems 2
|
|
1579
1579
|
symbolTag {
|
|
@@ -257,7 +257,7 @@ def set_datasize(
|
|
|
257
257
|
SSX_LOGGER.debug(f"Num exposures: {parameters.num_exposures}")
|
|
258
258
|
SSX_LOGGER.debug(f"Block count: {len(parameters.chip_map)}")
|
|
259
259
|
|
|
260
|
-
caput(pv.
|
|
260
|
+
caput(pv.ioc13_gp10, parameters.total_num_images)
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
@log_on_entry
|
|
@@ -331,6 +331,7 @@ def start_i24(
|
|
|
331
331
|
parameters.exposure_time_s,
|
|
332
332
|
],
|
|
333
333
|
dcm,
|
|
334
|
+
detector_stage,
|
|
334
335
|
)
|
|
335
336
|
|
|
336
337
|
# DCID process depends on detector PVs being set up already
|
|
@@ -387,6 +388,7 @@ def finish_i24(
|
|
|
387
388
|
pmac: PMAC,
|
|
388
389
|
shutter: HutchShutter,
|
|
389
390
|
dcm: DCM,
|
|
391
|
+
detector_stage: YZStage,
|
|
390
392
|
parameters: FixedTargetParameters,
|
|
391
393
|
):
|
|
392
394
|
SSX_LOGGER.info(
|
|
@@ -400,7 +402,7 @@ def finish_i24(
|
|
|
400
402
|
if parameters.detector_name == "eiger":
|
|
401
403
|
SSX_LOGGER.debug("Finish I24 Eiger")
|
|
402
404
|
yield from reset_zebra_when_collection_done_plan(zebra)
|
|
403
|
-
yield from sup.eiger("return-to-normal", None, dcm)
|
|
405
|
+
yield from sup.eiger("return-to-normal", None, dcm, detector_stage)
|
|
404
406
|
complete_filename = cagetstring(pv.eiger_od_filename_rbv) # type: ignore
|
|
405
407
|
else:
|
|
406
408
|
raise ValueError(f"{parameters.detector_name} unrecognised")
|
|
@@ -548,6 +550,7 @@ def tidy_up_after_collection_plan(
|
|
|
548
550
|
pmac: PMAC,
|
|
549
551
|
shutter: HutchShutter,
|
|
550
552
|
dcm: DCM,
|
|
553
|
+
detector_stage: YZStage,
|
|
551
554
|
parameters: FixedTargetParameters,
|
|
552
555
|
dcid: DCID,
|
|
553
556
|
) -> MsgGenerator:
|
|
@@ -565,7 +568,7 @@ def tidy_up_after_collection_plan(
|
|
|
565
568
|
caput(pv.eiger_od_capture, "Done")
|
|
566
569
|
yield from bps.sleep(0.5)
|
|
567
570
|
|
|
568
|
-
yield from finish_i24(zebra, pmac, shutter, dcm, parameters)
|
|
571
|
+
yield from finish_i24(zebra, pmac, shutter, dcm, detector_stage, parameters)
|
|
569
572
|
|
|
570
573
|
SSX_LOGGER.debug("Notify DCID of end of collection.")
|
|
571
574
|
dcid.notify_end()
|
|
@@ -653,7 +656,7 @@ def run_plan_in_wrapper(
|
|
|
653
656
|
except_plan=lambda e: (yield from run_aborted_plan(pmac, dcid, e)),
|
|
654
657
|
final_plan=lambda: (
|
|
655
658
|
yield from tidy_up_after_collection_plan(
|
|
656
|
-
zebra, pmac, shutter, dcm, parameters, dcid
|
|
659
|
+
zebra, pmac, shutter, dcm, detector_stage, parameters, dcid
|
|
657
660
|
)
|
|
658
661
|
),
|
|
659
662
|
auto_raise=False,
|
|
@@ -53,11 +53,11 @@ CHIP_MOVES = {
|
|
|
53
53
|
}
|
|
54
54
|
OXFORD_CHIP_WIDTH = 8
|
|
55
55
|
PVAR_TEMPLATE = f"P3%0{2}d1"
|
|
56
|
-
CHIPTYPE_PV = pv.
|
|
57
|
-
MAPTYPE_PV = pv.
|
|
58
|
-
NUM_EXPOSURES_PV = pv.
|
|
59
|
-
PUMP_REPEAT_PV = pv.
|
|
60
|
-
MAP_FILEPATH_PV = pv.
|
|
56
|
+
CHIPTYPE_PV = pv.ioc13_gp1
|
|
57
|
+
MAPTYPE_PV = pv.ioc13_gp2
|
|
58
|
+
NUM_EXPOSURES_PV = pv.ioc13_gp3
|
|
59
|
+
PUMP_REPEAT_PV = pv.ioc13_gp4
|
|
60
|
+
MAP_FILEPATH_PV = pv.ioc13_gp5
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
@log_on_entry
|
|
@@ -70,9 +70,9 @@ def initialise_stages(
|
|
|
70
70
|
group = "initialise_stages"
|
|
71
71
|
SSX_LOGGER.info("Setting velocity, acceleration and limits for stages")
|
|
72
72
|
|
|
73
|
-
yield from bps.abs_set(pmac.x.velocity,
|
|
74
|
-
yield from bps.abs_set(pmac.y.velocity,
|
|
75
|
-
yield from bps.abs_set(pmac.z.velocity,
|
|
73
|
+
yield from bps.abs_set(pmac.x.velocity, 15, group=group)
|
|
74
|
+
yield from bps.abs_set(pmac.y.velocity, 15, group=group)
|
|
75
|
+
yield from bps.abs_set(pmac.z.velocity, 15, group=group)
|
|
76
76
|
yield from bps.abs_set(pmac.x.acceleration_time, 0.01, group=group)
|
|
77
77
|
yield from bps.abs_set(pmac.y.acceleration_time, 0.01, group=group)
|
|
78
78
|
yield from bps.abs_set(pmac.z.acceleration_time, 0.01, group=group)
|
|
@@ -101,7 +101,7 @@ def initialise_stages(
|
|
|
101
101
|
if i == 100:
|
|
102
102
|
# Do not clear visit PV
|
|
103
103
|
continue
|
|
104
|
-
pvar = "BL24I-MO-IOC-
|
|
104
|
+
pvar = "BL24I-MO-IOC-13:GP" + str(i)
|
|
105
105
|
caput(pvar, 0)
|
|
106
106
|
sys.stdout.write(".")
|
|
107
107
|
sys.stdout.flush()
|
|
@@ -112,7 +112,7 @@ def initialise_stages(
|
|
|
112
112
|
|
|
113
113
|
def _is_checker_pattern() -> bool:
|
|
114
114
|
"""Read the checker pattern value and return True if selected."""
|
|
115
|
-
checks = int(caget(pv.
|
|
115
|
+
checks = int(caget(pv.ioc13_gp111))
|
|
116
116
|
return bool(checks)
|
|
117
117
|
|
|
118
118
|
|
|
@@ -164,9 +164,9 @@ def read_parameters(
|
|
|
164
164
|
"pump_repeat": pump_repeat,
|
|
165
165
|
"checker_pattern": _is_checker_pattern(),
|
|
166
166
|
"chip_map": chip_map,
|
|
167
|
-
"laser_dwell_s": float(caget(pv.
|
|
168
|
-
"laser_delay_s": float(caget(pv.
|
|
169
|
-
"pre_pump_exposure_s": float(caget(pv.
|
|
167
|
+
"laser_dwell_s": float(caget(pv.ioc13_gp103)) if pump_repeat != 0 else 0.0,
|
|
168
|
+
"laser_delay_s": float(caget(pv.ioc13_gp110)) if pump_repeat != 0 else 0.0,
|
|
169
|
+
"pre_pump_exposure_s": float(caget(pv.ioc13_gp109))
|
|
170
170
|
if pump_repeat != 0
|
|
171
171
|
else None,
|
|
172
172
|
}
|
|
@@ -212,7 +212,7 @@ def define_current_chip(
|
|
|
212
212
|
"""
|
|
213
213
|
Not sure what this is for:
|
|
214
214
|
print 'Setting Mapping Type to Lite'
|
|
215
|
-
caput(pv.
|
|
215
|
+
caput(pv.ioc13_gp2, 1)
|
|
216
216
|
"""
|
|
217
217
|
chip_type = int(caget(CHIPTYPE_PV))
|
|
218
218
|
SSX_LOGGER.info(f"Chip type:{chip_type} Chipid:{chipid}")
|
|
@@ -441,14 +441,14 @@ def load_stock_map(map_choice: str = "clear") -> MsgGenerator:
|
|
|
441
441
|
|
|
442
442
|
SSX_LOGGER.info("Clearing GP 10-74") # Actually 11-44
|
|
443
443
|
for i in range(1, 65):
|
|
444
|
-
pvar = "BL24I-MO-IOC-
|
|
444
|
+
pvar = "BL24I-MO-IOC-13:GP" + str(i + 10)
|
|
445
445
|
caput(pvar, 0)
|
|
446
446
|
sys.stdout.write(".")
|
|
447
447
|
sys.stdout.flush()
|
|
448
448
|
SSX_LOGGER.info("Map cleared")
|
|
449
449
|
SSX_LOGGER.info(f"Loading Map Choice {map_choice}")
|
|
450
450
|
for i in map_dict[map_choice]:
|
|
451
|
-
pvar = "BL24I-MO-IOC-
|
|
451
|
+
pvar = "BL24I-MO-IOC-13:GP" + str(i + 10)
|
|
452
452
|
caput(pvar, 1)
|
|
453
453
|
SSX_LOGGER.debug("Load stock map done.")
|
|
454
454
|
yield from bps.null()
|
|
@@ -513,7 +513,7 @@ def load_lite_map() -> MsgGenerator:
|
|
|
513
513
|
block_name = entry[0]
|
|
514
514
|
yesno = entry[1]
|
|
515
515
|
block_num = block_dict[block_name]
|
|
516
|
-
pvar = "BL24I-MO-IOC-
|
|
516
|
+
pvar = "BL24I-MO-IOC-13:GP" + str(int(block_num) + 10)
|
|
517
517
|
SSX_LOGGER.info(f"Block: {block_name} \tScanned: {yesno} \tPVAR: {pvar}")
|
|
518
518
|
SSX_LOGGER.debug("Load lite map done")
|
|
519
519
|
yield from bps.null()
|
|
@@ -603,7 +603,7 @@ def laser_control(laser_setting: str, pmac: PMAC = inject("pmac")) -> MsgGenerat
|
|
|
603
603
|
yield from bps.abs_set(pmac.laser, LaserSettings.LASER_2_OFF, wait=True)
|
|
604
604
|
|
|
605
605
|
elif laser_setting == "laser1burn":
|
|
606
|
-
led_burn_time = caget(pv.
|
|
606
|
+
led_burn_time = caget(pv.ioc13_gp103)
|
|
607
607
|
SSX_LOGGER.info("Laser 1 on")
|
|
608
608
|
SSX_LOGGER.info(f"Burn time is {led_burn_time} s")
|
|
609
609
|
yield from bps.abs_set(pmac.laser, LaserSettings.LASER_1_ON, wait=True)
|
|
@@ -612,7 +612,7 @@ def laser_control(laser_setting: str, pmac: PMAC = inject("pmac")) -> MsgGenerat
|
|
|
612
612
|
yield from bps.abs_set(pmac.laser, LaserSettings.LASER_1_OFF, wait=True)
|
|
613
613
|
|
|
614
614
|
elif laser_setting == "laser2burn":
|
|
615
|
-
led_burn_time = caget(pv.
|
|
615
|
+
led_burn_time = caget(pv.ioc13_gp109)
|
|
616
616
|
SSX_LOGGER.info("Laser 2 on")
|
|
617
617
|
SSX_LOGGER.info(f"burntime {led_burn_time} s")
|
|
618
618
|
yield from bps.abs_set(pmac.laser, LaserSettings.LASER_2_ON, wait=True)
|
|
@@ -806,9 +806,9 @@ def cs_maker(pmac: PMAC = inject("pmac")) -> MsgGenerator:
|
|
|
806
806
|
new_x2factor = (x2factor * cod_d) + (y2factor * sin_d)
|
|
807
807
|
new_y2factor = (x2factor * sin_d) + (y2factor * cod_d)
|
|
808
808
|
|
|
809
|
-
cs1 = f"#
|
|
810
|
-
cs2 = f"#
|
|
811
|
-
cs3 = f"#
|
|
809
|
+
cs1 = f"#5->{new_x1factor:+1.3f}X{new_y1factor:+1.3f}Y{z1factor:+1.3f}Z"
|
|
810
|
+
cs2 = f"#6->{new_x2factor:+1.3f}X{new_y2factor:+1.3f}Y{z2factor:+1.3f}Z"
|
|
811
|
+
cs3 = f"#7->{x3factor:+1.3f}X{y3factor:+1.3f}Y{z3factor:+1.3f}Z"
|
|
812
812
|
SSX_LOGGER.info(f"PMAC strings. \ncs1: {cs1} \ncs2: {cs2}cs3: {cs3}")
|
|
813
813
|
SSX_LOGGER.info(
|
|
814
814
|
"""These next values should be 1.
|
|
@@ -825,14 +825,17 @@ def cs_maker(pmac: PMAC = inject("pmac")) -> MsgGenerator:
|
|
|
825
825
|
yield from bps.trigger(pmac.to_xyz_zero)
|
|
826
826
|
yield from bps.sleep(2.5)
|
|
827
827
|
yield from bps.trigger(pmac.home, wait=True)
|
|
828
|
+
yield from bps.trigger(pmac.abort_program, wait=True)
|
|
828
829
|
yield from bps.sleep(2.5)
|
|
829
830
|
SSX_LOGGER.debug(f"Chip_type is {chip_type}")
|
|
830
831
|
if chip_type == 0:
|
|
831
832
|
yield from bps.abs_set(pmac.pmac_string, f"{CS_STR}!x0.4y0.4", wait=True)
|
|
832
833
|
yield from bps.sleep(2.5)
|
|
833
834
|
yield from bps.trigger(pmac.home, wait=True)
|
|
835
|
+
yield from bps.trigger(pmac.abort_program, wait=True)
|
|
834
836
|
else:
|
|
835
837
|
yield from bps.trigger(pmac.home, wait=True)
|
|
838
|
+
yield from bps.trigger(pmac.abort_program, wait=True)
|
|
836
839
|
SSX_LOGGER.debug("CSmaker done.")
|
|
837
840
|
yield from bps.null()
|
|
838
841
|
|
|
@@ -875,7 +878,7 @@ def pumpprobe_calc() -> MsgGenerator:
|
|
|
875
878
|
# TODO See https://github.com/DiamondLightSource/mx_bluesky/issues/122
|
|
876
879
|
SSX_LOGGER.info("Calculate and show exposure and dwell time for each option.")
|
|
877
880
|
exptime = float(caget(pv.me14e_exptime))
|
|
878
|
-
pumpexptime = float(caget(pv.
|
|
881
|
+
pumpexptime = float(caget(pv.ioc13_gp103))
|
|
879
882
|
movetime = 0.014
|
|
880
883
|
SSX_LOGGER.info(f"X-ray exposure time {exptime}")
|
|
881
884
|
SSX_LOGGER.info(f"Laser dwell time {pumpexptime}")
|
|
@@ -885,11 +888,11 @@ def pumpprobe_calc() -> MsgGenerator:
|
|
|
885
888
|
repeat5 = 10 * 20 * (movetime + (pumpexptime + exptime) / 2)
|
|
886
889
|
repeat10 = 20 * 20 * (movetime + (pumpexptime + exptime) / 2)
|
|
887
890
|
for pv_name, repeat in (
|
|
888
|
-
(pv.
|
|
889
|
-
(pv.
|
|
890
|
-
(pv.
|
|
891
|
-
(pv.
|
|
892
|
-
(pv.
|
|
891
|
+
(pv.ioc13_gp104, repeat1),
|
|
892
|
+
(pv.ioc13_gp105, repeat2),
|
|
893
|
+
(pv.ioc13_gp106, repeat3),
|
|
894
|
+
(pv.ioc13_gp107, repeat5),
|
|
895
|
+
(pv.ioc13_gp108, repeat10),
|
|
893
896
|
):
|
|
894
897
|
rounded = round(repeat, 4)
|
|
895
898
|
caput(pv_name, rounded)
|
|
@@ -901,9 +904,9 @@ def pumpprobe_calc() -> MsgGenerator:
|
|
|
901
904
|
@log_on_entry
|
|
902
905
|
def block_check(pmac: PMAC = inject("pmac")) -> MsgGenerator:
|
|
903
906
|
# TODO See https://github.com/DiamondLightSource/mx_bluesky/issues/117
|
|
904
|
-
caput(pv.
|
|
907
|
+
caput(pv.ioc13_gp9, 0)
|
|
905
908
|
while True:
|
|
906
|
-
if int(caget(pv.
|
|
909
|
+
if int(caget(pv.ioc13_gp9)) == 0:
|
|
907
910
|
chip_type = int(caget(CHIPTYPE_PV))
|
|
908
911
|
if chip_type == ChipType.Minichip:
|
|
909
912
|
SSX_LOGGER.info("Oxford mini chip in use.")
|
|
@@ -918,7 +921,7 @@ def block_check(pmac: PMAC = inject("pmac")) -> MsgGenerator:
|
|
|
918
921
|
SSX_LOGGER.warning("Default is Oxford chip block start list.")
|
|
919
922
|
block_start_list = scrape_pvar_file("oxford.pvar")
|
|
920
923
|
for entry in block_start_list:
|
|
921
|
-
if int(caget(pv.
|
|
924
|
+
if int(caget(pv.ioc13_gp9)) != 0:
|
|
922
925
|
SSX_LOGGER.warning("Block Check Aborted")
|
|
923
926
|
yield from bps.sleep(1.0)
|
|
924
927
|
break
|
|
@@ -927,7 +930,7 @@ def block_check(pmac: PMAC = inject("pmac")) -> MsgGenerator:
|
|
|
927
930
|
yield from bps.abs_set(
|
|
928
931
|
pmac.pmac_string, f"{CS_STR}!x{x}y{y}", wait=True
|
|
929
932
|
)
|
|
930
|
-
yield from bps.sleep(0.
|
|
933
|
+
yield from bps.sleep(0.5)
|
|
931
934
|
else:
|
|
932
935
|
SSX_LOGGER.warning("Block Check Aborted due to GP 9 not equalling 0")
|
|
933
936
|
break
|
|
@@ -7,7 +7,7 @@ from mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters import (
|
|
|
7
7
|
)
|
|
8
8
|
from mx_bluesky.beamlines.i24.serial.setup_beamline import caget, pv
|
|
9
9
|
|
|
10
|
-
OXFORD_BLOCKS_PVS = [f"BL24I-MO-IOC-
|
|
10
|
+
OXFORD_BLOCKS_PVS = [f"BL24I-MO-IOC-13:GP{i}" for i in range(11, 75)]
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class EmptyMapError(Exception):
|
|
@@ -54,10 +54,10 @@ def get_chip_format(
|
|
|
54
54
|
defaults["b2b_horz"] = defaults["b2b_vert"] = 0.0
|
|
55
55
|
case ChipType.Custom:
|
|
56
56
|
if origin == "edm":
|
|
57
|
-
defaults["x_num_steps"] = int(caget(pv.
|
|
58
|
-
defaults["y_num_steps"] = int(caget(pv.
|
|
59
|
-
defaults["x_step_size"] = float(caget(pv.
|
|
60
|
-
defaults["y_step_size"] = float(caget(pv.
|
|
57
|
+
defaults["x_num_steps"] = int(caget(pv.ioc13_gp6))
|
|
58
|
+
defaults["y_num_steps"] = int(caget(pv.ioc13_gp7))
|
|
59
|
+
defaults["x_step_size"] = float(caget(pv.ioc13_gp8))
|
|
60
|
+
defaults["y_step_size"] = float(caget(pv.ioc13_gp99))
|
|
61
61
|
else:
|
|
62
62
|
# NOTE Test for WEB GUI
|
|
63
63
|
if not format:
|