Skip to content

Commit 5376471

Browse files
WIP
1 parent f503f67 commit 5376471

File tree

13 files changed

+37
-36
lines changed

13 files changed

+37
-36
lines changed

docs/developer/hyperion/reference/gridscan.puml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ class GridScanParamsCommon {
9797
z2_start_mm
9898
}
9999
class PandAGridScanParams
100-
class ZebraGridScanParams
100+
class ZebraGridScanParamsThreeD
101101

102102
AbstractExperimentBase <|-- AbstractExperimentWithBeamParams
103103
AbstractExperimentWithBeamParams <|-- GridScanParamsCommon
104104
GridScanParamsCommon <|-- PandAGridScanParams
105-
GridScanParamsCommon <|-- ZebraGridScanParams
105+
GridScanParamsCommon <|-- ZebraGridScanParamsThreeD
106106

107-
HyperionThreeDGridScan --> ZebraGridScanParams : generates
107+
HyperionThreeDGridScan --> ZebraGridScanParamsThreeD : generates
108108
HyperionThreeDGridScan --> PandAGridScanParams : generates
109109
@enduml

src/mx_bluesky/beamlines/i04/experiment_plans/i04_grid_detect_then_xray_centre_plan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from dodal.devices.detector.detector_motion import DetectorMotion
1414
from dodal.devices.eiger import EigerDetector
1515
from dodal.devices.fast_grid_scan import (
16-
ZebraThreeDFastGridScan,
16+
ZebraFastGridScanThreeD,
1717
set_fast_grid_scan_params,
1818
)
1919
from dodal.devices.flux import Flux
@@ -80,7 +80,7 @@ def i04_grid_detect_then_xray_centre(
8080
backlight: Backlight = inject("backlight"),
8181
beamstop: Beamstop = inject("beamstop"),
8282
dcm: BaseDCM = inject("dcm"),
83-
zebra_fast_grid_scan: ZebraThreeDFastGridScan = inject("zebra_fast_grid_scan"),
83+
zebra_fast_grid_scan: ZebraFastGridScanThreeD = inject("zebra_fast_grid_scan"),
8484
flux: Flux = inject("flux"),
8585
oav: OAV = inject("oav"),
8686
pin_tip_detection: PinTipDetection = inject("pin_tip_detection"),

src/mx_bluesky/common/experiment_plans/common_flyscan_xray_centre_plan.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from bluesky.utils import MsgGenerator
1212
from dodal.devices.fast_grid_scan import (
1313
FastGridScanCommon,
14+
FastGridScanThreeD,
1415
)
1516
from dodal.devices.zocalo import ZocaloResults
1617
from dodal.devices.zocalo.zocalo_results import (
@@ -288,10 +289,10 @@ def run_gridscan(
288289
plan_during_collection=beamline_specific.read_during_collection_plan,
289290
)
290291

291-
# GDA's gridscans requires Z steps to be at 0, so make sure we leave this device
292+
# GDA's 3D gridscans requires Z steps to be at 0, so make sure we leave this device
292293
# in a GDA-happy state.
293-
# TODO if fgs motors is 3d then do the below
294-
yield from bps.abs_set(beamline_specific.fgs_motors.z_steps, 0, wait=False)
294+
if isinstance(beamline_specific.fgs_motors, FastGridScanThreeD):
295+
yield from bps.abs_set(beamline_specific.fgs_motors.z_steps, 0, wait=False)
295296

296297

297298
def wait_for_gridscan_valid(fgs_motors: FastGridScanCommon, timeout=0.5):

src/mx_bluesky/common/parameters/device_composites.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from dodal.devices.detector.detector_motion import DetectorMotion
1111
from dodal.devices.eiger import EigerDetector
1212
from dodal.devices.fast_grid_scan import (
13-
ZebraThreeDFastGridScan,
13+
ZebraFastGridScanThreeD,
1414
)
1515
from dodal.devices.flux import Flux
1616
from dodal.devices.mx_phase1.beamstop import Beamstop
@@ -62,7 +62,7 @@ class GridDetectThenXRayCentreComposite(FlyScanEssentialDevices):
6262
beamstop: Beamstop
6363
dcm: BaseDCM
6464
detector_motion: DetectorMotion
65-
zebra_fast_grid_scan: ZebraThreeDFastGridScan
65+
zebra_fast_grid_scan: ZebraFastGridScanThreeD
6666
flux: Flux
6767
oav: OAV
6868
pin_tip_detection: PinTipDetection

src/mx_bluesky/common/parameters/gridscan.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from dodal.devices.detector.det_dim_constants import EIGER2_X_9M_SIZE, EIGER2_X_16M_SIZE
55
from dodal.devices.detector.detector import DetectorParams
66
from dodal.devices.fast_grid_scan import (
7-
ZebraGridScanParams,
7+
ZebraGridScanParamsThreeD,
88
)
99
from dodal.utils import get_beamline_name
1010
from pydantic import Field, PrivateAttr
@@ -115,8 +115,8 @@ class SpecifiedThreeDGridScan(
115115
_set_stub_offsets: bool = PrivateAttr(default_factory=lambda: False)
116116

117117
@property
118-
def FGS_params(self) -> ZebraGridScanParams:
119-
return ZebraGridScanParams(
118+
def FGS_params(self) -> ZebraGridScanParamsThreeD:
119+
return ZebraGridScanParamsThreeD(
120120
x_steps=self.x_steps,
121121
y_steps=self.y_steps,
122122
z_steps=self.z_steps,

src/mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from dodal.devices.backlight import Backlight
1313
from dodal.devices.detector.detector_motion import DetectorMotion
1414
from dodal.devices.eiger import EigerDetector
15-
from dodal.devices.fast_grid_scan import PandAFastGridScan, ZebraThreeDFastGridScan
15+
from dodal.devices.fast_grid_scan import PandAFastGridScan, ZebraFastGridScanThreeD
1616
from dodal.devices.flux import Flux
1717
from dodal.devices.focusing_mirror import FocusingMirrorWithStripes, MirrorVoltages
1818
from dodal.devices.i03 import Beamstop
@@ -72,7 +72,7 @@ class RobotLoadThenCentreComposite:
7272
backlight: Backlight
7373
detector_motion: DetectorMotion
7474
eiger: EigerDetector
75-
zebra_fast_grid_scan: ZebraThreeDFastGridScan
75+
zebra_fast_grid_scan: ZebraFastGridScanThreeD
7676
flux: Flux
7777
oav: OAV
7878
pin_tip_detection: PinTipDetection

src/mx_bluesky/hyperion/parameters/device_composites.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from dodal.devices.eiger import EigerDetector
1111
from dodal.devices.fast_grid_scan import (
1212
PandAFastGridScan,
13-
ZebraThreeDFastGridScan,
13+
ZebraFastGridScanThreeD,
1414
)
1515
from dodal.devices.flux import Flux
1616
from dodal.devices.robot import BartRobot
@@ -52,7 +52,7 @@ class HyperionFlyScanXRayCentreComposite(FlyScanEssentialDevices):
5252
sample_shutter: ZebraShutter
5353
backlight: Backlight
5454
xbpm_feedback: XBPMFeedback
55-
zebra_fast_grid_scan: ZebraThreeDFastGridScan
55+
zebra_fast_grid_scan: ZebraFastGridScanThreeD
5656
smargon: Smargon
5757

5858

src/mx_bluesky/hyperion/parameters/gridscan.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from dodal.devices.fast_grid_scan import (
44
PandAGridScanParams,
5-
ZebraGridScanParams,
5+
ZebraGridScanParamsThreeD,
66
)
77

88
from mx_bluesky.common.parameters.gridscan import (
@@ -44,8 +44,8 @@ def detector_params(self):
4444

4545
# Relative to common grid scan, stub offsets are defined by config server
4646
@property
47-
def FGS_params(self) -> ZebraGridScanParams:
48-
return ZebraGridScanParams(
47+
def FGS_params(self) -> ZebraGridScanParamsThreeD:
48+
return ZebraGridScanParamsThreeD(
4949
x_steps=self.x_steps,
5050
y_steps=self.y_steps,
5151
z_steps=self.z_steps,

tests/unit_tests/beamlines/i04/test_i04_grid_detect_then_xray_centre_plan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from dodal.devices.detector.detector_motion import DetectorMotion
1414
from dodal.devices.eiger import EigerDetector
1515
from dodal.devices.fast_grid_scan import (
16-
ZebraThreeDFastGridScan,
16+
ZebraFastGridScanThreeD,
1717
)
1818
from dodal.devices.flux import Flux
1919
from dodal.devices.mx_phase1.beamstop import Beamstop
@@ -51,7 +51,7 @@ def i04_grid_detect_then_xrc_default_params(
5151
backlight: Backlight,
5252
beamstop_phase1: Beamstop,
5353
dcm: BaseDCM,
54-
zebra_fast_grid_scan: ZebraThreeDFastGridScan,
54+
zebra_fast_grid_scan: ZebraFastGridScanThreeD,
5555
flux: Flux,
5656
oav: OAV,
5757
pin_tip_detection_with_found_pin: PinTipDetection,

tests/unit_tests/common/experiment_plans/inner_plans/test_do_fgs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from bluesky.simulators import RunEngineSimulator, assert_message_and_return_remaining
88
from bluesky.utils import MsgGenerator
99
from dodal.beamlines.i03 import eiger
10-
from dodal.devices.fast_grid_scan import ZebraThreeDFastGridScan
10+
from dodal.devices.fast_grid_scan import ZebraFastGridScanThreeD
1111
from dodal.devices.synchrotron import Synchrotron, SynchrotronMode
1212
from dodal.devices.zocalo.zocalo_results import (
1313
ZOCALO_STAGE_GROUP,
@@ -28,7 +28,7 @@
2828
def fgs_devices(RE):
2929
with init_devices(mock=True):
3030
synchrotron = Synchrotron()
31-
grid_scan_device = ZebraThreeDFastGridScan("zebra_fgs")
31+
grid_scan_device = ZebraFastGridScanThreeD("zebra_fgs")
3232

3333
# Eiger done separately as not ophyd-async yet
3434
detector = eiger(mock=True)
@@ -125,7 +125,7 @@ def event(self, doc: Event):
125125
synchrotron = fgs_devices["synchrotron"]
126126
set_mock_value(synchrotron.synchrotron_mode, SynchrotronMode.DEV)
127127
detector = fgs_devices["detector"]
128-
fgs_device: ZebraThreeDFastGridScan = fgs_devices["grid_scan_device"]
128+
fgs_device: ZebraFastGridScanThreeD = fgs_devices["grid_scan_device"]
129129

130130
detector.unstage = MagicMock()
131131

0 commit comments

Comments
 (0)