-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86d798a
commit 7134287
Showing
2 changed files
with
11 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,32 @@ | ||
from dodal.common.beamlines.beamline_utils import device_instantiation | ||
from dodal.common.beamlines.beamline_utils import device_factory | ||
from dodal.common.beamlines.beamline_utils import set_beamline as set_utils_beamline | ||
from dodal.devices.turbo_slit import TurboSlit | ||
from dodal.devices.xspress3.xspress3 import Xspress3 | ||
from dodal.log import set_beamline as set_log_beamline | ||
from dodal.utils import get_beamline_name | ||
from dodal.utils import BeamlinePrefix, get_beamline_name | ||
|
||
BL = get_beamline_name("i20_1") | ||
PREFIX = BeamlinePrefix(BL) | ||
set_log_beamline(BL) | ||
set_utils_beamline(BL) | ||
|
||
|
||
def turbo_slit( | ||
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False | ||
) -> TurboSlit: | ||
@device_factory() | ||
def turbo_slit() -> TurboSlit: | ||
""" | ||
turboslit for selecting energy from the polychromator | ||
""" | ||
|
||
return device_instantiation( | ||
TurboSlit, | ||
prefix="-OP-PCHRO-01:TS:", | ||
name="turbo_slit", | ||
wait=wait_for_connection, | ||
fake=fake_with_ophyd_sim, | ||
) | ||
return TurboSlit(f"{PREFIX.beamline_prefix}-OP-PCHRO-01:TS:") | ||
|
||
|
||
def xspress3( | ||
wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False | ||
) -> Xspress3: | ||
@device_factory() | ||
def xspress3() -> Xspress3: | ||
""" | ||
16 channels Xspress3 detector | ||
""" | ||
|
||
return device_instantiation( | ||
Xspress3, | ||
prefix="-EA-DET-03:", | ||
name="Xspress3", | ||
return Xspress3( | ||
f"{PREFIX.beamline_prefix}-EA-DET-03:", | ||
num_channels=16, | ||
wait=wait_for_connection, | ||
fake=fake_with_ophyd_sim, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters