mx-bluesky 1.5.10__py3-none-any.whl → 1.5.12__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.
Files changed (121) hide show
  1. mx_bluesky/_version.py +2 -2
  2. mx_bluesky/beamlines/aithre_lasershaping/experiment_plans/__init__.py +0 -0
  3. mx_bluesky/beamlines/aithre_lasershaping/experiment_plans/robot_load_plan.py +198 -0
  4. mx_bluesky/beamlines/aithre_lasershaping/goniometer_controls.py +2 -2
  5. mx_bluesky/beamlines/aithre_lasershaping/parameters/__init__.py +0 -0
  6. mx_bluesky/beamlines/aithre_lasershaping/parameters/constants.py +17 -0
  7. mx_bluesky/beamlines/aithre_lasershaping/parameters/robot_load_parameters.py +13 -0
  8. mx_bluesky/beamlines/aithre_lasershaping/pin_tip_centring.py +31 -0
  9. mx_bluesky/beamlines/aithre_lasershaping/robot_load.py +80 -0
  10. mx_bluesky/beamlines/i02_1/parameters/gridscan.py +1 -1
  11. mx_bluesky/beamlines/i04/__init__.py +6 -2
  12. mx_bluesky/beamlines/i04/callbacks/murko_callback.py +27 -12
  13. mx_bluesky/beamlines/i04/experiment_plans/i04_grid_detect_then_xray_centre_plan.py +94 -20
  14. mx_bluesky/beamlines/i04/external_interaction/__init__.py +0 -0
  15. mx_bluesky/beamlines/i04/external_interaction/config_server.py +15 -0
  16. mx_bluesky/beamlines/i04/oav_centering_plans/__init__.py +0 -0
  17. mx_bluesky/beamlines/i04/oav_centering_plans/oav_imaging.py +115 -0
  18. mx_bluesky/beamlines/i04/parameters/__init__.py +0 -0
  19. mx_bluesky/beamlines/i04/parameters/constants.py +21 -0
  20. mx_bluesky/beamlines/i04/redis_to_murko_forwarder.py +24 -1
  21. mx_bluesky/beamlines/i04/thawing_plan.py +149 -154
  22. mx_bluesky/beamlines/i24/jungfrau_commissioning/experiment_plans/do_darks.py +55 -10
  23. mx_bluesky/beamlines/i24/jungfrau_commissioning/plan_stubs/do_external_acquisition.py +1 -1
  24. mx_bluesky/beamlines/i24/jungfrau_commissioning/plan_stubs/plan_utils.py +1 -1
  25. mx_bluesky/beamlines/i24/serial/__init__.py +7 -5
  26. mx_bluesky/beamlines/i24/serial/dcid.py +6 -7
  27. mx_bluesky/beamlines/i24/serial/extruder/{i24ssx_Extruder_Collect_py3v2.py → i24ssx_extruder_collect_py3v2.py} +70 -37
  28. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl +11 -11
  29. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl +3 -3
  30. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +142 -142
  31. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl +135 -135
  32. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/PMAC_Command.edl +8 -8
  33. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl +13 -13
  34. mx_bluesky/beamlines/i24/serial/fixed_target/{i24ssx_Chip_Collect_py3v1.py → i24ssx_chip_collect_py3v1.py} +12 -9
  35. mx_bluesky/beamlines/i24/serial/fixed_target/{i24ssx_Chip_Manager_py3v1.py → i24ssx_chip_manager_py3v1.py} +81 -78
  36. mx_bluesky/beamlines/i24/serial/fixed_target/{i24ssx_Chip_StartUp_py3v1.py → i24ssx_chip_startup_py3v1.py} +3 -3
  37. mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_moveonclick.py +33 -33
  38. mx_bluesky/beamlines/i24/serial/log.py +11 -11
  39. mx_bluesky/beamlines/i24/serial/parameters/fixed_target/cs/cs_maker.json +3 -3
  40. mx_bluesky/beamlines/i24/serial/parameters/utils.py +5 -5
  41. mx_bluesky/beamlines/i24/serial/setup_beamline/ca.py +0 -12
  42. mx_bluesky/beamlines/i24/serial/setup_beamline/pv.py +122 -334
  43. mx_bluesky/beamlines/i24/serial/setup_beamline/pv_abstract.py +5 -5
  44. mx_bluesky/beamlines/i24/serial/setup_beamline/setup_beamline.py +30 -251
  45. mx_bluesky/beamlines/i24/serial/setup_beamline/setup_detector.py +3 -3
  46. mx_bluesky/beamlines/i24/serial/setup_beamline/setup_zebra_plans.py +4 -4
  47. mx_bluesky/beamlines/i24/serial/web_gui_plans/general_plans.py +103 -16
  48. mx_bluesky/beamlines/i24/serial/web_gui_plans/oav_plans.py +64 -0
  49. mx_bluesky/beamlines/i24/serial/write_nexus.py +4 -4
  50. mx_bluesky/common/device_setup_plans/gonio.py +28 -0
  51. mx_bluesky/common/device_setup_plans/manipulate_sample.py +8 -1
  52. mx_bluesky/common/device_setup_plans/robot_load_unload.py +1 -1
  53. mx_bluesky/common/device_setup_plans/setup_oav.py +8 -0
  54. mx_bluesky/common/device_setup_plans/setup_zebra_and_shutter.py +0 -5
  55. mx_bluesky/common/device_setup_plans/xbpm_feedback.py +8 -1
  56. mx_bluesky/common/experiment_plans/beamstop_check.py +229 -0
  57. mx_bluesky/common/experiment_plans/common_flyscan_xray_centre_plan.py +8 -6
  58. mx_bluesky/common/experiment_plans/common_grid_detect_then_xray_centre_plan.py +2 -2
  59. mx_bluesky/common/experiment_plans/inner_plans/do_fgs.py +1 -1
  60. mx_bluesky/common/experiment_plans/inner_plans/read_hardware.py +7 -4
  61. mx_bluesky/common/experiment_plans/inner_plans/write_sample_status.py +2 -2
  62. mx_bluesky/common/experiment_plans/oav_snapshot_plan.py +1 -2
  63. mx_bluesky/{hyperion → common}/experiment_plans/pin_tip_centring_plan.py +23 -24
  64. mx_bluesky/common/external_interaction/callbacks/common/grid_detection_callback.py +5 -0
  65. mx_bluesky/common/external_interaction/callbacks/common/ispyb_callback_base.py +13 -15
  66. mx_bluesky/common/external_interaction/callbacks/common/ispyb_mapping.py +3 -5
  67. mx_bluesky/common/external_interaction/callbacks/common/plan_reactive_callback.py +1 -1
  68. mx_bluesky/common/external_interaction/callbacks/common/zocalo_callback.py +2 -2
  69. mx_bluesky/common/external_interaction/callbacks/sample_handling/sample_handling_callback.py +3 -3
  70. mx_bluesky/common/external_interaction/callbacks/xray_centre/ispyb_callback.py +12 -10
  71. mx_bluesky/common/external_interaction/callbacks/xray_centre/nexus_callback.py +2 -2
  72. mx_bluesky/common/external_interaction/config_server.py +4 -4
  73. mx_bluesky/common/external_interaction/ispyb/data_model.py +11 -4
  74. mx_bluesky/common/external_interaction/ispyb/exp_eye_store.py +163 -4
  75. mx_bluesky/common/external_interaction/ispyb/ispyb_store.py +76 -167
  76. mx_bluesky/common/external_interaction/ispyb/ispyb_utils.py +0 -14
  77. mx_bluesky/common/external_interaction/nexus/nexus_utils.py +2 -2
  78. mx_bluesky/common/external_interaction/nexus/write_nexus.py +3 -3
  79. mx_bluesky/common/parameters/components.py +1 -0
  80. mx_bluesky/common/parameters/constants.py +4 -3
  81. mx_bluesky/common/parameters/device_composites.py +4 -2
  82. mx_bluesky/common/parameters/gridscan.py +2 -2
  83. mx_bluesky/common/utils/exceptions.py +24 -7
  84. mx_bluesky/common/utils/log.py +13 -4
  85. mx_bluesky/common/utils/tracing.py +5 -5
  86. mx_bluesky/common/utils/utils.py +56 -8
  87. mx_bluesky/hyperion/__main__.py +6 -16
  88. mx_bluesky/hyperion/baton_handler.py +38 -14
  89. mx_bluesky/hyperion/device_setup_plans/utils.py +1 -1
  90. mx_bluesky/hyperion/experiment_plans/experiment_registry.py +1 -1
  91. mx_bluesky/hyperion/experiment_plans/hyperion_flyscan_xray_centre_plan.py +15 -13
  92. mx_bluesky/hyperion/experiment_plans/load_centre_collect_full_plan.py +2 -2
  93. mx_bluesky/hyperion/experiment_plans/optimise_attenuation_plan.py +9 -9
  94. mx_bluesky/hyperion/experiment_plans/pin_centre_then_xray_centre_plan.py +7 -8
  95. mx_bluesky/hyperion/experiment_plans/robot_load_and_change_energy.py +3 -10
  96. mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py +4 -2
  97. mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py +10 -4
  98. mx_bluesky/hyperion/experiment_plans/set_energy_plan.py +2 -2
  99. mx_bluesky/hyperion/experiment_plans/udc_default_state.py +160 -0
  100. mx_bluesky/hyperion/external_interaction/agamemnon.py +3 -3
  101. mx_bluesky/hyperion/external_interaction/callbacks/__main__.py +2 -2
  102. mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_callback.py +3 -3
  103. mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_mapping.py +1 -0
  104. mx_bluesky/hyperion/external_interaction/callbacks/rotation/nexus_callback.py +3 -6
  105. mx_bluesky/hyperion/external_interaction/config_server.py +5 -5
  106. mx_bluesky/hyperion/parameters/constants.py +11 -4
  107. mx_bluesky/hyperion/parameters/device_composites.py +2 -2
  108. mx_bluesky/hyperion/parameters/gridscan.py +4 -4
  109. mx_bluesky/hyperion/parameters/robot_load.py +1 -9
  110. mx_bluesky/hyperion/plan_runner.py +6 -6
  111. mx_bluesky/hyperion/runner.py +10 -8
  112. mx_bluesky/jupyter_example.ipynb +3 -3
  113. {mx_bluesky-1.5.10.dist-info → mx_bluesky-1.5.12.dist-info}/METADATA +9 -7
  114. {mx_bluesky-1.5.10.dist-info → mx_bluesky-1.5.12.dist-info}/RECORD +118 -104
  115. mx_bluesky/common/experiment_plans/inner_plans/udc_default_state.py +0 -65
  116. mx_bluesky/common/external_interaction/callbacks/common/logging_callback.py +0 -29
  117. mx_bluesky/hyperion/device_setup_plans/smargon.py +0 -25
  118. {mx_bluesky-1.5.10.dist-info → mx_bluesky-1.5.12.dist-info}/WHEEL +0 -0
  119. {mx_bluesky-1.5.10.dist-info → mx_bluesky-1.5.12.dist-info}/entry_points.txt +0 -0
  120. {mx_bluesky-1.5.10.dist-info → mx_bluesky-1.5.12.dist-info}/licenses/LICENSE +0 -0
  121. {mx_bluesky-1.5.10.dist-info → mx_bluesky-1.5.12.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 134
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 153
33
- h 23
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-EA-CHIP-01:PMAC_STRING"
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 23
72
- controlPv "BL24I-EA-CHIP-01:SEND_STRING.AINP"
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 145
93
- h 23
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 237
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-EA-CHIP-01:expTime"
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-01:GP104"
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-01:GP105"
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-01:GP106"
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-01:GP107"
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-01:GP108"
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-01:GP103"
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-01:GP109"
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-01:GP109"
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-01:GP103"
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-01:GP110"
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-01:GP111"
1576
+ controlPv "BL24I-MO-IOC-13:GP111"
1577
1577
  font "arial-medium-r-18.0"
1578
1578
  numItems 2
1579
1579
  symbolTag {
@@ -31,7 +31,7 @@ from mx_bluesky.beamlines.i24.serial.fixed_target.ft_utils import (
31
31
  MappingType,
32
32
  PumpProbeSetting,
33
33
  )
34
- from mx_bluesky.beamlines.i24.serial.fixed_target.i24ssx_Chip_Manager_py3v1 import (
34
+ from mx_bluesky.beamlines.i24.serial.fixed_target.i24ssx_chip_manager_py3v1 import (
35
35
  read_parameters,
36
36
  upload_chip_map_to_geobrick,
37
37
  )
@@ -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.me14e_gp10, parameters.total_num_images)
260
+ caput(pv.ioc13_gp10, parameters.total_num_images)
261
261
 
262
262
 
263
263
  @log_on_entry
@@ -331,11 +331,12 @@ 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
337
338
  SSX_LOGGER.debug("Start DCID process")
338
- complete_filename = cagetstring(pv.eiger_ODfilenameRBV)
339
+ complete_filename = cagetstring(pv.eiger_od_filename_rbv)
339
340
  filetemplate = f"{complete_filename}.nxs"
340
341
  dcid.generate_dcid(
341
342
  beam_settings=beam_settings,
@@ -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,8 +402,8 @@ 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)
404
- complete_filename = cagetstring(pv.eiger_ODfilenameRBV) # type: ignore
405
+ yield from sup.eiger("return-to-normal", None, dcm, detector_stage)
406
+ complete_filename = cagetstring(pv.eiger_od_filename_rbv) # type: ignore
405
407
  else:
406
408
  raise ValueError(f"{parameters.detector_name} unrecognised")
407
409
 
@@ -538,7 +540,7 @@ def collection_complete_plan(
538
540
  SSX_LOGGER.debug(f"Collection end time {end_time}")
539
541
  dcid.collection_complete(end_time, aborted=False)
540
542
 
541
- # NOTE no files to copy anymore but shoud write userlog here
543
+ # NOTE no files to copy anymore but should write userlog here
542
544
  yield from bps.null()
543
545
 
544
546
 
@@ -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:
@@ -562,10 +565,10 @@ def tidy_up_after_collection_plan(
562
565
  if parameters.detector_name == "eiger":
563
566
  SSX_LOGGER.debug("Eiger Acquire STOP")
564
567
  caput(pv.eiger_acquire, 0)
565
- caput(pv.eiger_ODcapture, "Done")
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.me14e_gp1
57
- MAPTYPE_PV = pv.me14e_gp2
58
- NUM_EXPOSURES_PV = pv.me14e_gp3
59
- PUMP_REPEAT_PV = pv.me14e_gp4
60
- MAP_FILEPATH_PV = pv.me14e_gp5
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, 20, group=group)
74
- yield from bps.abs_set(pmac.y.velocity, 20, group=group)
75
- yield from bps.abs_set(pmac.z.velocity, 20, group=group)
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-01:GP" + str(i)
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.me14e_gp111))
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.me14e_gp103)) if pump_repeat != 0 else 0.0,
168
- "laser_delay_s": float(caget(pv.me14e_gp110)) if pump_repeat != 0 else 0.0,
169
- "pre_pump_exposure_s": float(caget(pv.me14e_gp109))
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.me14e_gp2, 1)
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-01:GP" + str(i + 10)
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-01:GP" + str(i + 10)
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()
@@ -459,7 +459,7 @@ def load_lite_map() -> MsgGenerator:
459
459
  SSX_LOGGER.debug("Run load stock map with 'clear' setting.")
460
460
  yield from load_stock_map("clear")
461
461
  # fmt: off
462
- # Oxford_block_dict is wrong (columns and rows need to flip) added in script below to generate it automatically however kept this for backwards compatiability/reference
462
+ # Oxford_block_dict is wrong (columns and rows need to flip) added in script below to generate it automatically however kept this for backwards compatibility/reference
463
463
  oxford_block_dict = { # noqa: F841
464
464
  'A1': '01', 'A2': '02', 'A3': '03', 'A4': '04', 'A5': '05', 'A6': '06', 'A7': '07', 'A8': '08',
465
465
  'B1': '16', 'B2': '15', 'B3': '14', 'B4': '13', 'B5': '12', 'B6': '11', 'B7': '10', 'B8': '09',
@@ -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-01:GP" + str(int(block_num) + 10)
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()
@@ -523,7 +523,7 @@ def load_lite_map() -> MsgGenerator:
523
523
  def moveto(place: str = "origin", pmac: PMAC = inject("pmac")) -> MsgGenerator:
524
524
  SSX_LOGGER.info(f"Move to: {place}")
525
525
  if place == Fiducials.zero:
526
- SSX_LOGGER.info("Chip aspecific move.")
526
+ SSX_LOGGER.info("Chip moving to zero")
527
527
  yield from bps.trigger(pmac.to_xyz_zero)
528
528
  return
529
529
 
@@ -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.me14e_gp103)
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.me14e_gp109)
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)
@@ -705,7 +705,7 @@ def cs_maker(pmac: PMAC = inject("pmac")) -> MsgGenerator:
705
705
 
706
706
  Skew:
707
707
  Skew is the difference between the Sz1 and Sz2 after rotation is taken out.
708
- This should be measured in situ prior to expriment, ie. measure by hand using
708
+ This should be measured in situ prior to experiment, ie. measure by hand using
709
709
  opposite and adjacent RBV after calibration of scale factors.
710
710
  """
711
711
  chip_type = int(caget(CHIPTYPE_PV))
@@ -738,10 +738,10 @@ def cs_maker(pmac: PMAC = inject("pmac")) -> MsgGenerator:
738
738
  float(cs_info["scalez"]),
739
739
  )
740
740
  skew = float(cs_info["skew"])
741
- Sx_dir, Sy_dir, Sz_dir = (
742
- int(cs_info["Sx_dir"]),
743
- int(cs_info["Sy_dir"]),
744
- int(cs_info["Sz_dir"]),
741
+ sx_dir, sy_dir, sz_dir = (
742
+ int(cs_info["sx_dir"]),
743
+ int(cs_info["sy_dir"]),
744
+ int(cs_info["sz_dir"]),
745
745
  )
746
746
  except KeyError:
747
747
  SSX_LOGGER.error("Wrong or missing key in the cs json file.")
@@ -751,64 +751,64 @@ def cs_maker(pmac: PMAC = inject("pmac")) -> MsgGenerator:
751
751
  if val not in [1, -1]:
752
752
  raise ValueError("Wrong value for direction. Please set to either -1 or 1.")
753
753
 
754
- check_dir(Sx_dir)
755
- check_dir(Sy_dir)
756
- check_dir(Sz_dir)
754
+ check_dir(sx_dir)
755
+ check_dir(sy_dir)
756
+ check_dir(sz_dir)
757
757
 
758
758
  # Rotation Around Z
759
- # If stages upsidedown (I24) change sign of Sz
760
- Sz1 = -1 * f1_y / fiducial_dict[chip_type][0]
761
- Sz2 = f2_x / fiducial_dict[chip_type][1]
762
- Sz = Sz_dir * ((Sz1 + Sz2) / 2)
763
- Cz = np.sqrt(1 - Sz**2)
764
- SSX_LOGGER.info(f"Sz1 , {Sz1:1.4f}, {np.degrees(np.arcsin(Sz1)):1.4f}")
765
- SSX_LOGGER.info(f"Sz2 , {Sz2:1.4f}, {np.degrees(np.arcsin(Sz2)):1.4f}")
766
- SSX_LOGGER.info(f"Sz , {Sz:1.4f}, {np.degrees(np.arcsin(Sz)):1.4f}")
767
- SSX_LOGGER.info(f"Cz , {Cz:1.4f}, {np.degrees(np.arcsin(Cz)):1.4f}")
759
+ # If stages upsidedown (I24) change sign of sz
760
+ sz1 = -1 * f1_y / fiducial_dict[chip_type][0]
761
+ sz2 = f2_x / fiducial_dict[chip_type][1]
762
+ sz = sz_dir * ((sz1 + sz2) / 2)
763
+ cz = np.sqrt(1 - sz**2)
764
+ SSX_LOGGER.info(f"sz1 , {sz1:1.4f}, {np.degrees(np.arcsin(sz1)):1.4f}")
765
+ SSX_LOGGER.info(f"sz2 , {sz2:1.4f}, {np.degrees(np.arcsin(sz2)):1.4f}")
766
+ SSX_LOGGER.info(f"sz , {sz:1.4f}, {np.degrees(np.arcsin(sz)):1.4f}")
767
+ SSX_LOGGER.info(f"cz , {cz:1.4f}, {np.degrees(np.arcsin(cz)):1.4f}")
768
768
  # Rotation Around Y
769
- Sy = Sy_dir * f1_z / fiducial_dict[chip_type][0]
770
- Cy = np.sqrt(1 - Sy**2)
771
- SSX_LOGGER.info(f"Sy , {Sy:1.4f}, {np.degrees(np.arcsin(Sy)):1.4f}")
772
- SSX_LOGGER.info(f"Cy , {Cy:1.4f}, {np.degrees(np.arcsin(Cy)):1.4f}")
769
+ sy = sy_dir * f1_z / fiducial_dict[chip_type][0]
770
+ cy = np.sqrt(1 - sy**2)
771
+ SSX_LOGGER.info(f"sy , {sy:1.4f}, {np.degrees(np.arcsin(sy)):1.4f}")
772
+ SSX_LOGGER.info(f"cy , {cy:1.4f}, {np.degrees(np.arcsin(cy)):1.4f}")
773
773
  # Rotation Around X
774
- # If stages upsidedown (I24) change sign of Sx
775
- Sx = Sx_dir * f2_z / fiducial_dict[chip_type][1]
776
- Cx = np.sqrt(1 - Sx**2)
777
- SSX_LOGGER.info(f"Sx , {Sx:1.4f}, {np.degrees(np.arcsin(Sx)):1.4f}")
778
- SSX_LOGGER.info(f"Cx , {Cx:1.4f}, {np.degrees(np.arcsin(Cx)):1.4f}")
774
+ # If stages upsidedown (I24) change sign of sx
775
+ sx = sx_dir * f2_z / fiducial_dict[chip_type][1]
776
+ cx = np.sqrt(1 - sx**2)
777
+ SSX_LOGGER.info(f"sx , {sx:1.4f}, {np.degrees(np.arcsin(sx)):1.4f}")
778
+ SSX_LOGGER.info(f"cx , {cx:1.4f}, {np.degrees(np.arcsin(cx)):1.4f}")
779
779
 
780
- x1factor = mtr1_dir * scalex * (Cy * Cz)
781
- y1factor = mtr2_dir * scaley * (-1.0 * Cx * Sz)
782
- z1factor = mtr3_dir * scalez * Sy
780
+ x1factor = mtr1_dir * scalex * (cy * cz)
781
+ y1factor = mtr2_dir * scaley * (-1.0 * cx * sz)
782
+ z1factor = mtr3_dir * scalez * sy
783
783
 
784
- x2factor = mtr1_dir * scalex * ((Sx * Sy * Cz) + (Cx * Sz))
785
- y2factor = mtr2_dir * scaley * ((Cx * Cz) - (Sx * Sy * Sz))
786
- z2factor = mtr3_dir * scalez * (-1.0 * Sx * Cy)
784
+ x2factor = mtr1_dir * scalex * ((sx * sy * cz) + (cx * sz))
785
+ y2factor = mtr2_dir * scaley * ((cx * cz) - (sx * sy * sz))
786
+ z2factor = mtr3_dir * scalez * (-1.0 * sx * cy)
787
787
 
788
- x3factor = mtr1_dir * scalex * ((Sx * Sz) - (Cx * Sy * Cz))
789
- y3factor = mtr2_dir * scaley * ((Cx * Sy * Sz) + (Sx * Cz))
790
- z3factor = mtr3_dir * scalez * (Cx * Cy)
788
+ x3factor = mtr1_dir * scalex * ((sx * sz) - (cx * sy * cz))
789
+ y3factor = mtr2_dir * scaley * ((cx * sy * sz) + (sx * cz))
790
+ z3factor = mtr3_dir * scalez * (cx * cy)
791
791
 
792
792
  SSX_LOGGER.info(f"Skew being used is: {skew:1.4f}")
793
- s1 = np.degrees(np.arcsin(Sz1))
794
- s2 = np.degrees(np.arcsin(Sz2))
795
- rot = np.degrees(np.arcsin((Sz1 + Sz2) / 2))
793
+ s1 = np.degrees(np.arcsin(sz1))
794
+ s2 = np.degrees(np.arcsin(sz2))
795
+ rot = np.degrees(np.arcsin((sz1 + sz2) / 2))
796
796
  calc_skew = (s1 - rot) - (s2 - rot)
797
797
  SSX_LOGGER.info(f"s1:{s1:1.4f} s2:{s2:1.4f} rot:{rot:1.4f}")
798
798
  SSX_LOGGER.info(f"Calculated rotation from current fiducials is: {rot:1.4f}")
799
799
  SSX_LOGGER.info(f"Calculated Skew from current fiducials is: {calc_skew:1.4f}")
800
800
  SSX_LOGGER.info("Calculated Skew has been known to have the wrong sign")
801
801
 
802
- sinD = np.sin((skew / 2) * (np.pi / 180))
803
- cosD = np.cos((skew / 2) * (np.pi / 180))
804
- new_x1factor = (x1factor * cosD) + (y1factor * sinD)
805
- new_y1factor = (x1factor * sinD) + (y1factor * cosD)
806
- new_x2factor = (x2factor * cosD) + (y2factor * sinD)
807
- new_y2factor = (x2factor * sinD) + (y2factor * cosD)
802
+ sin_d = np.sin((skew / 2) * (np.pi / 180))
803
+ cod_d = np.cos((skew / 2) * (np.pi / 180))
804
+ new_x1factor = (x1factor * cod_d) + (y1factor * sin_d)
805
+ new_y1factor = (x1factor * sin_d) + (y1factor * cod_d)
806
+ new_x2factor = (x2factor * cod_d) + (y2factor * sin_d)
807
+ new_y2factor = (x2factor * sin_d) + (y2factor * cod_d)
808
808
 
809
- cs1 = f"#1->{new_x1factor:+1.3f}X{new_y1factor:+1.3f}Y{z1factor:+1.3f}Z"
810
- cs2 = f"#2->{new_x2factor:+1.3f}X{new_y2factor:+1.3f}Y{z2factor:+1.3f}Z"
811
- cs3 = f"#3->{x3factor:+1.3f}X{y3factor:+1.3f}Y{z3factor:+1.3f}Z"
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.me14e_gp103))
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.me14e_gp104, repeat1),
889
- (pv.me14e_gp105, repeat2),
890
- (pv.me14e_gp106, repeat3),
891
- (pv.me14e_gp107, repeat5),
892
- (pv.me14e_gp108, repeat10),
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.me14e_gp9, 0)
907
+ caput(pv.ioc13_gp9, 0)
905
908
  while True:
906
- if int(caget(pv.me14e_gp9)) == 0:
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.me14e_gp9)) != 0:
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.4)
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
@@ -70,10 +70,10 @@ def pathli(l_in=None, way="typewriter", reverse=False):
70
70
  def zippum(list_1_args, list_2_args):
71
71
  list_1, type_1, reverse_1 = list_1_args
72
72
  list_2, type_2, reverse_2 = list_2_args
73
- A_path = pathli(list_1, type_1, reverse_1)
74
- B_path = pathli(list_2, type_2, reverse_2)
73
+ a_path = pathli(list_1, type_1, reverse_1)
74
+ b_path = pathli(list_2, type_2, reverse_2)
75
75
  zipped_list = []
76
- for a, b in zip(A_path, B_path, strict=False):
76
+ for a, b in zip(a_path, b_path, strict=False):
77
77
  zipped_list.append(a + b)
78
78
  return zipped_list
79
79