Skip to content

Commit

Permalink
Added prefixes based on beamline
Browse files Browse the repository at this point in the history
  • Loading branch information
vshekar committed Apr 25, 2024
1 parent de6f6f8 commit 973088d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions mxbluesky/devices/top_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
from collections import OrderedDict
import daq_utils

if daq_utils.beamline == 'amx':
device_prefix = "XF:17IDB-ES:AMX"
else:
device_prefix = "XF:17IDC-ES:FMX"

class TopPlanLimit(Enum):
"""Prevent large goniometer movements during topview plan. Rotating gonio
with piezo stages extended can hit things like the collimator or beamstop.
Expand Down Expand Up @@ -168,16 +173,16 @@ def __init__(self, message):

class TopAlignerBase(Device):

topcam = Cpt(TopAlignCam, "XF:17IDB-ES:AMX{Cam:9}")
gonio_o = Cpt(EpicsMotor, "XF:17IDB-ES:AMX{Gon:1-Ax:O}Mtr", timeout=6)
topcam = Cpt(TopAlignCam, f"{device_prefix}{{Cam:9}}")
gonio_o = Cpt(EpicsMotor, f"{device_prefix}{{Gon:1-Ax:O}}Mtr", timeout=6)
gonio_py = Cpt(
EpicsMotorSPMG, "XF:17IDB-ES:AMX{Gon:1-Ax:PY}Mtr", timeout=6
EpicsMotorSPMG, f"{device_prefix}{{Gon:1-Ax:PY}}Mtr", timeout=6
)
gonio_pz = Cpt(
EpicsMotorSPMG, "XF:17IDB-ES:AMX{Gon:1-Ax:PZ}Mtr", timeout=6
EpicsMotorSPMG, f"{device_prefix}{{Gon:1-Ax:PZ}}Mtr", timeout=6
)
kill_py = Cpt(EpicsSignal, "XF:17IDB-ES:AMX{Gon:1-Ax:PY}Cmd:Kill-Cmd")
kill_pz = Cpt(EpicsSignal, "XF:17IDB-ES:AMX{Gon:1-Ax:PY}Cmd:Kill-Cmd")
kill_py = Cpt(EpicsSignal, f"{device_prefix}{{Gon:1-Ax:PY}}Cmd:Kill-Cmd")
kill_pz = Cpt(EpicsSignal, f"{device_prefix}{{Gon:1-Ax:PY}}Cmd:Kill-Cmd")

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -205,7 +210,7 @@ def unstage(self, *args, **kwargs):

class TopAlignerFast(TopAlignerBase):

zebra = Cpt(ZebraMXOr, "XF:17IDB-ES:AMX{Zeb:2}:")
zebra = Cpt(ZebraMXOr, f"{device_prefix}{{Zeb:2}}:")
target_gov_state = Cpt(
Signal, value=None, doc="target governor state used to trigger device"
)
Expand Down

0 comments on commit 973088d

Please sign in to comment.