mx-bluesky 1.2.0__py3-none-any.whl → 1.4.1a0__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 (94) hide show
  1. mx_bluesky/__init__.py +8 -3
  2. mx_bluesky/__main__.py +12 -7
  3. mx_bluesky/_version.py +2 -2
  4. mx_bluesky/beamlines/i04/callbacks/murko_callback.py +14 -4
  5. mx_bluesky/beamlines/i04/thawing_plan.py +49 -11
  6. mx_bluesky/beamlines/i24/serial/__init__.py +3 -0
  7. mx_bluesky/beamlines/i24/serial/dcid.py +19 -21
  8. mx_bluesky/beamlines/i24/serial/extruder/i24ssx_Extruder_Collect_py3v2.py +69 -91
  9. mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +2 -5
  10. mx_bluesky/beamlines/i24/serial/fixed_target/ft_utils.py +0 -1
  11. mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Collect_py3v1.py +111 -143
  12. mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Manager_py3v1.py +141 -222
  13. mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_StartUp_py3v1.py +7 -216
  14. mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_moveonclick.py +18 -17
  15. mx_bluesky/beamlines/i24/serial/log.py +58 -49
  16. mx_bluesky/beamlines/i24/serial/parameters/constants.py +0 -1
  17. mx_bluesky/beamlines/i24/serial/parameters/fixed_target/cs/cs_maker.json +3 -3
  18. mx_bluesky/beamlines/i24/serial/run_extruder.sh +30 -5
  19. mx_bluesky/beamlines/i24/serial/run_fixed_target.sh +30 -5
  20. mx_bluesky/beamlines/i24/serial/run_serial.py +24 -8
  21. mx_bluesky/beamlines/i24/serial/setup_beamline/ca.py +0 -2
  22. mx_bluesky/beamlines/i24/serial/setup_beamline/setup_beamline.py +79 -81
  23. mx_bluesky/beamlines/i24/serial/setup_beamline/setup_detector.py +9 -20
  24. mx_bluesky/beamlines/i24/serial/setup_beamline/setup_zebra_plans.py +26 -28
  25. mx_bluesky/beamlines/i24/serial/write_nexus.py +11 -11
  26. mx_bluesky/common/__init__.py +0 -0
  27. mx_bluesky/common/device_setup_plans/read_hardware_for_setup.py +14 -0
  28. mx_bluesky/common/external_interaction/config_server.py +46 -0
  29. mx_bluesky/common/parameters/components.py +258 -0
  30. mx_bluesky/common/parameters/constants.py +138 -0
  31. mx_bluesky/common/parameters/gridscan.py +94 -0
  32. mx_bluesky/common/parameters/robot_load.py +16 -0
  33. mx_bluesky/common/plans/__init__.py +1 -0
  34. mx_bluesky/common/plans/do_fgs.py +121 -0
  35. mx_bluesky/common/utils/log.py +118 -0
  36. mx_bluesky/{hyperion → common/utils}/tracing.py +2 -2
  37. mx_bluesky/hyperion/__main__.py +13 -10
  38. mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py +31 -26
  39. mx_bluesky/hyperion/device_setup_plans/read_hardware_for_setup.py +6 -12
  40. mx_bluesky/hyperion/device_setup_plans/setup_oav.py +6 -12
  41. mx_bluesky/hyperion/device_setup_plans/setup_panda.py +5 -6
  42. mx_bluesky/hyperion/device_setup_plans/setup_zebra.py +49 -18
  43. mx_bluesky/hyperion/device_setup_plans/smargon.py +6 -6
  44. mx_bluesky/hyperion/device_setup_plans/utils.py +2 -2
  45. mx_bluesky/hyperion/device_setup_plans/xbpm_feedback.py +4 -4
  46. mx_bluesky/hyperion/experiment_plans/__init__.py +4 -0
  47. mx_bluesky/hyperion/experiment_plans/change_aperture_then_move_plan.py +83 -0
  48. mx_bluesky/hyperion/experiment_plans/common/xrc_result.py +47 -0
  49. mx_bluesky/hyperion/experiment_plans/experiment_registry.py +9 -9
  50. mx_bluesky/hyperion/experiment_plans/flyscan_xray_centre_plan.py +145 -161
  51. mx_bluesky/hyperion/experiment_plans/grid_detect_then_xray_centre_plan.py +56 -22
  52. mx_bluesky/hyperion/experiment_plans/load_centre_collect_full_plan.py +52 -10
  53. mx_bluesky/hyperion/experiment_plans/oav_grid_detection_plan.py +21 -20
  54. mx_bluesky/hyperion/experiment_plans/oav_snapshot_plan.py +11 -14
  55. mx_bluesky/hyperion/experiment_plans/optimise_attenuation_plan.py +2 -2
  56. mx_bluesky/hyperion/experiment_plans/pin_centre_then_xray_centre_plan.py +40 -21
  57. mx_bluesky/hyperion/experiment_plans/pin_tip_centring_plan.py +19 -19
  58. mx_bluesky/hyperion/experiment_plans/robot_load_and_change_energy.py +21 -21
  59. mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py +51 -13
  60. mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py +24 -7
  61. mx_bluesky/hyperion/experiment_plans/set_energy_plan.py +5 -6
  62. mx_bluesky/hyperion/external_interaction/callbacks/__main__.py +1 -2
  63. mx_bluesky/hyperion/external_interaction/callbacks/common/abstract_event.py +66 -0
  64. mx_bluesky/hyperion/external_interaction/callbacks/common/ispyb_mapping.py +1 -1
  65. mx_bluesky/hyperion/external_interaction/callbacks/grid_detection_callback.py +30 -25
  66. mx_bluesky/hyperion/external_interaction/callbacks/ispyb_callback_base.py +29 -12
  67. mx_bluesky/hyperion/external_interaction/callbacks/log_uid_tag_callback.py +1 -1
  68. mx_bluesky/hyperion/external_interaction/callbacks/robot_load/ispyb_callback.py +1 -1
  69. mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_callback.py +7 -4
  70. mx_bluesky/hyperion/external_interaction/callbacks/rotation/nexus_callback.py +5 -3
  71. mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/ispyb_callback.py +28 -20
  72. mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/nexus_callback.py +5 -4
  73. mx_bluesky/hyperion/external_interaction/config_server.py +11 -28
  74. mx_bluesky/hyperion/external_interaction/ispyb/exp_eye_store.py +1 -1
  75. mx_bluesky/hyperion/external_interaction/ispyb/ispyb_store.py +1 -1
  76. mx_bluesky/hyperion/external_interaction/nexus/nexus_utils.py +2 -2
  77. mx_bluesky/hyperion/external_interaction/nexus/write_nexus.py +1 -1
  78. mx_bluesky/hyperion/log.py +0 -84
  79. mx_bluesky/hyperion/parameters/components.py +4 -251
  80. mx_bluesky/hyperion/parameters/constants.py +22 -119
  81. mx_bluesky/hyperion/parameters/gridscan.py +35 -74
  82. mx_bluesky/hyperion/parameters/load_centre_collect.py +16 -11
  83. mx_bluesky/hyperion/parameters/rotation.py +23 -10
  84. mx_bluesky/hyperion/utils/utils.py +17 -0
  85. mx_bluesky/hyperion/utils/validation.py +5 -6
  86. {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/METADATA +36 -33
  87. {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/RECORD +91 -81
  88. {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/WHEEL +1 -1
  89. mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Mapping_py3v1.py +0 -161
  90. mx_bluesky/example.py +0 -19
  91. mx_bluesky/hyperion/parameters/robot_load.py +0 -16
  92. {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/LICENSE +0 -0
  93. {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/entry_points.txt +0 -0
  94. {mx_bluesky-1.2.0.dist-info → mx_bluesky-1.4.1a0.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,6 @@ This version in python3 new Feb2021 by RLO
5
5
  """
6
6
 
7
7
  import json
8
- import logging
9
8
  import re
10
9
  import shutil
11
10
  import sys
@@ -17,7 +16,7 @@ from time import sleep
17
16
 
18
17
  import bluesky.plan_stubs as bps
19
18
  import bluesky.preprocessors as bpp
20
- from blueapi.core import MsgGenerator
19
+ from bluesky.utils import MsgGenerator
21
20
  from dodal.common import inject
22
21
  from dodal.devices.hutch_shutter import HutchShutter, ShutterDemand
23
22
  from dodal.devices.i24.aperture import Aperture
@@ -27,8 +26,12 @@ from dodal.devices.i24.dual_backlight import DualBacklight
27
26
  from dodal.devices.i24.i24_detector_motion import DetectorMotion
28
27
  from dodal.devices.zebra import DISCONNECT, SOFT_IN3, Zebra
29
28
 
30
- from mx_bluesky.beamlines.i24.serial import log
31
29
  from mx_bluesky.beamlines.i24.serial.dcid import DCID
30
+ from mx_bluesky.beamlines.i24.serial.log import (
31
+ SSX_LOGGER,
32
+ _read_visit_directory_from_file,
33
+ log_on_entry,
34
+ )
32
35
  from mx_bluesky.beamlines.i24.serial.parameters import ExtruderParameters, SSXType
33
36
  from mx_bluesky.beamlines.i24.serial.parameters.constants import (
34
37
  PARAM_FILE_NAME,
@@ -54,31 +57,22 @@ from mx_bluesky.beamlines.i24.serial.setup_beamline.setup_zebra_plans import (
54
57
  )
55
58
  from mx_bluesky.beamlines.i24.serial.write_nexus import call_nexgen
56
59
 
57
- usage = "%(prog)s command [options]"
58
- logger = logging.getLogger("I24ssx.extruder")
59
-
60
60
  SAFE_DET_Z = 1480
61
61
 
62
62
 
63
- def setup_logging():
64
- logfile = time.strftime("i24extruder_%d%B%y.log").lower()
65
- log.config(logfile)
66
-
67
-
68
63
  def flush_print(text):
69
64
  sys.stdout.write(str(text))
70
65
  sys.stdout.flush()
71
66
 
72
67
 
73
- @log.log_on_entry
68
+ @log_on_entry
74
69
  def initialise_extruder(
75
70
  detector_stage: DetectorMotion = inject("detector_motion"),
76
71
  ) -> MsgGenerator:
77
- setup_logging()
78
- logger.info("Initialise Parameters for extruder data collection on I24.")
72
+ SSX_LOGGER.info("Initialise Parameters for extruder data collection on I24.")
79
73
 
80
74
  visit = caget(pv.ioc12_gp1)
81
- logger.info(f"Visit defined {visit}")
75
+ SSX_LOGGER.info(f"Visit defined {visit}")
82
76
 
83
77
  # Define detector in use
84
78
  det_type = yield from get_detector_type(detector_stage)
@@ -93,11 +87,11 @@ def initialise_extruder(
93
87
  caput(pv.ioc12_gp10, 0)
94
88
  caput(pv.ioc12_gp15, det_type.name)
95
89
  caput(pv.pilat_cbftemplate, 0)
96
- logger.info("Initialisation complete.")
90
+ SSX_LOGGER.info("Initialisation complete.")
97
91
  yield from bps.null()
98
92
 
99
93
 
100
- @log.log_on_entry
94
+ @log_on_entry
101
95
  def laser_check(
102
96
  mode: str,
103
97
  zebra: Zebra = inject("zebra"),
@@ -116,8 +110,7 @@ def laser_check(
116
110
  detector in use is the Eiger, the Pilatus cable is repurposed to trigger the light \
117
111
  source, and viceversa.
118
112
  """
119
- setup_logging()
120
- logger.debug(f"Laser check: {mode}")
113
+ SSX_LOGGER.debug(f"Laser check: {mode}")
121
114
 
122
115
  det_type = yield from get_detector_type(detector_stage)
123
116
 
@@ -131,24 +124,23 @@ def laser_check(
131
124
  yield from set_shutter_mode(zebra, "manual")
132
125
 
133
126
 
134
- @log.log_on_entry
127
+ @log_on_entry
135
128
  def enter_hutch(
136
129
  detector_stage: DetectorMotion = inject("detector_motion"),
137
130
  ) -> MsgGenerator:
138
131
  """Move the detector stage before entering hutch."""
139
- setup_logging()
140
- yield from bps.mv(detector_stage.z, SAFE_DET_Z)
141
- logger.debug("Detector moved.")
132
+ yield from bps.mv(detector_stage.z, SAFE_DET_Z) # type: ignore # See: https://github.com/bluesky/bluesky/issues/1809
133
+ SSX_LOGGER.debug("Detector moved.")
142
134
 
143
135
 
144
- @log.log_on_entry
136
+ @log_on_entry
145
137
  def write_parameter_file(detector_stage: DetectorMotion):
146
138
  """Writes a json parameter file that can later be parsed by the model."""
147
139
  param_file: Path = PARAM_FILE_PATH / PARAM_FILE_NAME
148
- logger.debug(f"Writing Parameter File to: {param_file}\n")
140
+ SSX_LOGGER.debug(f"Writing Parameter File to: {param_file}\n")
149
141
 
150
142
  det_type = yield from get_detector_type(detector_stage)
151
- logger.warning(f"DETECTOR TYPE: {det_type}")
143
+ SSX_LOGGER.warning(f"DETECTOR TYPE: {det_type}")
152
144
  filename = caget(pv.ioc12_gp3)
153
145
  # If file name ends in a digit this causes processing/pilatus pain.
154
146
  # Append an underscore
@@ -158,16 +150,16 @@ def write_parameter_file(detector_stage: DetectorMotion):
158
150
  # Note for future reference. Appending underscore causes more hassle and
159
151
  # high probability of users accidentally overwriting data. Use a dash
160
152
  filename = filename + "-"
161
- logger.info(
153
+ SSX_LOGGER.info(
162
154
  f"Requested filename ends in a number. Appended dash: {filename}"
163
155
  )
164
156
 
165
- pump_status = bool(caget(pv.ioc12_gp6))
157
+ pump_status = bool(int(caget(pv.ioc12_gp6)))
166
158
  pump_exp = float(caget(pv.ioc12_gp9)) if pump_status else None
167
159
  pump_delay = float(caget(pv.ioc12_gp10)) if pump_status else None
168
160
 
169
161
  params_dict = {
170
- "visit": log._read_visit_directory_from_file().as_posix(), # noqa
162
+ "visit": _read_visit_directory_from_file().as_posix(), # noqa
171
163
  "directory": caget(pv.ioc12_gp2),
172
164
  "filename": filename,
173
165
  "exposure_time_s": float(caget(pv.ioc12_gp5)),
@@ -181,12 +173,12 @@ def write_parameter_file(detector_stage: DetectorMotion):
181
173
  with open(param_file, "w") as f:
182
174
  json.dump(params_dict, f, indent=4)
183
175
 
184
- logger.info("Parameters \n")
185
- logger.info(pformat(params_dict))
176
+ SSX_LOGGER.info("Parameters \n")
177
+ SSX_LOGGER.info(pformat(params_dict))
186
178
  yield from bps.null()
187
179
 
188
180
 
189
- @log.log_on_entry
181
+ @log_on_entry
190
182
  def main_extruder_plan(
191
183
  zebra: Zebra,
192
184
  aperture: Aperture,
@@ -200,7 +192,7 @@ def main_extruder_plan(
200
192
  start_time: datetime,
201
193
  ) -> MsgGenerator:
202
194
  # Setting up the beamline
203
- logger.debug("Open hutch shutter")
195
+ SSX_LOGGER.info("Open hutch shutter")
204
196
  yield from bps.abs_set(shutter, ShutterDemand.OPEN, wait=True)
205
197
 
206
198
  yield from sup.setup_beamline_for_collection_plan(
@@ -213,25 +205,25 @@ def main_extruder_plan(
213
205
 
214
206
  # For pixel detector
215
207
  filepath = parameters.collection_directory.as_posix()
216
- logger.debug(f"Filepath {filepath}")
217
- logger.debug(f"Filename {parameters.filename}")
208
+ SSX_LOGGER.debug(f"Filepath {filepath}")
209
+ SSX_LOGGER.debug(f"Filename {parameters.filename}")
218
210
 
219
211
  if parameters.detector_name == "pilatus":
220
- logger.info("Using pilatus mini cbf")
212
+ SSX_LOGGER.info("Using pilatus mini cbf")
221
213
  caput(pv.pilat_cbftemplate, 0)
222
- logger.info(f"Pilatus quickshot setup: filepath {filepath}")
223
- logger.info(f"Pilatus quickshot setup: filepath {parameters.filename}")
224
- logger.info(
214
+ SSX_LOGGER.info(f"Pilatus quickshot setup: filepath {filepath}")
215
+ SSX_LOGGER.info(f"Pilatus quickshot setup: filepath {parameters.filename}")
216
+ SSX_LOGGER.info(
225
217
  f"Pilatus quickshot setup: number of images {parameters.num_images}"
226
218
  )
227
- logger.info(
219
+ SSX_LOGGER.info(
228
220
  f"Pilatus quickshot setup: exposure time {parameters.exposure_time_s}"
229
221
  )
230
222
 
231
223
  if parameters.pump_status:
232
- logger.info("Pump probe extruder data collection")
233
- logger.info(f"Pump exposure time {parameters.laser_dwell_s}")
234
- logger.info(f"Pump delay time {parameters.laser_delay_s}")
224
+ SSX_LOGGER.info("Pump probe extruder data collection")
225
+ SSX_LOGGER.info(f"Pump exposure time {parameters.laser_dwell_s}")
226
+ SSX_LOGGER.info(f"Pump delay time {parameters.laser_delay_s}")
235
227
  sup.pilatus(
236
228
  "fastchip",
237
229
  [
@@ -252,7 +244,7 @@ def main_extruder_plan(
252
244
  wait=True,
253
245
  )
254
246
  else:
255
- logger.info("Static experiment: no photoexcitation")
247
+ SSX_LOGGER.info("Static experiment: no photoexcitation")
256
248
  sup.pilatus(
257
249
  "quickshot",
258
250
  [
@@ -267,38 +259,25 @@ def main_extruder_plan(
267
259
  )
268
260
 
269
261
  elif parameters.detector_name == "eiger":
270
- logger.info("Using Eiger detector")
271
-
272
- logger.warning(
273
- """TEMPORARY HACK!
274
- Running a Single image pilatus data collection to create directory."""
275
- ) # See https://github.com/DiamondLightSource/mx_bluesky/issues/45
276
- num_shots = 1
277
- sup.pilatus(
278
- "quickshot-internaltrig",
279
- [filepath, parameters.filename, num_shots, parameters.exposure_time_s],
280
- )
281
- logger.debug("Sleep 2s waiting for pilatus to arm")
282
- sleep(2.5)
283
- caput(pv.pilat_acquire, "0") # Disarm pilatus
284
- sleep(0.5)
285
- caput(pv.pilat_acquire, "1") # Arm pilatus
286
- logger.debug("Pilatus data collection DONE")
287
- sup.pilatus("return to normal", None)
288
- logger.info("Pilatus back to normal. Single image pilatus data collection DONE")
262
+ SSX_LOGGER.info("Using Eiger detector")
263
+
264
+ SSX_LOGGER.debug(f"Creating the directory for the collection in {filepath}.")
265
+ Path(filepath).mkdir(parents=True, exist_ok=True)
289
266
 
290
267
  caput(pv.eiger_seqID, int(caget(pv.eiger_seqID)) + 1)
291
- logger.info(f"Eiger quickshot setup: filepath {filepath}")
292
- logger.info(f"Eiger quickshot setup: filepath {parameters.filename}")
293
- logger.info(f"Eiger quickshot setup: number of images {parameters.num_images}")
294
- logger.info(
268
+ SSX_LOGGER.info(f"Eiger quickshot setup: filepath {filepath}")
269
+ SSX_LOGGER.info(f"Eiger quickshot setup: filepath {parameters.filename}")
270
+ SSX_LOGGER.info(
271
+ f"Eiger quickshot setup: number of images {parameters.num_images}"
272
+ )
273
+ SSX_LOGGER.info(
295
274
  f"Eiger quickshot setup: exposure time {parameters.exposure_time_s}"
296
275
  )
297
276
 
298
277
  if parameters.pump_status:
299
- logger.info("Pump probe extruder data collection")
300
- logger.debug(f"Pump exposure time {parameters.laser_dwell_s}")
301
- logger.debug(f"Pump delay time {parameters.laser_delay_s}")
278
+ SSX_LOGGER.info("Pump probe extruder data collection")
279
+ SSX_LOGGER.debug(f"Pump exposure time {parameters.laser_dwell_s}")
280
+ SSX_LOGGER.debug(f"Pump delay time {parameters.laser_delay_s}")
302
281
  sup.eiger(
303
282
  "triggered",
304
283
  [
@@ -319,7 +298,7 @@ def main_extruder_plan(
319
298
  wait=True,
320
299
  )
321
300
  else:
322
- logger.info("Static experiment: no photoexcitation")
301
+ SSX_LOGGER.info("Static experiment: no photoexcitation")
323
302
  sup.eiger(
324
303
  "quickshot",
325
304
  [
@@ -334,7 +313,7 @@ def main_extruder_plan(
334
313
  )
335
314
  else:
336
315
  err = f"Unknown Detector Type, det_type = {parameters.detector_name}"
337
- logger.error(err)
316
+ SSX_LOGGER.error(err)
338
317
  raise UnknownDetectorType(err)
339
318
 
340
319
  # Do DCID creation BEFORE arming the detector
@@ -350,20 +329,20 @@ def main_extruder_plan(
350
329
  )
351
330
 
352
331
  # Collect
353
- logger.info("Fast shutter opening")
332
+ SSX_LOGGER.info("Fast shutter opening")
354
333
  yield from open_fast_shutter(zebra)
355
334
  if parameters.detector_name == "pilatus":
356
- logger.info("Pilatus acquire ON")
335
+ SSX_LOGGER.info("Pilatus acquire ON")
357
336
  caput(pv.pilat_acquire, 1)
358
337
  elif parameters.detector_name == "eiger":
359
- logger.info("Triggering Eiger NOW")
338
+ SSX_LOGGER.info("Triggering Eiger NOW")
360
339
  caput(pv.eiger_trigger, 1)
361
340
 
362
341
  dcid.notify_start()
363
342
 
364
343
  if parameters.detector_name == "eiger":
365
344
  wavelength = yield from bps.rd(dcm.wavelength_in_a)
366
- logger.debug("Call nexgen server for nexus writing.")
345
+ SSX_LOGGER.debug("Call nexgen server for nexus writing.")
367
346
  call_nexgen(None, start_time, parameters, wavelength, "extruder")
368
347
 
369
348
  timeout_time = time.time() + parameters.num_images * parameters.exposure_time_s + 10
@@ -381,25 +360,25 @@ def main_extruder_plan(
381
360
  if zebra_arm_status == 0: # not zebra.pc.is_armed():
382
361
  # As soon as zebra is disarmed, exit.
383
362
  # Epics updates this PV once the collection is done.
384
- logger.info("Zebra disarmed - Collection done.")
363
+ SSX_LOGGER.info("Zebra disarmed - Collection done.")
385
364
  break
386
365
  if time.time() >= timeout_time:
387
- logger.warning(
366
+ SSX_LOGGER.warning(
388
367
  """
389
368
  Something went wrong and data collection timed out. Aborting.
390
369
  """
391
370
  )
392
371
  raise TimeoutError("Data collection timed out.")
393
372
 
394
- logger.debug("Collection completed without errors.")
373
+ SSX_LOGGER.info("Collection completed without errors.")
395
374
 
396
375
 
397
- @log.log_on_entry
376
+ @log_on_entry
398
377
  def collection_aborted_plan(
399
378
  zebra: Zebra, detector_name: str, dcid: DCID
400
379
  ) -> MsgGenerator:
401
380
  """A plan to run in case the collection is aborted before the end."""
402
- logger.warning("Data Collection Aborted")
381
+ SSX_LOGGER.warning("Data Collection Aborted")
403
382
  yield from disarm_zebra(zebra) # If aborted/timed out zebra still armed
404
383
  if detector_name == "pilatus":
405
384
  caput(pv.pilat_acquire, 0)
@@ -410,7 +389,7 @@ def collection_aborted_plan(
410
389
  dcid.collection_complete(end_time, aborted=True)
411
390
 
412
391
 
413
- @log.log_on_entry
392
+ @log_on_entry
414
393
  def tidy_up_at_collection_end_plan(
415
394
  zebra: Zebra,
416
395
  shutter: HutchShutter,
@@ -431,23 +410,23 @@ def tidy_up_at_collection_end_plan(
431
410
  sup.pilatus("return-to-normal", None)
432
411
  elif parameters.detector_name == "eiger":
433
412
  sup.eiger("return-to-normal", None)
434
- logger.debug(f"{parameters.filename}_{caget(pv.eiger_seqID)}")
435
- logger.debug("End of Run")
436
- logger.debug("Close hutch shutter")
413
+ SSX_LOGGER.debug(f"{parameters.filename}_{caget(pv.eiger_seqID)}")
414
+ SSX_LOGGER.debug("End of Run")
415
+ SSX_LOGGER.info("Close hutch shutter")
437
416
  yield from bps.abs_set(shutter, ShutterDemand.CLOSE, wait=True)
438
417
 
439
418
  dcid.notify_end()
440
419
 
441
420
 
442
- @log.log_on_entry
421
+ @log_on_entry
443
422
  def collection_complete_plan(
444
423
  collection_directory: Path, detector_name: str, dcid: DCID
445
424
  ) -> MsgGenerator:
446
425
  if detector_name == "pilatus":
447
- logger.info("Pilatus Acquire STOP")
426
+ SSX_LOGGER.info("Pilatus Acquire STOP")
448
427
  caput(pv.pilat_acquire, 0)
449
428
  elif detector_name == "eiger":
450
- logger.info("Eiger Acquire STOP")
429
+ SSX_LOGGER.info("Eiger Acquire STOP")
451
430
  caput(pv.eiger_acquire, 0)
452
431
  caput(pv.eiger_ODcapture, "Done")
453
432
 
@@ -455,7 +434,7 @@ def collection_complete_plan(
455
434
 
456
435
  end_time = datetime.now()
457
436
  dcid.collection_complete(end_time, aborted=False)
458
- logger.info(f"End Time = {end_time.ctime()}")
437
+ SSX_LOGGER.info(f"End Time = {end_time.ctime()}")
459
438
 
460
439
  # Copy parameter file
461
440
  shutil.copy2(
@@ -474,9 +453,8 @@ def run_extruder_plan(
474
453
  shutter: HutchShutter = inject("shutter"),
475
454
  dcm: DCM = inject("dcm"),
476
455
  ) -> MsgGenerator:
477
- setup_logging()
478
456
  start_time = datetime.now()
479
- logger.info(f"Collection start time: {start_time.ctime()}")
457
+ SSX_LOGGER.info(f"Collection start time: {start_time.ctime()}")
480
458
 
481
459
  yield from write_parameter_file(detector_stage)
482
460
  parameters = ExtruderParameters.from_file(PARAM_FILE_PATH / PARAM_FILE_NAME)
@@ -1270,21 +1270,18 @@ topShadowColor index 1
1270
1270
  botShadowColor index 8
1271
1271
  controlPv "ME14E-MO-IOC-01:GP2"
1272
1272
  font "arial-medium-r-18.0"
1273
- numItems 3
1273
+ numItems 2
1274
1274
  symbolTag {
1275
1275
  0 "None"
1276
1276
  1 "Mapping Lite"
1277
- 2 "Full Mapping"
1278
1277
  }
1279
1278
  symbol0 {
1280
1279
  0 "NN"
1281
1280
  1 "ML"
1282
- 2 "FM"
1283
1281
  }
1284
1282
  value0 {
1285
1283
  0 "none"
1286
1284
  1 "mappinglite"
1287
- 2 "fullmapping"
1288
1285
  }
1289
1286
  endObjectProperties
1290
1287
 
@@ -3862,7 +3859,7 @@ buttonLabel "Stages"
3862
3859
  numPvs 4
3863
3860
  numDsps 1
3864
3861
  displayFileName {
3865
- 0 "/dls_sw/work/R3.14.12.3/ioc/ME14E/BL/data/ME14E-motors.edl"
3862
+ 0 "/dls_sw/work/R3.14.12.7/ioc/ME14E/BL/data/ME14E-motors.edl"
3866
3863
  }
3867
3864
  endObjectProperties
3868
3865
 
@@ -12,7 +12,6 @@ from enum import Enum, IntEnum
12
12
  class MappingType(IntEnum):
13
13
  NoMap = 0
14
14
  Lite = 1
15
- Full = 2
16
15
 
17
16
  def __str__(self) -> str:
18
17
  """Returns the mapping."""