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/i24.py
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
from
|
|
1
|
+
from functools import cache
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
|
|
3
|
-
from ophyd_async.core import
|
|
4
|
+
from ophyd_async.core import AutoMaxIncrementingPathProvider, PathProvider
|
|
4
5
|
|
|
5
|
-
from dodal.common.beamlines.beamline_utils import
|
|
6
|
-
BL,
|
|
7
|
-
device_factory,
|
|
8
|
-
)
|
|
6
|
+
from dodal.common.beamlines.beamline_utils import BL
|
|
9
7
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
8
|
+
from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
|
|
9
|
+
from dodal.device_manager import DeviceManager
|
|
10
10
|
from dodal.devices.attenuator.attenuator import EnumFilterAttenuator
|
|
11
11
|
from dodal.devices.attenuator.filter_selections import (
|
|
12
12
|
I24FilterOneSelections,
|
|
13
13
|
I24FilterTwoSelections,
|
|
14
14
|
)
|
|
15
|
+
from dodal.devices.beamlines.i24.aperture import Aperture
|
|
16
|
+
from dodal.devices.beamlines.i24.beam_center import DetectorBeamCenter
|
|
17
|
+
from dodal.devices.beamlines.i24.beamstop import Beamstop
|
|
18
|
+
from dodal.devices.beamlines.i24.commissioning_jungfrau import CommissioningJungfrau
|
|
19
|
+
from dodal.devices.beamlines.i24.dcm import DCM
|
|
20
|
+
from dodal.devices.beamlines.i24.dual_backlight import DualBacklight
|
|
21
|
+
from dodal.devices.beamlines.i24.focus_mirrors import FocusMirrorsMode
|
|
22
|
+
from dodal.devices.beamlines.i24.pmac import PMAC
|
|
23
|
+
from dodal.devices.beamlines.i24.vgonio import VerticalGoniometer
|
|
15
24
|
from dodal.devices.hutch_shutter import HutchShutter
|
|
16
|
-
from dodal.devices.i24.aperture import Aperture
|
|
17
|
-
from dodal.devices.i24.beam_center import DetectorBeamCenter
|
|
18
|
-
from dodal.devices.i24.beamstop import Beamstop
|
|
19
|
-
from dodal.devices.i24.commissioning_jungfrau import CommissioningJungfrau
|
|
20
|
-
from dodal.devices.i24.dcm import DCM
|
|
21
|
-
from dodal.devices.i24.dual_backlight import DualBacklight
|
|
22
|
-
from dodal.devices.i24.focus_mirrors import FocusMirrorsMode
|
|
23
|
-
from dodal.devices.i24.pmac import PMAC
|
|
24
|
-
from dodal.devices.i24.vgonio import VerticalGoniometer
|
|
25
25
|
from dodal.devices.motors import YZStage
|
|
26
26
|
from dodal.devices.oav.oav_detector import OAVBeamCentreFile
|
|
27
27
|
from dodal.devices.oav.oav_parameters import OAVConfigBeamCentre
|
|
28
|
+
from dodal.devices.synchrotron import Synchrotron
|
|
28
29
|
from dodal.devices.zebra.zebra import Zebra
|
|
29
30
|
from dodal.devices.zebra.zebra_constants_mapping import (
|
|
30
31
|
ZebraMapping,
|
|
31
32
|
ZebraSources,
|
|
32
33
|
ZebraTTLOutputs,
|
|
33
34
|
)
|
|
35
|
+
from dodal.devices.zebra.zebra_controlled_shutter import ZebraShutter
|
|
34
36
|
from dodal.log import set_beamline as set_log_beamline
|
|
35
37
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
36
38
|
|
|
@@ -45,111 +47,67 @@ set_log_beamline(BL)
|
|
|
45
47
|
set_utils_beamline(BL)
|
|
46
48
|
|
|
47
49
|
I24_ZEBRA_MAPPING = ZebraMapping(
|
|
48
|
-
outputs=ZebraTTLOutputs(TTL_EIGER=1,
|
|
50
|
+
outputs=ZebraTTLOutputs(TTL_EIGER=1, TTL_JUNGFRAU=2, TTL_FAST_SHUTTER=4),
|
|
49
51
|
sources=ZebraSources(),
|
|
50
52
|
)
|
|
51
53
|
|
|
52
54
|
PREFIX = BeamlinePrefix(BL)
|
|
53
55
|
|
|
56
|
+
devices = DeviceManager()
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@devices.fixture
|
|
60
|
+
@cache
|
|
61
|
+
def path_provider() -> PathProvider:
|
|
62
|
+
return StaticVisitPathProvider(
|
|
63
|
+
BL,
|
|
64
|
+
Path("/tmp"),
|
|
65
|
+
client=LocalDirectoryServiceClient(),
|
|
66
|
+
)
|
|
54
67
|
|
|
55
|
-
|
|
68
|
+
|
|
69
|
+
@devices.factory()
|
|
56
70
|
def attenuator() -> EnumFilterAttenuator:
|
|
57
|
-
"""Get a read-only attenuator device for i24, instantiate it if it hasn't already
|
|
58
|
-
been. If this is called when already instantiated in i24, it will return the
|
|
59
|
-
existing object."""
|
|
60
71
|
return EnumFilterAttenuator(
|
|
61
72
|
f"{PREFIX.beamline_prefix}-OP-ATTN-01:",
|
|
62
73
|
filter_selection=(I24FilterOneSelections, I24FilterTwoSelections),
|
|
63
74
|
)
|
|
64
75
|
|
|
65
76
|
|
|
66
|
-
@
|
|
77
|
+
@devices.factory()
|
|
67
78
|
def aperture() -> Aperture:
|
|
68
|
-
""
|
|
69
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
70
|
-
"""
|
|
71
|
-
return Aperture(
|
|
72
|
-
f"{PREFIX.beamline_prefix}-AL-APTR-01:",
|
|
73
|
-
)
|
|
79
|
+
return Aperture(f"{PREFIX.beamline_prefix}-AL-APTR-01:")
|
|
74
80
|
|
|
75
81
|
|
|
76
|
-
@
|
|
82
|
+
@devices.factory()
|
|
77
83
|
def beamstop() -> Beamstop:
|
|
78
|
-
""
|
|
79
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
80
|
-
"""
|
|
81
|
-
return Beamstop(
|
|
82
|
-
f"{PREFIX.beamline_prefix}-MO-BS-01:",
|
|
83
|
-
)
|
|
84
|
+
return Beamstop(f"{PREFIX.beamline_prefix}-MO-BS-01:")
|
|
84
85
|
|
|
85
86
|
|
|
86
|
-
@
|
|
87
|
+
@devices.factory()
|
|
87
88
|
def backlight() -> DualBacklight:
|
|
88
|
-
|
|
89
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
90
|
-
"""
|
|
91
|
-
return DualBacklight(
|
|
92
|
-
prefix=PREFIX.beamline_prefix,
|
|
93
|
-
)
|
|
89
|
+
return DualBacklight(prefix=PREFIX.beamline_prefix)
|
|
94
90
|
|
|
95
91
|
|
|
96
|
-
@
|
|
92
|
+
@devices.factory()
|
|
97
93
|
def detector_motion() -> YZStage:
|
|
98
|
-
""
|
|
99
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
100
|
-
"""
|
|
101
|
-
return YZStage(
|
|
102
|
-
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:",
|
|
103
|
-
)
|
|
94
|
+
return YZStage(prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:")
|
|
104
95
|
|
|
105
96
|
|
|
106
|
-
@
|
|
97
|
+
@devices.factory()
|
|
107
98
|
def dcm() -> DCM:
|
|
108
|
-
"""Get the i24 DCM device, instantiate it if it hasn't already been.
|
|
109
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
110
|
-
"""
|
|
111
99
|
return DCM(
|
|
112
100
|
prefix=f"{PREFIX.beamline_prefix}-DI-DCM-01:",
|
|
113
101
|
motion_prefix=f"{PREFIX.beamline_prefix}-MO-DCM-01:",
|
|
114
102
|
)
|
|
115
103
|
|
|
116
104
|
|
|
117
|
-
|
|
118
|
-
# https://github.com/DiamondLightSource/mx-bluesky/issues/62
|
|
119
|
-
# @skip_device(lambda: BL == "s24")
|
|
120
|
-
# def eiger(
|
|
121
|
-
# wait_for_connection: bool = True,
|
|
122
|
-
# fake_with_ophyd_sim: bool = False,
|
|
123
|
-
# params: DetectorParams | None = None,
|
|
124
|
-
# ) -> EigerDetector:
|
|
125
|
-
# """Get the i24 Eiger device, instantiate it if it hasn't already been.
|
|
126
|
-
# If this is called when already instantiated, it will return the existing object.
|
|
127
|
-
# If called with params, will update those params to the Eiger object.
|
|
128
|
-
# """
|
|
129
|
-
#
|
|
130
|
-
# def set_params(eiger: EigerDetector):
|
|
131
|
-
# if params is not None:
|
|
132
|
-
# eiger.set_detector_parameters(params)
|
|
133
|
-
#
|
|
134
|
-
# return device_instantiation(
|
|
135
|
-
# device_factory=EigerDetector,
|
|
136
|
-
# name="eiger",
|
|
137
|
-
# prefix="-EA-EIGER-01:",
|
|
138
|
-
# wait=wait_for_connection,
|
|
139
|
-
# fake=fake_with_ophyd_sim,
|
|
140
|
-
# post_create=set_params,
|
|
141
|
-
# )
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
@device_factory()
|
|
105
|
+
@devices.factory()
|
|
145
106
|
def pmac() -> PMAC:
|
|
146
|
-
"""Get the i24 PMAC device, instantiate it if it hasn't already been.
|
|
147
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
148
|
-
"""
|
|
149
107
|
return PMAC(PREFIX.beamline_prefix)
|
|
150
108
|
|
|
151
109
|
|
|
152
|
-
@
|
|
110
|
+
@devices.factory()
|
|
153
111
|
def oav() -> OAVBeamCentreFile:
|
|
154
112
|
return OAVBeamCentreFile(
|
|
155
113
|
prefix=f"{PREFIX.beamline_prefix}-DI-OAV-01:",
|
|
@@ -157,62 +115,55 @@ def oav() -> OAVBeamCentreFile:
|
|
|
157
115
|
)
|
|
158
116
|
|
|
159
117
|
|
|
160
|
-
@
|
|
118
|
+
@devices.factory()
|
|
161
119
|
def vgonio() -> VerticalGoniometer:
|
|
162
|
-
"""Get the i24 vertical goniometer device, instantiate it if it hasn't already been.
|
|
163
|
-
If this is called when already instantiated, it will return the existing object.
|
|
164
|
-
"""
|
|
165
120
|
return VerticalGoniometer(f"{PREFIX.beamline_prefix}-MO-VGON-01:")
|
|
166
121
|
|
|
167
122
|
|
|
168
|
-
@
|
|
123
|
+
@devices.factory()
|
|
169
124
|
def zebra() -> Zebra:
|
|
170
|
-
"""Get the i24 zebra device, instantiate it if it hasn't already been.
|
|
171
|
-
If this is called when already instantiated in i24, it will return the existing object.
|
|
172
|
-
"""
|
|
173
125
|
return Zebra(
|
|
174
126
|
prefix=f"{PREFIX.beamline_prefix}-EA-ZEBRA-01:",
|
|
175
127
|
mapping=I24_ZEBRA_MAPPING,
|
|
176
128
|
)
|
|
177
129
|
|
|
178
130
|
|
|
179
|
-
@
|
|
131
|
+
@devices.factory()
|
|
180
132
|
def shutter() -> HutchShutter:
|
|
181
|
-
"""Get the i24 hutch shutter device, instantiate it if it hasn't already been.
|
|
182
|
-
If this is called when already instantiated, it will return the existing object.
|
|
183
|
-
"""
|
|
184
133
|
return HutchShutter(f"{PREFIX.beamline_prefix}-PS-SHTR-01:")
|
|
185
134
|
|
|
186
135
|
|
|
187
|
-
@
|
|
136
|
+
@devices.factory()
|
|
188
137
|
def focus_mirrors() -> FocusMirrorsMode:
|
|
189
|
-
"""Get the i24 focus mirror devise to find the beam size."""
|
|
190
138
|
return FocusMirrorsMode(f"{PREFIX.beamline_prefix}-OP-MFM-01:")
|
|
191
139
|
|
|
192
140
|
|
|
193
|
-
@
|
|
141
|
+
@devices.factory()
|
|
194
142
|
def eiger_beam_center() -> DetectorBeamCenter:
|
|
195
|
-
""
|
|
196
|
-
return DetectorBeamCenter(
|
|
197
|
-
f"{PREFIX.beamline_prefix}-EA-EIGER-01:CAM:",
|
|
198
|
-
"eiger_bc",
|
|
199
|
-
)
|
|
143
|
+
return DetectorBeamCenter(f"{PREFIX.beamline_prefix}-EA-EIGER-01:CAM:", "eiger_bc")
|
|
200
144
|
|
|
201
145
|
|
|
202
|
-
@
|
|
146
|
+
@devices.factory()
|
|
203
147
|
def commissioning_jungfrau(
|
|
204
|
-
|
|
205
|
-
filename: str = "jf_output", # but these should be manually entered when commissioning
|
|
148
|
+
path_provider: PathProvider,
|
|
206
149
|
) -> CommissioningJungfrau:
|
|
207
150
|
"""Get the commissionning Jungfrau 9M device, which uses a temporary filewriter
|
|
208
151
|
device in place of Odin while the detector is in commissioning.
|
|
209
|
-
|
|
210
|
-
If this is called when already instantiated, it will return the existing object."""
|
|
211
|
-
|
|
152
|
+
"""
|
|
212
153
|
return CommissioningJungfrau(
|
|
213
154
|
f"{PREFIX.beamline_prefix}-EA-JFRAU-01:",
|
|
214
155
|
f"{PREFIX.beamline_prefix}-JUNGFRAU-META:FD:",
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
156
|
+
AutoMaxIncrementingPathProvider(path_provider),
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
@devices.factory()
|
|
161
|
+
def synchrotron() -> Synchrotron:
|
|
162
|
+
return Synchrotron()
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
@devices.factory()
|
|
166
|
+
def sample_shutter() -> ZebraShutter:
|
|
167
|
+
return ZebraShutter(
|
|
168
|
+
f"{PREFIX.beamline_prefix}-EA-SHTR-01:",
|
|
218
169
|
)
|
dodal/beamlines/k07.py
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from daq_config_server.client import ConfigServer
|
|
1
4
|
from ophyd_async.core import StrictEnum
|
|
2
5
|
|
|
3
|
-
from dodal.common.beamlines.beamline_utils import (
|
|
4
|
-
device_factory,
|
|
5
|
-
)
|
|
6
6
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
7
|
+
from dodal.device_manager import DeviceManager
|
|
8
|
+
from dodal.devices.insertion_device import (
|
|
9
|
+
Apple2,
|
|
10
|
+
Apple2EnforceLHMoveController,
|
|
11
|
+
ConfigServerEnergyMotorLookup,
|
|
12
|
+
InsertionDeviceEnergy,
|
|
13
|
+
InsertionDevicePolarisation,
|
|
14
|
+
LookupTableColumnConfig,
|
|
15
|
+
UndulatorGap,
|
|
16
|
+
UndulatorPhaseAxes,
|
|
17
|
+
)
|
|
7
18
|
from dodal.devices.pgm import PlaneGratingMonochromator
|
|
8
19
|
from dodal.devices.synchrotron import Synchrotron
|
|
9
20
|
from dodal.log import set_beamline as set_log_beamline
|
|
10
21
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
11
22
|
|
|
23
|
+
devices = DeviceManager()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
K07_CONF_CLIENT = ConfigServer(url="https://daq-config.diamond.ac.uk")
|
|
27
|
+
|
|
28
|
+
LOOK_UPTABLE_DIR = "/dls_sw/k07/software/gda/workspace_git/gda-diamond.git/configurations/k07/lookupTables/"
|
|
29
|
+
GAP_LOOKUP_FILE_NAME = "JIDEnergy2GapCalibrations.csv"
|
|
30
|
+
PHASE_LOOKUP_FILE_NAME = "JIDEnergy2PhaseCalibrations.csv"
|
|
31
|
+
K07_GRATING_COLUMNS = "Grating"
|
|
32
|
+
K07_PHASE_POLY_DEG_COLUMNS = ["0th-order"]
|
|
33
|
+
|
|
12
34
|
BL = get_beamline_name("k07")
|
|
13
35
|
PREFIX = BeamlinePrefix(BL)
|
|
14
36
|
set_log_beamline(BL)
|
|
15
37
|
set_utils_beamline(BL)
|
|
16
38
|
|
|
17
39
|
|
|
18
|
-
@
|
|
40
|
+
@devices.factory()
|
|
19
41
|
def synchrotron() -> Synchrotron:
|
|
20
42
|
return Synchrotron()
|
|
21
43
|
|
|
@@ -26,9 +48,81 @@ class Grating(StrictEnum):
|
|
|
26
48
|
|
|
27
49
|
|
|
28
50
|
# Grating does not exist yet - this class is a placeholder for when it does
|
|
29
|
-
@
|
|
51
|
+
@devices.factory(skip=True)
|
|
30
52
|
def pgm() -> PlaneGratingMonochromator:
|
|
31
53
|
return PlaneGratingMonochromator(
|
|
32
54
|
prefix=f"{PREFIX.beamline_prefix}-OP-PGM-01:",
|
|
33
55
|
grating=Grating,
|
|
34
56
|
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Insertion device does not exist yet - these classes are placeholders at the moment.
|
|
60
|
+
@devices.factory(skip=True)
|
|
61
|
+
def id_gap() -> UndulatorGap:
|
|
62
|
+
return UndulatorGap(
|
|
63
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# Insertion device does not exist yet - these classes are placeholders at the moment.
|
|
68
|
+
@devices.factory(skip=True)
|
|
69
|
+
def id_phase() -> UndulatorPhaseAxes:
|
|
70
|
+
return UndulatorPhaseAxes(
|
|
71
|
+
prefix=f"{PREFIX.insertion_prefix}-MO-SERVC-01:",
|
|
72
|
+
top_outer="RPQ1",
|
|
73
|
+
top_inner="RPQ2",
|
|
74
|
+
btm_inner="RPQ3",
|
|
75
|
+
btm_outer="RPQ4",
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# Insertion device does not exist yet - these classes are placeholders at the moment.
|
|
80
|
+
@devices.factory(skip=True)
|
|
81
|
+
def id(
|
|
82
|
+
id_gap: UndulatorGap, id_phase: UndulatorPhaseAxes
|
|
83
|
+
) -> Apple2[UndulatorPhaseAxes]:
|
|
84
|
+
"""K07 insertion device."""
|
|
85
|
+
return Apple2[UndulatorPhaseAxes](
|
|
86
|
+
id_gap=id_gap,
|
|
87
|
+
id_phase=id_phase,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# Insertion device does not exist yet - temporary use Apple2EnforceLHMoveController
|
|
92
|
+
@devices.factory(skip=True)
|
|
93
|
+
def id_controller(
|
|
94
|
+
id: Apple2[UndulatorPhaseAxes],
|
|
95
|
+
) -> Apple2EnforceLHMoveController[UndulatorPhaseAxes]:
|
|
96
|
+
"""I21 insertion device controller."""
|
|
97
|
+
return Apple2EnforceLHMoveController[UndulatorPhaseAxes](
|
|
98
|
+
apple2=id,
|
|
99
|
+
gap_energy_motor_lut=ConfigServerEnergyMotorLookup(
|
|
100
|
+
lut_config=LookupTableColumnConfig(grating=K07_GRATING_COLUMNS),
|
|
101
|
+
config_client=K07_CONF_CLIENT,
|
|
102
|
+
path=Path(LOOK_UPTABLE_DIR, GAP_LOOKUP_FILE_NAME),
|
|
103
|
+
),
|
|
104
|
+
phase_energy_motor_lut=ConfigServerEnergyMotorLookup(
|
|
105
|
+
lut_config=LookupTableColumnConfig(
|
|
106
|
+
grating=K07_GRATING_COLUMNS, poly_deg=K07_PHASE_POLY_DEG_COLUMNS
|
|
107
|
+
),
|
|
108
|
+
config_client=K07_CONF_CLIENT,
|
|
109
|
+
path=Path(LOOK_UPTABLE_DIR, GAP_LOOKUP_FILE_NAME),
|
|
110
|
+
),
|
|
111
|
+
units="eV",
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Insertion device does not exist yet - these classes are placeholders at the moment.
|
|
116
|
+
@devices.factory(skip=True)
|
|
117
|
+
def id_energy(
|
|
118
|
+
id_controller: Apple2EnforceLHMoveController[UndulatorPhaseAxes],
|
|
119
|
+
) -> InsertionDeviceEnergy:
|
|
120
|
+
return InsertionDeviceEnergy(id_controller)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
# Insertion device does not exist yet - these classes are placeholders at the moment.
|
|
124
|
+
@devices.factory(skip=True)
|
|
125
|
+
def id_polarisation(
|
|
126
|
+
id_controller: Apple2EnforceLHMoveController[UndulatorPhaseAxes],
|
|
127
|
+
) -> InsertionDevicePolarisation:
|
|
128
|
+
return InsertionDevicePolarisation(id_controller)
|
dodal/beamlines/p38.py
CHANGED
|
@@ -15,9 +15,9 @@ from dodal.common.crystal_metadata import (
|
|
|
15
15
|
make_crystal_metadata_from_material,
|
|
16
16
|
)
|
|
17
17
|
from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
|
|
18
|
+
from dodal.devices.beamlines.i22.dcm import DCM
|
|
19
|
+
from dodal.devices.beamlines.i22.fswitch import FSwitch
|
|
18
20
|
from dodal.devices.focusing_mirror import FocusingMirror
|
|
19
|
-
from dodal.devices.i22.dcm import DCM
|
|
20
|
-
from dodal.devices.i22.fswitch import FSwitch
|
|
21
21
|
from dodal.devices.linkam3 import Linkam3
|
|
22
22
|
from dodal.devices.pressure_jump_cell import PressureJumpCell
|
|
23
23
|
from dodal.devices.slits import Slits
|
|
@@ -198,7 +198,7 @@ def linkam() -> Linkam3:
|
|
|
198
198
|
|
|
199
199
|
@device_factory()
|
|
200
200
|
def ppump() -> WatsonMarlow323Pump:
|
|
201
|
-
"""Peristaltic Pump"""
|
|
201
|
+
"""Peristaltic Pump."""
|
|
202
202
|
return WatsonMarlow323Pump(f"{PREFIX.beamline_prefix}-EA-PUMP-01:")
|
|
203
203
|
|
|
204
204
|
|
dodal/beamlines/p60.py
CHANGED
|
@@ -1,48 +1,69 @@
|
|
|
1
|
-
from dodal.common.beamlines.beamline_utils import (
|
|
2
|
-
device_factory,
|
|
3
|
-
)
|
|
4
1
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
5
|
-
from dodal.
|
|
6
|
-
from dodal.devices.
|
|
7
|
-
from dodal.devices.p60 import (
|
|
2
|
+
from dodal.device_manager import DeviceManager
|
|
3
|
+
from dodal.devices.beamlines.p60 import (
|
|
8
4
|
LabXraySource,
|
|
9
5
|
LabXraySourceReadable,
|
|
10
6
|
LensMode,
|
|
11
7
|
PassEnergy,
|
|
12
8
|
PsuMode,
|
|
13
9
|
)
|
|
10
|
+
from dodal.devices.electron_analyser.base import DualEnergySource
|
|
11
|
+
from dodal.devices.electron_analyser.vgscienta import VGScientaDetector
|
|
12
|
+
from dodal.devices.selectable_source import SourceSelector
|
|
14
13
|
from dodal.log import set_beamline as set_log_beamline
|
|
15
14
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
16
15
|
|
|
16
|
+
"""
|
|
17
|
+
NOTE: Due to p60 not having a CA gateway, PVs are not available remotely and you need to
|
|
18
|
+
be on the beamline network to access them so a remote `dodal connect p60` will fail.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
devices = DeviceManager()
|
|
22
|
+
|
|
17
23
|
BL = get_beamline_name("p60")
|
|
18
24
|
PREFIX = BeamlinePrefix(BL)
|
|
19
25
|
set_log_beamline(BL)
|
|
20
26
|
set_utils_beamline(BL)
|
|
21
27
|
|
|
22
28
|
|
|
23
|
-
@
|
|
29
|
+
@devices.factory()
|
|
30
|
+
def source_selector() -> SourceSelector:
|
|
31
|
+
return SourceSelector()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@devices.factory()
|
|
24
35
|
def al_kalpha_source() -> LabXraySourceReadable:
|
|
25
36
|
return LabXraySourceReadable(LabXraySource.AL_KALPHA)
|
|
26
37
|
|
|
27
38
|
|
|
28
|
-
@
|
|
39
|
+
@devices.factory()
|
|
29
40
|
def mg_kalpha_source() -> LabXraySourceReadable:
|
|
30
41
|
return LabXraySourceReadable(LabXraySource.MG_KALPHA)
|
|
31
42
|
|
|
32
43
|
|
|
33
|
-
@
|
|
34
|
-
def energy_source(
|
|
35
|
-
|
|
44
|
+
@devices.factory()
|
|
45
|
+
def energy_source(
|
|
46
|
+
al_kalpha_source: LabXraySourceReadable,
|
|
47
|
+
mg_kalpha_source: LabXraySourceReadable,
|
|
48
|
+
source_selector: SourceSelector,
|
|
49
|
+
) -> DualEnergySource:
|
|
50
|
+
return DualEnergySource(
|
|
51
|
+
al_kalpha_source.energy_ev,
|
|
52
|
+
mg_kalpha_source.energy_ev,
|
|
53
|
+
source_selector.selected_source,
|
|
54
|
+
)
|
|
36
55
|
|
|
37
56
|
|
|
38
57
|
# Connect will work again after this work completed
|
|
39
58
|
# https://jira.diamond.ac.uk/browse/P60-13
|
|
40
|
-
@
|
|
41
|
-
def r4000(
|
|
59
|
+
@devices.factory()
|
|
60
|
+
def r4000(
|
|
61
|
+
energy_source: DualEnergySource,
|
|
62
|
+
) -> VGScientaDetector[LensMode, PsuMode, PassEnergy]:
|
|
42
63
|
return VGScientaDetector[LensMode, PsuMode, PassEnergy](
|
|
43
64
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-01:CAM:",
|
|
44
65
|
lens_mode_type=LensMode,
|
|
45
66
|
psu_mode_type=PsuMode,
|
|
46
67
|
pass_energy_type=PassEnergy,
|
|
47
|
-
energy_source=energy_source
|
|
68
|
+
energy_source=energy_source,
|
|
48
69
|
)
|
dodal/beamlines/p99.py
CHANGED
|
@@ -4,7 +4,6 @@ from ophyd_async.epics.adandor import Andor2Detector
|
|
|
4
4
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
5
5
|
|
|
6
6
|
from dodal.common.beamlines.beamline_utils import (
|
|
7
|
-
device_factory,
|
|
8
7
|
get_path_provider,
|
|
9
8
|
set_beamline,
|
|
10
9
|
set_path_provider,
|
|
@@ -14,11 +13,12 @@ from dodal.common.visit import (
|
|
|
14
13
|
LocalDirectoryServiceClient,
|
|
15
14
|
StaticVisitPathProvider,
|
|
16
15
|
)
|
|
16
|
+
from dodal.device_manager import DeviceManager
|
|
17
17
|
from dodal.devices.attenuator.filter import FilterMotor
|
|
18
18
|
from dodal.devices.attenuator.filter_selections import P99FilterSelections
|
|
19
|
+
from dodal.devices.beamlines.p99.andor2_point import Andor2Point
|
|
20
|
+
from dodal.devices.beamlines.p99.sample_stage import SampleAngleStage
|
|
19
21
|
from dodal.devices.motors import XYZStage
|
|
20
|
-
from dodal.devices.p99.andor2_point import Andor2Point
|
|
21
|
-
from dodal.devices.p99.sample_stage import SampleAngleStage
|
|
22
22
|
from dodal.log import set_beamline as set_log_beamline
|
|
23
23
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
24
24
|
|
|
@@ -26,24 +26,25 @@ BL = get_beamline_name("p99")
|
|
|
26
26
|
PREFIX = BeamlinePrefix(BL)
|
|
27
27
|
set_log_beamline(BL)
|
|
28
28
|
set_beamline(BL)
|
|
29
|
+
devices = DeviceManager()
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
@
|
|
32
|
+
@devices.factory()
|
|
32
33
|
def angle_stage() -> SampleAngleStage:
|
|
33
34
|
return SampleAngleStage(f"{PREFIX.beamline_prefix}-MO-STAGE-01:")
|
|
34
35
|
|
|
35
36
|
|
|
36
|
-
@
|
|
37
|
+
@devices.factory()
|
|
37
38
|
def filter() -> FilterMotor:
|
|
38
39
|
return FilterMotor(f"{PREFIX.beamline_prefix}-MO-STAGE-02:MP:", P99FilterSelections)
|
|
39
40
|
|
|
40
41
|
|
|
41
|
-
@
|
|
42
|
+
@devices.factory()
|
|
42
43
|
def sample_stage() -> XYZStage:
|
|
43
44
|
return XYZStage(f"{PREFIX.beamline_prefix}-MO-STAGE-02:")
|
|
44
45
|
|
|
45
46
|
|
|
46
|
-
@
|
|
47
|
+
@devices.factory()
|
|
47
48
|
def lab_stage() -> XYZStage:
|
|
48
49
|
return XYZStage(f"{PREFIX.beamline_prefix}-MO-STAGE-02:LAB:")
|
|
49
50
|
|
|
@@ -57,7 +58,7 @@ set_path_provider(
|
|
|
57
58
|
)
|
|
58
59
|
|
|
59
60
|
|
|
60
|
-
@
|
|
61
|
+
@devices.factory()
|
|
61
62
|
def andor2_det() -> Andor2Detector:
|
|
62
63
|
"""Andor model:DU897_BV."""
|
|
63
64
|
return Andor2Detector(
|
|
@@ -68,10 +69,11 @@ def andor2_det() -> Andor2Detector:
|
|
|
68
69
|
)
|
|
69
70
|
|
|
70
71
|
|
|
71
|
-
@
|
|
72
|
+
@devices.factory()
|
|
72
73
|
def andor2_point() -> Andor2Point:
|
|
73
|
-
"""Using the andor2 as if it is a massive point detector, read the meanValue and
|
|
74
|
-
a picture is taken.
|
|
74
|
+
"""Using the andor2 as if it is a massive point detector, read the meanValue and
|
|
75
|
+
total after a picture is taken.
|
|
76
|
+
"""
|
|
75
77
|
return Andor2Point(
|
|
76
78
|
prefix=f"{PREFIX.beamline_prefix}-EA-DET-03:",
|
|
77
79
|
drv_suffix=CAM_SUFFIX,
|
|
@@ -79,11 +81,10 @@ def andor2_point() -> Andor2Point:
|
|
|
79
81
|
)
|
|
80
82
|
|
|
81
83
|
|
|
82
|
-
@
|
|
84
|
+
@devices.factory()
|
|
83
85
|
def panda() -> HDFPanda:
|
|
84
|
-
"""
|
|
85
|
-
|
|
86
|
-
the pcomp[1] and pcomp[2] blocks, which handle positive and negative directions.
|
|
86
|
+
"""The Panda device is connected to two PMAC motors for position comparison under
|
|
87
|
+
the pcomp[1] and pcomp[2] blocks, which handle positive and negative directions.
|
|
87
88
|
This setup is used for triggering detectors during a flyscan.
|
|
88
89
|
"""
|
|
89
90
|
return HDFPanda(
|
dodal/beamlines/training_rig.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
from functools import cache
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from ophyd_async.core import PathProvider, StaticPathProvider, UUIDFilenameProvider
|
|
1
5
|
from ophyd_async.epics.adaravis import AravisDetector
|
|
2
6
|
from ophyd_async.fastcs.panda import HDFPanda
|
|
3
7
|
|
|
4
|
-
from dodal.common.beamlines.beamline_utils import (
|
|
5
|
-
device_factory,
|
|
6
|
-
get_path_provider,
|
|
7
|
-
)
|
|
8
8
|
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
|
|
9
9
|
from dodal.common.beamlines.device_helpers import DET_SUFFIX, HDF5_SUFFIX
|
|
10
|
+
from dodal.device_manager import DeviceManager
|
|
10
11
|
from dodal.devices.motors import XThetaStage
|
|
11
12
|
from dodal.log import set_beamline as set_log_beamline
|
|
12
13
|
from dodal.utils import BeamlinePrefix, get_beamline_name
|
|
@@ -27,25 +28,32 @@ PREFIX = BeamlinePrefix(BL)
|
|
|
27
28
|
set_log_beamline(BL)
|
|
28
29
|
set_utils_beamline(BL)
|
|
29
30
|
|
|
31
|
+
devices = DeviceManager()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@devices.fixture
|
|
35
|
+
@cache
|
|
36
|
+
def path_provider() -> PathProvider:
|
|
37
|
+
return StaticPathProvider(UUIDFilenameProvider(), Path("/tmp"))
|
|
38
|
+
|
|
30
39
|
|
|
31
|
-
@
|
|
40
|
+
@devices.factory()
|
|
32
41
|
def sample_stage() -> XThetaStage:
|
|
33
42
|
return XThetaStage(f"{PREFIX.beamline_prefix}-MO-MAP-01:STAGE:")
|
|
34
43
|
|
|
35
44
|
|
|
36
|
-
@
|
|
37
|
-
def det() -> AravisDetector:
|
|
45
|
+
@devices.factory()
|
|
46
|
+
def det(path_provider: PathProvider) -> AravisDetector:
|
|
38
47
|
return AravisDetector(
|
|
39
48
|
f"{PREFIX.beamline_prefix}-EA-DET-01:",
|
|
40
|
-
path_provider=
|
|
49
|
+
path_provider=path_provider,
|
|
41
50
|
drv_suffix=DET_SUFFIX,
|
|
42
51
|
fileio_suffix=HDF5_SUFFIX,
|
|
43
52
|
)
|
|
44
53
|
|
|
45
54
|
|
|
46
|
-
@
|
|
47
|
-
def panda() -> HDFPanda:
|
|
55
|
+
@devices.factory()
|
|
56
|
+
def panda(path_provider: PathProvider) -> HDFPanda:
|
|
48
57
|
return HDFPanda(
|
|
49
|
-
prefix=f"{PREFIX.beamline_prefix}-MO-PANDA-01:",
|
|
50
|
-
path_provider=get_path_provider(),
|
|
58
|
+
prefix=f"{PREFIX.beamline_prefix}-MO-PANDA-01:", path_provider=path_provider
|
|
51
59
|
)
|