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

Difference between EpicsMotor from other positioners #1227

Open
prjemian opened this issue Dec 13, 2024 · 2 comments
Open

Difference between EpicsMotor from other positioners #1227

prjemian opened this issue Dec 13, 2024 · 2 comments
Labels

Comments

@prjemian
Copy link
Contributor

The EpicsMotor class has a notable inconsistency from other positioners. The names for readback and setpoint components differ from all other positioners.

# position
user_readback = Cpt(EpicsSignalRO, ".RBV", kind="hinted", auto_monitor=True)
user_setpoint = Cpt(EpicsSignal, ".VAL", limits=True, auto_monitor=True)

setpoint = Cpt(EpicsSignal, "", kind="hinted")

ophyd/ophyd/pseudopos.py

Lines 51 to 52 in 1e5f037

readback = Cpt(AttributeSignal, attr="position", kind=Kind.hinted)
setpoint = Cpt(AttributeSignal, attr="target", kind=Kind.normal)

setpoint = pvproperty(value=0.0, precision=1)
readback = pvproperty(value=0.0, read_only=True, precision=1)

I'm sure the user_ prefix used in EpicsMotor is inherited from the EPICS motor record which has raw, dial, and user coordinates. But NO bluesky users (maybe there is a rare exception) use motors with dial coordinates.

Not only is this confusing for newer Bluesky users, this leads to special-case programming when handling positioners v. motors.

Is there a way to resolve this inconsistency that remains backwards-compatible? Adding a synonym?

 # position 
    readback = user_readback = Cpt(EpicsSignalRO, ".RBV", kind="hinted", auto_monitor=True) 
    setpoint = user_setpoint = Cpt(EpicsSignal, ".VAL", limits=True, auto_monitor=True) 
@tacaswell
Copy link
Contributor

I think adding the alias is a good idea, but would probably have to do it with a property to avoid the Componet getting picked up twice.

@prjemian
Copy link
Contributor Author

I'll try that locally before initiating a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants