feat: adding bespoke pseudo motor to CMU and FMU
This commit is contained in:
@@ -1,65 +1,65 @@
|
||||
cmu_rox:
|
||||
readoutPriority: baseline
|
||||
description: "Collimating mirror rotation x"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
CMU_y:
|
||||
description: CMU y pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-CMU:ROX"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-CMU
|
||||
override_suffixes:
|
||||
user_readback: :oy
|
||||
user_setpoint: :ty.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
cmu_roy:
|
||||
readoutPriority: baseline
|
||||
description: "Collimating mirror rotation y"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
CMU_z:
|
||||
description: CMU z pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-CMU:ROY"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-CMU
|
||||
override_suffixes:
|
||||
user_readback: :oz
|
||||
user_setpoint: :tz.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
cmu_roz:
|
||||
readoutPriority: baseline
|
||||
description: "Collimating mirror rotation z"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
CMU_Rx:
|
||||
description: CMU Rx pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-CMU:ROZ"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-CMU
|
||||
override_suffixes:
|
||||
user_readback: :oRx
|
||||
user_setpoint: :tRx.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
cmu_try:
|
||||
readoutPriority: baseline
|
||||
description: "Collimating mirror translation y"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
CMU_Ry:
|
||||
description: CMU Ry pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-CMU:TRY"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-CMU
|
||||
override_suffixes:
|
||||
user_readback: :oRy
|
||||
user_setpoint: :tRy.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
cmu_trz:
|
||||
readoutPriority: baseline
|
||||
description: "Collimating mirror translation z"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
CMU_Rz:
|
||||
description: CMU Rz pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-CMU:TRZ"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-CMU
|
||||
override_suffixes:
|
||||
user_readback: :oRz
|
||||
user_setpoint: :tRz.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
@@ -102,68 +102,68 @@ grating_beta:
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
fmu_rox:
|
||||
readoutPriority: baseline
|
||||
description: "Focusing mirror rotation x"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
FMU_y:
|
||||
description: FMU y pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-FMU:ROX"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-FMU
|
||||
override_suffixes:
|
||||
user_readback: :oy
|
||||
user_setpoint: :ty.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
fmu_roy:
|
||||
readoutPriority: baseline
|
||||
description: "Focusing mirror rotation y"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
FMU_z:
|
||||
description: FMU z pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-FMU:ROY"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-FMU
|
||||
override_suffixes:
|
||||
user_readback: :oz
|
||||
user_setpoint: :tz.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
fmu_roz:
|
||||
readoutPriority: baseline
|
||||
description: "Focusing mirror rotation z"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
FMU_Rx:
|
||||
description: FMU Rx pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-FMU:ROZ"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-FMU
|
||||
override_suffixes:
|
||||
user_readback: :oRx
|
||||
user_setpoint: :tRx.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
fmu_try:
|
||||
readoutPriority: baseline
|
||||
description: "Focusing mirror translation y"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
FMU_Ry:
|
||||
description: FMU Ry pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-FMU:TRY"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-FMU
|
||||
override_suffixes:
|
||||
user_readback: :oRy
|
||||
user_setpoint: :tRy.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
fmu_trz:
|
||||
readoutPriority: baseline
|
||||
description: "Focusing mirror translation z"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
FMU_Rz:
|
||||
description: FMU Rz pseudo motor
|
||||
deviceClass: xtreme_bec.devices.mirror_pseudo.MirrorPseudo
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-FMU:TRZ"
|
||||
onFailure: retry
|
||||
prefix: X07MA-OP-FMU
|
||||
override_suffixes:
|
||||
user_readback: :oRz
|
||||
user_setpoint: :tRz.A
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
readoutPriority: baseline
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
@@ -179,68 +179,3 @@ exit_slit:
|
||||
softwareTrigger: false
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
rmu_rox:
|
||||
readoutPriority: baseline
|
||||
description: "Refocusing mirror rotation x"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-RMU:ROX"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
rmu_roy:
|
||||
readoutPriority: baseline
|
||||
description: "Refocusing mirror rotation y"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-RMU:ROY"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
rmu_roz:
|
||||
readoutPriority: baseline
|
||||
description: "Refocusing mirror rotation z"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-RMU:ROZ"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
rmu_try:
|
||||
readoutPriority: baseline
|
||||
description: "Refocusing mirror translation y"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-RMU:TRY"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
rmu_trz:
|
||||
readoutPriority: baseline
|
||||
description: "Refocusing mirror translation z"
|
||||
deviceClass: ophyd_devices.EpicsMotor
|
||||
deviceConfig:
|
||||
prefix: "X07MA-OP-RMU:TRZ"
|
||||
onFailure: retry
|
||||
enabled: true
|
||||
readOnly: false
|
||||
softwareTrigger: false
|
||||
deviceTags:
|
||||
- optics
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
from ophyd import Component as Cpt
|
||||
from ophyd import EpicsSignal
|
||||
from ophyd_devices.devices.simple_positioner import PSISimplePositionerBase
|
||||
from ophyd_devices.utils.psi_device_base_utils import TransitionStatus
|
||||
|
||||
|
||||
class MirrorPseudo(PSISimplePositionerBase):
|
||||
user_readback = Cpt(EpicsSignal, "R")
|
||||
user_setpoint = Cpt(EpicsSignal, "S")
|
||||
motor_done_move = Cpt(EpicsSignal, ":BUSY")
|
||||
|
||||
def _setup_move(self, position):
|
||||
"""Move and do not wait until motion is complete (asynchronous)"""
|
||||
|
||||
def _done_cb(status, *args, **kwargs):
|
||||
self._done_moving(success=status.success)
|
||||
self._move_completion_status = None
|
||||
|
||||
self._move_completion_status = TransitionStatus(self.motor_done_move, transitions=[1, 0])
|
||||
self.user_setpoint.put(position, wait=False)
|
||||
|
||||
self.cancel_on_stop(self._move_completion_status)
|
||||
self._move_completion_status.add_callback(_done_cb)
|
||||
Reference in New Issue
Block a user