Skip to content

Commit

Permalink
Add load_centre_collect to the experiment registry
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuck99 committed Sep 30, 2024
1 parent 75341de commit fde70a7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import mx_bluesky.hyperion.experiment_plans.rotation_scan_plan as rotation_scan_plan
from mx_bluesky.hyperion.experiment_plans import (
grid_detect_then_xray_centre_plan,
load_centre_collect_full_plan,
pin_centre_then_xray_centre_plan,
robot_load_then_centre_plan,
)
from mx_bluesky.hyperion.external_interaction.callbacks.common.callback_util import (
CallbacksFactory,
create_gridscan_callbacks,
create_load_centre_collect_callbacks,
create_robot_load_and_centre_callbacks,
create_rotation_callbacks,
)
Expand All @@ -22,6 +24,7 @@
RobotLoadThenCentre,
ThreeDGridScan,
)
from mx_bluesky.hyperion.parameters.load_centre_collect import LoadCentreCollect
from mx_bluesky.hyperion.parameters.rotation import MultiRotationScan, RotationScan


Expand All @@ -42,6 +45,7 @@ class ExperimentRegistryEntry(TypedDict):
| MultiRotationScan
| PinTipCentreThenXrayCentre
| RobotLoadThenCentre
| LoadCentreCollect
]
callbacks_factory: CallbacksFactory

Expand Down Expand Up @@ -77,6 +81,11 @@ class ExperimentRegistryEntry(TypedDict):
"param_type": MultiRotationScan,
"callbacks_factory": create_rotation_callbacks,
},
"load_centre_collect_full_plan": {
"setup": load_centre_collect_full_plan.create_devices,
"param_type": LoadCentreCollect,
"callbacks_factory": create_load_centre_collect_callbacks,
},
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,21 @@ def create_rotation_callbacks() -> (
tuple[RotationNexusFileCallback, RotationISPyBCallback]
):
return (RotationNexusFileCallback(), RotationISPyBCallback(emit=ZocaloCallback()))


def create_load_centre_collect_callbacks() -> (
tuple[
GridscanNexusFileCallback,
GridscanISPyBCallback,
RobotLoadISPyBCallback,
RotationNexusFileCallback,
RotationISPyBCallback,
]
):
return (
GridscanNexusFileCallback(),
GridscanISPyBCallback(emit=ZocaloCallback()),
RobotLoadISPyBCallback(),
RotationNexusFileCallback(),
RotationISPyBCallback(emit=ZocaloCallback()),
)

0 comments on commit fde70a7

Please sign in to comment.