Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

707 add visr b01 1 as a beamline with devices #708

Merged
merged 16 commits into from
Oct 1, 2024
77 changes: 77 additions & 0 deletions src/dodal/beamlines/b01_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
from pathlib import Path

from ophyd_async.epics.adaravis import AravisDetector
from ophyd_async.fastcs.panda import HDFPanda

from dodal.common.beamlines.beamline_utils import (
device_instantiation,
get_path_provider,
set_path_provider,
)
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline
from dodal.common.visit import LocalDirectoryServiceClient, StaticVisitPathProvider
from dodal.devices.synchrotron import Synchrotron
from dodal.log import set_beamline as set_log_beamline

BL = "c01"
set_log_beamline(BL)
set_utils_beamline(BL)

set_path_provider(
StaticVisitPathProvider(
BL,
Path("/dls/b01-1/data/"),
client=LocalDirectoryServiceClient(),
)
)

"""
NOTE: Due to ArgoCD and the k8s cluster configuration those PVs are not available remotely.
You need to be on the beamline-local network to access them.
The simplest way to do this is to `ssh b01-1-ws001` and run `dodal connect b01_1` from there.
remember about the underscore in the beamline name.

See the IOC status here:
https://argocd.diamond.ac.uk/applications?showFavorites=false&proj=&sync=&autoSync=&health=&namespace=&cluster=&labels=
DominicOram marked this conversation as resolved.
Show resolved Hide resolved
"""


def panda(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> HDFPanda:
return device_instantiation(
device_factory=HDFPanda,
name="panda",
prefix="-EA-PANDA-01:",
wait=wait_for_connection,
fake=fake_with_ophyd_sim,
path_provider=get_path_provider(),
)


def synchrotron(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> Synchrotron:
return device_instantiation(
Synchrotron,
"synchrotron",
"",
wait_for_connection,
fake_with_ophyd_sim,
bl_prefix=False,
)


def manta(
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False
) -> AravisDetector:
return device_instantiation(
AravisDetector,
"manta",
"-DI-DCAM-02:",
wait_for_connection,
fake_with_ophyd_sim,
path_provider=get_path_provider(),
drv_suffix="CAM:",
hdf_suffix="HDF5:",
)
Loading