dls-dodal 1.68.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/METADATA +1 -31
- dls_dodal-2.0.0.dist-info/RECORD +354 -0
- {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/WHEEL +1 -1
- dodal/_version.py +2 -2
- dodal/beamlines/__init__.py +10 -17
- dodal/beamlines/adsim.py +40 -33
- dodal/beamlines/b01_1.py +11 -0
- dodal/beamlines/b07.py +17 -21
- dodal/beamlines/b07_1.py +20 -22
- dodal/beamlines/b07_shared.py +12 -0
- dodal/beamlines/b16.py +1 -1
- dodal/beamlines/b21.py +15 -6
- dodal/beamlines/i02_1.py +17 -45
- dodal/beamlines/i02_2.py +6 -12
- dodal/beamlines/i03.py +8 -5
- dodal/beamlines/i03_supervisor.py +19 -0
- dodal/beamlines/i04.py +87 -184
- dodal/beamlines/i05.py +9 -39
- dodal/beamlines/i05_1.py +4 -13
- dodal/beamlines/i05_shared.py +51 -0
- dodal/beamlines/i06_1.py +26 -0
- dodal/beamlines/{i06.py → i06_shared.py} +25 -14
- dodal/beamlines/i07.py +14 -16
- dodal/beamlines/i09.py +76 -29
- dodal/beamlines/i09_1.py +25 -56
- dodal/beamlines/i09_1_shared.py +61 -0
- dodal/beamlines/i09_2.py +6 -100
- dodal/beamlines/i09_2_shared.py +110 -0
- dodal/beamlines/i10.py +60 -54
- dodal/beamlines/i10_1.py +99 -10
- dodal/beamlines/{i10_optics.py → i10_shared.py} +80 -66
- dodal/beamlines/i11.py +31 -18
- dodal/beamlines/i13_1.py +1 -1
- dodal/beamlines/i15.py +6 -6
- dodal/beamlines/i15_1.py +6 -6
- dodal/beamlines/i16.py +11 -0
- dodal/beamlines/i17.py +37 -28
- dodal/beamlines/i18.py +3 -4
- dodal/beamlines/i19_1.py +95 -34
- dodal/beamlines/i19_2.py +68 -52
- dodal/beamlines/i19_optics.py +26 -13
- dodal/beamlines/i20_1.py +17 -11
- dodal/beamlines/i21.py +44 -29
- dodal/beamlines/i22.py +19 -4
- dodal/beamlines/i23.py +20 -27
- dodal/beamlines/i24.py +64 -113
- dodal/beamlines/k07.py +99 -5
- dodal/beamlines/p38.py +3 -3
- dodal/beamlines/p60.py +35 -14
- dodal/beamlines/p99.py +16 -15
- dodal/beamlines/training_rig.py +20 -12
- dodal/cli.py +36 -2
- dodal/common/__init__.py +2 -1
- dodal/common/beamlines/beamline_parameters.py +2 -1
- dodal/common/beamlines/beamline_utils.py +11 -9
- dodal/common/beamlines/commissioning_mode.py +6 -3
- dodal/common/coordination.py +12 -14
- dodal/common/crystal_metadata.py +5 -8
- dodal/common/device_utils.py +4 -3
- dodal/common/maths.py +87 -19
- dodal/common/udc_directory_provider.py +13 -8
- dodal/common/visit.py +18 -21
- dodal/common/watcher_utils.py +13 -12
- dodal/device_manager.py +94 -54
- dodal/devices/aperturescatterguard.py +26 -27
- dodal/devices/areadetector/plugins/cam.py +1 -3
- dodal/devices/areadetector/plugins/mjpg.py +6 -5
- dodal/devices/attenuator/attenuator.py +12 -11
- dodal/devices/beamlines/b07/__init__.py +3 -0
- dodal/devices/{b07_1 → beamlines/b07_1}/__init__.py +2 -2
- dodal/devices/{b07_1 → beamlines/b07_1}/ccmc.py +5 -10
- dodal/devices/{b16 → beamlines/b16}/detector.py +2 -3
- dodal/devices/{i02_1 → beamlines/i02_1}/fast_grid_scan.py +2 -3
- dodal/devices/{i02_1 → beamlines/i02_1}/sample_motors.py +1 -1
- dodal/devices/{i03 → beamlines/i03}/beamsize.py +11 -7
- dodal/devices/{i03 → beamlines/i03}/dcm.py +1 -2
- dodal/devices/{i03 → beamlines/i03}/undulator_dcm.py +4 -5
- dodal/devices/beamlines/i04/beam_centre.py +151 -0
- dodal/devices/{i04 → beamlines/i04}/beamsize.py +11 -7
- dodal/devices/beamlines/i04/max_pixel.py +25 -0
- dodal/devices/{i04 → beamlines/i04}/murko_results.py +23 -8
- dodal/devices/{i04 → beamlines/i04}/transfocator.py +10 -15
- dodal/devices/beamlines/i05/__init__.py +3 -0
- dodal/devices/beamlines/i06_shared/__init__.py +3 -0
- dodal/devices/beamlines/i06_shared/i06_enum.py +7 -0
- dodal/devices/{i07 → beamlines/i07}/dcm.py +2 -3
- dodal/devices/{i07 → beamlines/i07}/id.py +8 -9
- dodal/devices/beamlines/i09/__init__.py +3 -0
- dodal/devices/{i09_1_shared → beamlines/i09_1_shared}/hard_energy.py +5 -6
- dodal/devices/{i09_1_shared → beamlines/i09_1_shared}/hard_undulator_functions.py +19 -16
- dodal/devices/{i10 → beamlines/i10}/diagnostics.py +4 -3
- dodal/devices/{i10 → beamlines/i10}/i10_apple2.py +37 -51
- dodal/devices/{i10 → beamlines/i10}/rasor/rasor_current_amp.py +1 -24
- dodal/devices/{i10 → beamlines/i10}/rasor/rasor_motors.py +2 -2
- dodal/devices/{i10 → beamlines/i10}/slits.py +5 -3
- dodal/devices/beamlines/i10_1/__init__.py +9 -0
- dodal/devices/beamlines/i10_1/electromagnet/magnet.py +16 -0
- dodal/devices/beamlines/i10_1/electromagnet/stages.py +14 -0
- dodal/devices/beamlines/i10_1/scaler_cards.py +13 -0
- dodal/devices/{i11 → beamlines/i11}/cyberstar_blower.py +1 -1
- dodal/devices/{i11 → beamlines/i11}/diff_stages.py +4 -6
- dodal/devices/{i11 → beamlines/i11}/mythen.py +3 -4
- dodal/devices/{i11 → beamlines/i11}/nx100robot.py +6 -6
- dodal/devices/{i11 → beamlines/i11}/spinner.py +1 -1
- dodal/devices/{i13_1 → beamlines/i13_1}/merlin.py +1 -1
- dodal/devices/{i15 → beamlines/i15}/dcm.py +1 -2
- dodal/devices/{i15 → beamlines/i15}/focussing_mirror.py +5 -5
- dodal/devices/{i15 → beamlines/i15}/jack.py +2 -2
- dodal/devices/{i15 → beamlines/i15}/multilayer_mirror.py +1 -1
- dodal/devices/{i17 → beamlines/i17}/i17_apple2.py +16 -22
- dodal/devices/{i18 → beamlines/i18}/diode.py +1 -1
- dodal/devices/{i19 → beamlines/i19}/access_controlled/attenuator_motor_squad.py +12 -8
- dodal/devices/{i19 → beamlines/i19}/access_controlled/blueapi_device.py +16 -15
- dodal/devices/beamlines/i19/access_controlled/piezo_control.py +72 -0
- dodal/devices/{i19 → beamlines/i19}/access_controlled/shutter.py +11 -9
- dodal/devices/{i19 → beamlines/i19}/backlight.py +3 -1
- dodal/devices/{i19 → beamlines/i19}/mapt_configuration.py +2 -1
- dodal/devices/{i19 → beamlines/i19}/pin_col_stages.py +11 -8
- dodal/devices/beamlines/i19/pin_tip.py +32 -0
- dodal/devices/beamlines/i21/__init__.py +3 -0
- dodal/devices/{i22 → beamlines/i22}/dcm.py +1 -2
- dodal/devices/{i22 → beamlines/i22}/fswitch.py +1 -3
- dodal/devices/{i22 → beamlines/i22}/nxsas.py +5 -4
- dodal/devices/{i24 → beamlines/i24}/beam_center.py +1 -1
- dodal/devices/{i24 → beamlines/i24}/beamstop.py +2 -2
- dodal/devices/{i24 → beamlines/i24}/commissioning_jungfrau.py +12 -12
- dodal/devices/{i24 → beamlines/i24}/dcm.py +1 -3
- dodal/devices/{i24 → beamlines/i24}/dual_backlight.py +3 -3
- dodal/devices/{i24 → beamlines/i24}/pmac.py +9 -7
- dodal/devices/{p60 → beamlines/p60}/lab_xray_source.py +1 -1
- dodal/devices/beamlines/p99/__init__.py +0 -0
- dodal/devices/{p99 → beamlines/p99}/andor2_point.py +11 -15
- dodal/devices/bimorph_mirror.py +22 -20
- dodal/devices/collimation_table.py +3 -2
- dodal/devices/common_dcm.py +30 -20
- dodal/devices/controllers.py +2 -2
- dodal/devices/cryostream.py +8 -0
- dodal/devices/current_amplifiers/current_amplifier.py +16 -18
- dodal/devices/current_amplifiers/current_amplifier_detector.py +9 -10
- dodal/devices/current_amplifiers/femto.py +8 -9
- dodal/devices/current_amplifiers/sr570.py +16 -16
- dodal/devices/current_amplifiers/struck_scaler_counter.py +5 -5
- dodal/devices/detector/det_resolution.py +9 -8
- dodal/devices/detector/detector.py +4 -2
- dodal/devices/diamond_filter.py +3 -4
- dodal/devices/eiger.py +32 -17
- dodal/devices/eiger_odin.py +1 -1
- dodal/devices/electron_analyser/base/__init__.py +3 -3
- dodal/devices/electron_analyser/base/base_controller.py +32 -21
- dodal/devices/electron_analyser/base/base_detector.py +15 -20
- dodal/devices/electron_analyser/base/base_driver_io.py +39 -46
- dodal/devices/electron_analyser/base/base_enums.py +0 -5
- dodal/devices/electron_analyser/base/base_region.py +29 -31
- dodal/devices/electron_analyser/base/base_util.py +18 -16
- dodal/devices/electron_analyser/base/energy_sources.py +35 -40
- dodal/devices/electron_analyser/specs/specs_detector.py +7 -6
- dodal/devices/electron_analyser/vgscienta/vgscienta_detector.py +7 -6
- dodal/devices/eurotherm.py +3 -2
- dodal/devices/fast_grid_scan.py +31 -34
- dodal/devices/fast_shutter.py +125 -39
- dodal/devices/flux.py +1 -1
- dodal/devices/focusing_mirror.py +29 -11
- dodal/devices/hutch_shutter.py +6 -6
- dodal/devices/insertion_device/__init__.py +20 -8
- dodal/devices/insertion_device/apple2_controller.py +371 -0
- dodal/devices/insertion_device/apple2_undulator.py +184 -587
- dodal/devices/insertion_device/apple_knot_controller.py +222 -0
- dodal/devices/insertion_device/energy.py +161 -0
- dodal/devices/insertion_device/energy_motor_lookup.py +21 -28
- dodal/devices/insertion_device/lookup_table_models.py +47 -52
- dodal/devices/insertion_device/polarisation.py +36 -0
- dodal/devices/ipin.py +1 -1
- dodal/devices/linkam3.py +7 -5
- dodal/devices/motors.py +107 -19
- dodal/devices/mx_phase1/beamstop.py +2 -4
- dodal/devices/oav/oav_calculations.py +20 -13
- dodal/devices/oav/oav_detector.py +92 -22
- dodal/devices/oav/oav_parameters.py +4 -9
- dodal/devices/oav/oav_to_redis_forwarder.py +22 -18
- dodal/devices/oav/pin_image_recognition/__init__.py +4 -6
- dodal/devices/oav/pin_image_recognition/manual_test.py +1 -2
- dodal/devices/oav/pin_image_recognition/utils.py +30 -32
- dodal/devices/oav/snapshots/grid_overlay.py +10 -9
- dodal/devices/oav/snapshots/snapshot_image_processing.py +15 -13
- dodal/devices/oav/utils.py +20 -6
- dodal/devices/p45.py +3 -9
- dodal/devices/pgm.py +8 -14
- dodal/devices/pressure_jump_cell.py +93 -32
- dodal/devices/qbpm.py +1 -3
- dodal/devices/robot.py +45 -20
- dodal/devices/s4_slit_gaps.py +1 -1
- dodal/devices/selectable_source.py +41 -0
- dodal/devices/slits.py +2 -5
- dodal/devices/smargon.py +2 -3
- dodal/devices/temperture_controller/lakeshore/lakeshore.py +38 -64
- dodal/devices/temperture_controller/lakeshore/lakeshore_io.py +21 -35
- dodal/devices/tetramm.py +7 -7
- dodal/devices/turbo_slit.py +8 -7
- dodal/devices/undulator.py +42 -56
- dodal/devices/util/adjuster_plans.py +2 -3
- dodal/devices/util/epics_util.py +10 -10
- dodal/devices/util/lookup_tables.py +17 -18
- dodal/devices/v2f.py +2 -3
- dodal/devices/watsonmarlow323_pump.py +1 -1
- dodal/devices/xbpm_feedback.py +3 -2
- dodal/devices/xspress3/xspress3.py +8 -11
- dodal/devices/xspress3/xspress3_channel.py +3 -6
- dodal/devices/zebra/zebra.py +21 -7
- dodal/devices/zebra/zebra_constants_mapping.py +12 -7
- dodal/devices/zebra/zebra_controlled_shutter.py +2 -1
- dodal/devices/zocalo/zocalo_interaction.py +14 -14
- dodal/devices/zocalo/zocalo_results.py +33 -33
- dodal/log.py +23 -20
- dodal/plan_stubs/check_topup.py +15 -15
- dodal/plan_stubs/data_session.py +6 -6
- dodal/plan_stubs/motor_utils.py +22 -18
- dodal/plan_stubs/pressure_jump_cell.py +18 -0
- dodal/plan_stubs/wrapped.py +40 -55
- dodal/plans/bimorph.py +63 -52
- dodal/plans/configure_arm_trigger_and_disarm_detector.py +0 -1
- dodal/plans/device_setup_plans/__init__.py +5 -0
- dodal/plans/device_setup_plans/setup_pin_tip_params.py +63 -0
- dodal/plans/preprocessors/verify_undulator_gap.py +10 -8
- dodal/plans/spec_path.py +3 -5
- dodal/plans/verify_undulator_gap.py +1 -2
- dodal/plans/wrapped.py +4 -3
- dodal/testing/__init__.py +0 -0
- dodal/testing/electron_analyser/device_factory.py +5 -7
- dodal/testing/fixtures/devices/apple2.py +38 -0
- dodal/testing/fixtures/run_engine.py +3 -7
- dodal/testing/fixtures/utils.py +1 -2
- dodal/utils.py +60 -58
- dls_dodal-1.68.0.dist-info/RECORD +0 -330
- dodal/beamline_specific_utils/i05_shared.py +0 -14
- dodal/devices/b07/__init__.py +0 -3
- dodal/devices/i04/max_pixel.py +0 -38
- dodal/devices/i05/__init__.py +0 -3
- dodal/devices/i09/__init__.py +0 -3
- dodal/devices/i21/__init__.py +0 -5
- {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/entry_points.txt +0 -0
- {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {dls_dodal-1.68.0.dist-info → dls_dodal-2.0.0.dist-info}/top_level.txt +0 -0
- /dodal/{beamline_specific_utils → devices/beamlines}/__init__.py +0 -0
- /dodal/devices/{b07 → beamlines/b07}/enums.py +0 -0
- /dodal/devices/{b07_1 → beamlines/b07_1}/enums.py +0 -0
- /dodal/devices/{b16 → beamlines/b16}/__init__.py +0 -0
- /dodal/devices/{i02_1 → beamlines/i02_1}/__init__.py +0 -0
- /dodal/devices/{i02_2 → beamlines/i02_2}/__init__.py +0 -0
- /dodal/devices/{i03 → beamlines/i03}/__init__.py +0 -0
- /dodal/devices/{i03 → beamlines/i03}/constants.py +0 -0
- /dodal/devices/{i04 → beamlines/i04}/__init__.py +0 -0
- /dodal/devices/{i04 → beamlines/i04}/constants.py +0 -0
- /dodal/devices/{i05 → beamlines/i05}/enums.py +0 -0
- /dodal/devices/{i07 → beamlines/i07}/__init__.py +0 -0
- /dodal/devices/{i09 → beamlines/i09}/enums.py +0 -0
- /dodal/devices/{i09_1 → beamlines/i09_1}/__init__.py +0 -0
- /dodal/devices/{i09_1 → beamlines/i09_1}/enums.py +0 -0
- /dodal/devices/{i09_1_shared → beamlines/i09_1_shared}/__init__.py +0 -0
- /dodal/devices/{i09_2_shared → beamlines/i09_2_shared}/__init__.py +0 -0
- /dodal/devices/{i09_2_shared → beamlines/i09_2_shared}/i09_apple2.py +0 -0
- /dodal/devices/{i10 → beamlines/i10}/__init__.py +0 -0
- /dodal/devices/{i10 → beamlines/i10}/i10_setting_data.py +0 -0
- /dodal/devices/{i10 → beamlines/i10}/mirrors.py +0 -0
- /dodal/devices/{i10 → beamlines/i10}/rasor/__init__.py +0 -0
- /dodal/devices/{i10 → beamlines/i10}/rasor/rasor_scaler_cards.py +0 -0
- /dodal/devices/{i11 → beamlines/i10_1/electromagnet}/__init__.py +0 -0
- /dodal/devices/{i13_1 → beamlines/i11}/__init__.py +0 -0
- /dodal/devices/{i15 → beamlines/i13_1}/__init__.py +0 -0
- /dodal/devices/{i13_1 → beamlines/i13_1}/merlin_controller.py +0 -0
- /dodal/devices/{i17 → beamlines/i15}/__init__.py +0 -0
- /dodal/devices/{i15 → beamlines/i15}/laue.py +0 -0
- /dodal/devices/{i15 → beamlines/i15}/motors.py +0 -0
- /dodal/devices/{i15 → beamlines/i15}/rail.py +0 -0
- /dodal/devices/{i18 → beamlines/i17}/__init__.py +0 -0
- /dodal/devices/{i19 → beamlines/i18}/__init__.py +0 -0
- /dodal/devices/{i18 → beamlines/i18}/kb_mirror.py +0 -0
- /dodal/devices/{i19/access_controlled → beamlines/i19}/__init__.py +0 -0
- /dodal/devices/{i20_1 → beamlines/i19/access_controlled}/__init__.py +0 -0
- /dodal/devices/{i19 → beamlines/i19}/access_controlled/hutch_access.py +0 -0
- /dodal/devices/{i19 → beamlines/i19}/beamstop.py +0 -0
- /dodal/devices/{i19 → beamlines/i19}/diffractometer.py +0 -0
- /dodal/devices/{i22 → beamlines/i20_1}/__init__.py +0 -0
- /dodal/devices/{i21 → beamlines/i21}/enums.py +0 -0
- /dodal/devices/{i24 → beamlines/i22}/__init__.py +0 -0
- /dodal/devices/{p99 → beamlines/i24}/__init__.py +0 -0
- /dodal/devices/{i24 → beamlines/i24}/aperture.py +0 -0
- /dodal/devices/{i24 → beamlines/i24}/focus_mirrors.py +0 -0
- /dodal/devices/{i24 → beamlines/i24}/vgonio.py +0 -0
- /dodal/devices/{p60 → beamlines/p60}/__init__.py +0 -0
- /dodal/devices/{p60 → beamlines/p60}/enums.py +0 -0
- /dodal/devices/{p99 → beamlines/p99}/sample_stage.py +0 -0
- /dodal/devices/insertion_device/{id_enum.py → enum.py} +0 -0
dodal/beamlines/b01_1.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from ophyd_async.core import StaticPathProvider, UUIDFilenameProvider
|
|
1
4
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
2
5
|
from ophyd_async.epics.adcore import NDROIStatIO
|
|
3
6
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
@@ -5,6 +8,7 @@ from ophyd_async.fastcs.panda import HDFPanda
|
|
|
5
8
|
from dodal.common.beamlines.beamline_utils import (
|
|
6
9
|
device_factory,
|
|
7
10
|
get_path_provider,
|
|
11
|
+
set_path_provider,
|
|
8
12
|
)
|
|
9
13
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
10
14
|
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, HDF5_SUFFIX
|
|
@@ -28,6 +32,13 @@ See the IOC status here:
|
|
|
28
32
|
https://argocd.diamond.ac.uk/applications?showFavorites=false&proj=&sync=&autoSync=&health=&namespace=&cluster=&labels=
|
|
29
33
|
"""
|
|
30
34
|
|
|
35
|
+
# This should be removed when the DeviceManager is adopted
|
|
36
|
+
try:
|
|
37
|
+
get_path_provider()
|
|
38
|
+
except NameError:
|
|
39
|
+
# If one hasn't already been set, use a default to stop things crashing
|
|
40
|
+
set_path_provider(StaticPathProvider(UUIDFilenameProvider(), Path("/tmp")))
|
|
41
|
+
|
|
31
42
|
|
|
32
43
|
@device_factory()
|
|
33
44
|
def panda() -> HDFPanda:
|
dodal/beamlines/b07.py
CHANGED
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
from dodal.
|
|
2
|
-
device_factory,
|
|
3
|
-
)
|
|
1
|
+
from dodal.beamlines.b07_shared import devices as b07_shared_devices
|
|
4
2
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
|
-
from dodal.
|
|
3
|
+
from dodal.device_manager import DeviceManager
|
|
4
|
+
from dodal.devices.beamlines.b07 import Grating, LensMode, PsuMode
|
|
6
5
|
from dodal.devices.electron_analyser.base import EnergySource
|
|
7
6
|
from dodal.devices.electron_analyser.specs import SpecsDetector
|
|
8
7
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
9
|
-
from dodal.devices.synchrotron import Synchrotron
|
|
10
8
|
from dodal.log import set_beamline as set_log_beamline
|
|
11
9
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
12
10
|
|
|
13
11
|
BL = get_beamline_name("b07")
|
|
14
|
-
|
|
12
|
+
B_PREFIX = BeamlinePrefix(BL, suffix="B")
|
|
15
13
|
set_log_beamline(BL)
|
|
16
14
|
set_utils_beamline(BL)
|
|
17
15
|
|
|
16
|
+
devices = DeviceManager()
|
|
17
|
+
devices.include(b07_shared_devices)
|
|
18
18
|
|
|
19
|
-
@device_factory()
|
|
20
|
-
def synchrotron() -> Synchrotron:
|
|
21
|
-
return Synchrotron()
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
@device_factory()
|
|
20
|
+
@devices.factory()
|
|
25
21
|
def pgm() -> PlaneGratingMonochromator:
|
|
26
22
|
return PlaneGratingMonochromator(
|
|
27
|
-
prefix=f"{
|
|
23
|
+
prefix=f"{B_PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
28
24
|
grating=Grating,
|
|
29
25
|
)
|
|
30
26
|
|
|
31
27
|
|
|
32
|
-
@
|
|
33
|
-
def energy_source() -> EnergySource:
|
|
34
|
-
return EnergySource(pgm
|
|
28
|
+
@devices.factory()
|
|
29
|
+
def energy_source(pgm: PlaneGratingMonochromator) -> EnergySource:
|
|
30
|
+
return EnergySource(pgm.energy.user_readback)
|
|
35
31
|
|
|
36
32
|
|
|
37
|
-
#
|
|
38
|
-
# https://
|
|
39
|
-
@
|
|
40
|
-
def analyser() -> SpecsDetector[LensMode, PsuMode]:
|
|
33
|
+
# CAM:IMAGE will fail to connect outside the beamline network,
|
|
34
|
+
# see https://github.com/DiamondLightSource/dodal/issues/1852
|
|
35
|
+
@devices.factory()
|
|
36
|
+
def analyser(energy_source: EnergySource) -> SpecsDetector[LensMode, PsuMode]:
|
|
41
37
|
return SpecsDetector[LensMode, PsuMode](
|
|
42
|
-
prefix=f"{
|
|
38
|
+
prefix=f"{B_PREFIX.beamline_prefix}-EA-DET-01:CAM:",
|
|
43
39
|
lens_mode_type=LensMode,
|
|
44
40
|
psu_mode_type=PsuMode,
|
|
45
|
-
energy_source=energy_source
|
|
41
|
+
energy_source=energy_source,
|
|
46
42
|
)
|
dodal/beamlines/b07_1.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
from dodal.
|
|
1
|
+
from dodal.beamlines.b07_shared import devices as b07_shared_devices
|
|
2
2
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
3
|
-
from dodal.
|
|
4
|
-
from dodal.devices.
|
|
3
|
+
from dodal.device_manager import DeviceManager
|
|
4
|
+
from dodal.devices.beamlines.b07 import PsuMode
|
|
5
|
+
from dodal.devices.beamlines.b07_1 import (
|
|
5
6
|
ChannelCutMonochromator,
|
|
6
7
|
Grating,
|
|
7
8
|
LensMode,
|
|
@@ -9,46 +10,43 @@ from dodal.devices.b07_1 import (
|
|
|
9
10
|
from dodal.devices.electron_analyser.base import EnergySource
|
|
10
11
|
from dodal.devices.electron_analyser.specs import SpecsDetector
|
|
11
12
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
12
|
-
from dodal.devices.synchrotron import Synchrotron
|
|
13
13
|
from dodal.log import set_beamline as set_log_beamline
|
|
14
14
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
15
15
|
|
|
16
16
|
BL = get_beamline_name("b07-1")
|
|
17
|
-
|
|
17
|
+
C_PREFIX = BeamlinePrefix(BL, suffix="C")
|
|
18
18
|
set_log_beamline(BL)
|
|
19
19
|
set_utils_beamline(BL)
|
|
20
20
|
|
|
21
|
+
devices = DeviceManager()
|
|
22
|
+
devices.include(b07_shared_devices)
|
|
21
23
|
|
|
22
|
-
@device_factory()
|
|
23
|
-
def synchrotron() -> Synchrotron:
|
|
24
|
-
return Synchrotron()
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
@device_factory()
|
|
25
|
+
@devices.factory()
|
|
28
26
|
def pgm() -> PlaneGratingMonochromator:
|
|
29
27
|
return PlaneGratingMonochromator(
|
|
30
|
-
prefix=f"{
|
|
28
|
+
prefix=f"{C_PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
31
29
|
grating=Grating,
|
|
32
30
|
)
|
|
33
31
|
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
# https://jira.diamond.ac.uk/browse/B07-1104
|
|
37
|
-
@device_factory()
|
|
33
|
+
@devices.factory()
|
|
38
34
|
def ccmc() -> ChannelCutMonochromator:
|
|
39
|
-
return ChannelCutMonochromator(prefix=f"{
|
|
35
|
+
return ChannelCutMonochromator(prefix=f"{C_PREFIX.beamline_prefix}-OP-CCM-01:")
|
|
40
36
|
|
|
41
37
|
|
|
42
|
-
@
|
|
43
|
-
def energy_source() -> EnergySource:
|
|
44
|
-
return EnergySource(pgm
|
|
38
|
+
@devices.factory()
|
|
39
|
+
def energy_source(pgm: PlaneGratingMonochromator) -> EnergySource:
|
|
40
|
+
return EnergySource(pgm.energy.user_readback)
|
|
45
41
|
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
# CAM:IMAGE will fail to connect outside the beamline network,
|
|
44
|
+
# see https://github.com/DiamondLightSource/dodal/issues/1852
|
|
45
|
+
@devices.factory()
|
|
46
|
+
def analyser(energy_source: EnergySource) -> SpecsDetector[LensMode, PsuMode]:
|
|
49
47
|
return SpecsDetector[LensMode, PsuMode](
|
|
50
|
-
prefix=f"{
|
|
48
|
+
prefix=f"{C_PREFIX.beamline_prefix}-EA-DET-01:CAM:",
|
|
51
49
|
lens_mode_type=LensMode,
|
|
52
50
|
psu_mode_type=PsuMode,
|
|
53
|
-
energy_source=energy_source
|
|
51
|
+
energy_source=energy_source,
|
|
54
52
|
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from dodal.device_manager import DeviceManager
|
|
2
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
3
|
+
from dodal.utils import get_beamline_name
|
|
4
|
+
|
|
5
|
+
BL = get_beamline_name("b07-shared")
|
|
6
|
+
|
|
7
|
+
devices = DeviceManager()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@devices.factory()
|
|
11
|
+
def synchrotron() -> Synchrotron:
|
|
12
|
+
return Synchrotron()
|
dodal/beamlines/b16.py
CHANGED
|
@@ -11,7 +11,7 @@ from dodal.common.beamlines.beamline_utils import (
|
|
|
11
11
|
)
|
|
12
12
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
13
13
|
from dodal.common.visit import RemoteDirectoryServiceClient, StaticVisitPathProvider
|
|
14
|
-
from dodal.devices.b16.detector import (
|
|
14
|
+
from dodal.devices.beamlines.b16.detector import (
|
|
15
15
|
software_triggered_tiff_area_detector,
|
|
16
16
|
)
|
|
17
17
|
from dodal.devices.motors import XYZStage
|
dodal/beamlines/b21.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from ophyd_async.core import StaticPathProvider, UUIDFilenameProvider
|
|
1
4
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
2
5
|
from ophyd_async.fastcs.eiger import EigerDetector
|
|
3
6
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
@@ -5,11 +8,12 @@ from ophyd_async.fastcs.panda import HDFPanda
|
|
|
5
8
|
from dodal.common.beamlines.beamline_utils import (
|
|
6
9
|
device_factory,
|
|
7
10
|
get_path_provider,
|
|
11
|
+
set_path_provider,
|
|
8
12
|
)
|
|
9
13
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
10
14
|
from dodal.common.beamlines.device_helpers import CAM_SUFFIX, HDF5_SUFFIX
|
|
15
|
+
from dodal.devices.beamlines.i22.nxsas import NXSasMetadataHolder, NXSasOAV
|
|
11
16
|
from dodal.devices.focusing_mirror import SimpleMirror
|
|
12
|
-
from dodal.devices.i22.nxsas import NXSasMetadataHolder, NXSasOAV
|
|
13
17
|
from dodal.devices.linkam3 import Linkam3
|
|
14
18
|
from dodal.devices.motors import XYStage
|
|
15
19
|
from dodal.devices.slits import Slits
|
|
@@ -23,6 +27,13 @@ PREFIX = BeamlinePrefix(BL)
|
|
|
23
27
|
set_log_beamline(BL)
|
|
24
28
|
set_utils_beamline(BL)
|
|
25
29
|
|
|
30
|
+
# This should be removed when the DeviceManager is adopted
|
|
31
|
+
try:
|
|
32
|
+
get_path_provider()
|
|
33
|
+
except NameError:
|
|
34
|
+
# If one hasn't already been set, use a default to stop things crashing
|
|
35
|
+
set_path_provider(StaticPathProvider(UUIDFilenameProvider(), Path("/tmp")))
|
|
36
|
+
|
|
26
37
|
|
|
27
38
|
@device_factory()
|
|
28
39
|
def saxs() -> EigerDetector:
|
|
@@ -95,9 +106,8 @@ def slits_3() -> Slits:
|
|
|
95
106
|
return Slits(prefix=f"{PREFIX.beamline_prefix}-AL-SLITS-03:")
|
|
96
107
|
|
|
97
108
|
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
"""
|
|
109
|
+
"""Slits 4 was removed from B21 after the camera length was fixed, it is not used
|
|
110
|
+
anymore."""
|
|
101
111
|
|
|
102
112
|
|
|
103
113
|
@device_factory()
|
|
@@ -112,8 +122,7 @@ def slits_6() -> Slits:
|
|
|
112
122
|
|
|
113
123
|
@device_factory()
|
|
114
124
|
def slits_7() -> Slits:
|
|
115
|
-
"""
|
|
116
|
-
Compact JJ slits device is used for B21 slits 7. PV's operate in same way
|
|
125
|
+
"""Compact JJ slits device is used for B21 slits 7. PV's operate in same way
|
|
117
126
|
but physically different to other slits, and uses X:GAP nomenclature.
|
|
118
127
|
"""
|
|
119
128
|
return Slits(
|
dodal/beamlines/i02_1.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"""Beamline i02-1 is also known as VMXm, or I02J"""
|
|
1
|
+
"""Beamline i02-1 is also known as VMXm, or I02J."""
|
|
2
2
|
|
|
3
|
-
from dodal.common.beamlines.beamline_utils import (
|
|
4
|
-
device_factory,
|
|
5
|
-
device_instantiation,
|
|
6
|
-
)
|
|
7
3
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
4
|
+
from dodal.device_manager import DeviceManager
|
|
8
5
|
from dodal.devices.attenuator.attenuator import EnumFilterAttenuator
|
|
9
6
|
from dodal.devices.attenuator.filter_selections import (
|
|
10
7
|
I02_1FilterFourSelections,
|
|
@@ -12,9 +9,9 @@ from dodal.devices.attenuator.filter_selections import (
|
|
|
12
9
|
I02_1FilterThreeSelections,
|
|
13
10
|
I02_1FilterTwoSelections,
|
|
14
11
|
)
|
|
12
|
+
from dodal.devices.beamlines.i02_1.fast_grid_scan import ZebraFastGridScanTwoD
|
|
13
|
+
from dodal.devices.beamlines.i02_1.sample_motors import SampleMotors
|
|
15
14
|
from dodal.devices.eiger import EigerDetector
|
|
16
|
-
from dodal.devices.i02_1.fast_grid_scan import ZebraFastGridScanTwoD
|
|
17
|
-
from dodal.devices.i02_1.sample_motors import SampleMotors
|
|
18
15
|
from dodal.devices.synchrotron import Synchrotron
|
|
19
16
|
from dodal.devices.zebra.zebra import Zebra
|
|
20
17
|
from dodal.devices.zebra.zebra_constants_mapping import (
|
|
@@ -37,46 +34,31 @@ I02_1_ZEBRA_MAPPING = ZebraMapping(
|
|
|
37
34
|
sources=ZebraSources(),
|
|
38
35
|
)
|
|
39
36
|
|
|
37
|
+
devices = DeviceManager()
|
|
40
38
|
|
|
41
|
-
@device_factory()
|
|
42
|
-
def eiger(mock: bool = False) -> EigerDetector:
|
|
43
|
-
"""Get the i02-1 Eiger device, instantiate it if it hasn't already been.
|
|
44
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
45
|
-
"""
|
|
46
|
-
return device_instantiation(
|
|
47
|
-
device_factory=EigerDetector,
|
|
48
|
-
prefix=f"{PREFIX.beamline_prefix}-EA-EIGER-01:",
|
|
49
|
-
bl_prefix=False,
|
|
50
|
-
wait=False,
|
|
51
|
-
fake=mock,
|
|
52
|
-
name="eiger",
|
|
53
|
-
)
|
|
54
39
|
|
|
40
|
+
@devices.v1_init(
|
|
41
|
+
EigerDetector, prefix=f"{PREFIX.beamline_prefix}-EA-EIGER-01:", wait=False
|
|
42
|
+
)
|
|
43
|
+
def eiger(eiger: EigerDetector) -> EigerDetector:
|
|
44
|
+
return eiger
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
|
|
47
|
+
@devices.factory()
|
|
57
48
|
def zebra_fast_grid_scan() -> ZebraFastGridScanTwoD:
|
|
58
|
-
"""Get the i02-1 zebra_fast_grid_scan device, instantiate it if it hasn't already been.
|
|
59
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
60
|
-
"""
|
|
61
49
|
return ZebraFastGridScanTwoD(
|
|
62
50
|
prefix=f"{PREFIX.beamline_prefix}-MO-SAMP-11:",
|
|
63
51
|
motion_controller_prefix="BL02J-MO-STEP-11:",
|
|
64
52
|
)
|
|
65
53
|
|
|
66
54
|
|
|
67
|
-
@
|
|
55
|
+
@devices.factory()
|
|
68
56
|
def synchrotron() -> Synchrotron:
|
|
69
|
-
"""Get the i02-1 synchrotron device, instantiate it if it hasn't already been.
|
|
70
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
71
|
-
"""
|
|
72
57
|
return Synchrotron()
|
|
73
58
|
|
|
74
59
|
|
|
75
|
-
@
|
|
60
|
+
@devices.factory()
|
|
76
61
|
def zebra() -> Zebra:
|
|
77
|
-
"""Get the i02-1 zebra device, instantiate it if it hasn't already been.
|
|
78
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
79
|
-
"""
|
|
80
62
|
return Zebra(
|
|
81
63
|
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-01:",
|
|
82
64
|
mapping=I02_1_ZEBRA_MAPPING,
|
|
@@ -84,28 +66,18 @@ def zebra() -> Zebra:
|
|
|
84
66
|
|
|
85
67
|
|
|
86
68
|
# Device not needed after https://github.com/DiamondLightSource/mx-bluesky/issues/1299
|
|
87
|
-
@
|
|
69
|
+
@devices.factory()
|
|
88
70
|
def zocalo() -> ZocaloResults:
|
|
89
|
-
"""Get the i02-1 ZocaloResults device, instantiate it if it hasn't already been.
|
|
90
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
91
|
-
"""
|
|
92
71
|
return ZocaloResults()
|
|
93
72
|
|
|
94
73
|
|
|
95
|
-
@
|
|
74
|
+
@devices.factory()
|
|
96
75
|
def goniometer() -> SampleMotors:
|
|
97
|
-
"""Get the i02-1 goniometer device, instantiate it if it hasn't already been.
|
|
98
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
99
|
-
"""
|
|
100
76
|
return SampleMotors(f"{PREFIX.beamline_prefix}-MO-SAMP-01:")
|
|
101
77
|
|
|
102
78
|
|
|
103
|
-
@
|
|
79
|
+
@devices.factory()
|
|
104
80
|
def attenuator() -> EnumFilterAttenuator:
|
|
105
|
-
"""Get the i02-1 attenuator device, instantiate it if it hasn't already been.
|
|
106
|
-
If this is called when already instantiated in i02-1, it will return the existing object.
|
|
107
|
-
"""
|
|
108
|
-
|
|
109
81
|
return EnumFilterAttenuator(
|
|
110
82
|
f"{PREFIX.beamline_prefix}-OP-ATTN-01:",
|
|
111
83
|
(
|
dodal/beamlines/i02_2.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
"""Beamline i02-2 is also known as VMXi, or I02I"""
|
|
1
|
+
"""Beamline i02-2 is also known as VMXi, or I02I."""
|
|
2
2
|
|
|
3
|
-
from dodal.common.beamlines.beamline_utils import (
|
|
4
|
-
device_factory,
|
|
5
|
-
)
|
|
6
3
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
4
|
+
from dodal.device_manager import DeviceManager
|
|
7
5
|
from dodal.devices.motors import XYStage
|
|
8
6
|
from dodal.devices.synchrotron import Synchrotron
|
|
9
7
|
from dodal.log import set_beamline as set_log_beamline
|
|
@@ -15,18 +13,14 @@ set_log_beamline(BL)
|
|
|
15
13
|
set_utils_beamline(BL)
|
|
16
14
|
DAQ_CONFIGURATION_PATH = "/dls_sw/i02-2/software/daq_configuration"
|
|
17
15
|
|
|
16
|
+
devices = DeviceManager()
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
@devices.factory()
|
|
20
20
|
def synchrotron() -> Synchrotron:
|
|
21
|
-
"""Get the i02-2 synchrotron device, instantiate it if it hasn't already been.
|
|
22
|
-
If this is called when already instantiated in i02-2, it will return the existing object.
|
|
23
|
-
"""
|
|
24
21
|
return Synchrotron()
|
|
25
22
|
|
|
26
23
|
|
|
27
|
-
@
|
|
24
|
+
@devices.factory()
|
|
28
25
|
def sample_motors() -> XYStage:
|
|
29
|
-
"""Get the i02-2 goniometer device, instantiate it if it hasn't already been.
|
|
30
|
-
If this is called when already instantiated in i02-2, it will return the existing object.
|
|
31
|
-
"""
|
|
32
26
|
return XYStage(f"{PREFIX.beamline_prefix}-MO-GONIO-01:SAMPLE:")
|
dodal/beamlines/i03.py
CHANGED
|
@@ -17,6 +17,10 @@ from dodal.devices.aperturescatterguard import (
|
|
|
17
17
|
from dodal.devices.attenuator.attenuator import BinaryFilterAttenuator
|
|
18
18
|
from dodal.devices.backlight import Backlight
|
|
19
19
|
from dodal.devices.baton import Baton
|
|
20
|
+
from dodal.devices.beamlines.i03 import Beamstop
|
|
21
|
+
from dodal.devices.beamlines.i03.beamsize import Beamsize
|
|
22
|
+
from dodal.devices.beamlines.i03.dcm import DCM
|
|
23
|
+
from dodal.devices.beamlines.i03.undulator_dcm import UndulatorDCM
|
|
20
24
|
from dodal.devices.collimation_table import CollimationTable
|
|
21
25
|
from dodal.devices.cryostream import (
|
|
22
26
|
CryoStreamGantry,
|
|
@@ -31,10 +35,6 @@ from dodal.devices.fluorescence_detector_motion import FluorescenceDetector
|
|
|
31
35
|
from dodal.devices.flux import Flux
|
|
32
36
|
from dodal.devices.focusing_mirror import FocusingMirrorWithStripes, MirrorVoltages
|
|
33
37
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
34
|
-
from dodal.devices.i03 import Beamstop
|
|
35
|
-
from dodal.devices.i03.beamsize import Beamsize
|
|
36
|
-
from dodal.devices.i03.dcm import DCM
|
|
37
|
-
from dodal.devices.i03.undulator_dcm import UndulatorDCM
|
|
38
38
|
from dodal.devices.ipin import IPin
|
|
39
39
|
from dodal.devices.motors import XYZStage
|
|
40
40
|
from dodal.devices.oav.oav_detector import OAVBeamCentreFile
|
|
@@ -157,8 +157,11 @@ def detector_motion() -> DetectorMotion:
|
|
|
157
157
|
)
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
@devices.v1_init(
|
|
160
|
+
@devices.v1_init(
|
|
161
|
+
EigerDetector, prefix=f"{PREFIX.beamline_prefix}-EA-EIGER-01:", wait=False
|
|
162
|
+
)
|
|
161
163
|
def eiger(eiger: EigerDetector) -> EigerDetector:
|
|
164
|
+
eiger.detector_id = 78
|
|
162
165
|
return eiger
|
|
163
166
|
|
|
164
167
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
2
|
+
from dodal.device_manager import DeviceManager
|
|
3
|
+
from dodal.devices.baton import Baton
|
|
4
|
+
from dodal.log import set_beamline as set_log_beamline
|
|
5
|
+
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
6
|
+
|
|
7
|
+
BL = get_beamline_name("i03")
|
|
8
|
+
set_log_beamline(BL)
|
|
9
|
+
set_utils_beamline(BL)
|
|
10
|
+
|
|
11
|
+
PREFIX = BeamlinePrefix(BL)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
devices = DeviceManager()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@devices.factory()
|
|
18
|
+
def baton() -> Baton:
|
|
19
|
+
return Baton(f"{PREFIX.beamline_prefix}-CS-BATON-01:")
|