-
Notifications
You must be signed in to change notification settings - Fork 0
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
Individual slits as devices #88
base: main
Are you sure you want to change the base?
Conversation
Might be best we can do, given ophyd. |
Because of the problem with the |
All good, just ping me when it's good to go |
super().__init__(prefix, *args, **kwargs) | ||
|
||
# Real motors that directly control the slits | ||
hp = FCpt(EpicsMotor, "{motor_prefix}:{_h_positive_motor}", labels={"motors"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following a BCDA convention, the :
is defined by the prefix. Several suggestions follow:
hp = FCpt(EpicsMotor, "{motor_prefix}:{_h_positive_motor}", labels={"motors"}) | |
hp = FCpt(EpicsMotor, "{motor_prefix}{_h_positive_motor}", labels={"motors"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
|
||
# Real motors that directly control the slits | ||
hp = FCpt(EpicsMotor, "{motor_prefix}:{_h_positive_motor}", labels={"motors"}) | ||
hn = FCpt(EpicsMotor, "{motor_prefix}:{_h_negative_motor}", labels={"motors"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hn = FCpt(EpicsMotor, "{motor_prefix}:{_h_negative_motor}", labels={"motors"}) | |
hn = FCpt(EpicsMotor, "{motor_prefix}{_h_negative_motor}", labels={"motors"}) |
# Real motors that directly control the slits | ||
hp = FCpt(EpicsMotor, "{motor_prefix}:{_h_positive_motor}", labels={"motors"}) | ||
hn = FCpt(EpicsMotor, "{motor_prefix}:{_h_negative_motor}", labels={"motors"}) | ||
vp = FCpt(EpicsMotor, "{motor_prefix}:{_v_positive_motor}", labels={"motors"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vp = FCpt(EpicsMotor, "{motor_prefix}:{_v_positive_motor}", labels={"motors"}) | |
vp = FCpt(EpicsMotor, "{motor_prefix}{_v_positive_motor}", labels={"motors"}) |
hp = FCpt(EpicsMotor, "{motor_prefix}:{_h_positive_motor}", labels={"motors"}) | ||
hn = FCpt(EpicsMotor, "{motor_prefix}:{_h_negative_motor}", labels={"motors"}) | ||
vp = FCpt(EpicsMotor, "{motor_prefix}:{_v_positive_motor}", labels={"motors"}) | ||
vn = FCpt(EpicsMotor, "{motor_prefix}:{_v_negative_motor}", labels={"motors"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vn = FCpt(EpicsMotor, "{motor_prefix}:{_v_negative_motor}", labels={"motors"}) | |
vn = FCpt(EpicsMotor, "{motor_prefix}{_v_negative_motor}", labels={"motors"}) |
|
||
|
||
i_sl9 = IndividualSlits( | ||
prefix="8ideSoft:CR8-I2:US", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefix="8ideSoft:CR8-I2:US", | |
prefix="8ideSoft:CR8-I2:US:", |
) | ||
|
||
i_sl5 = IndividualSlits( | ||
prefix="8idiSoft:CR8-E2:US", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefix="8idiSoft:CR8-E2:US", | |
prefix="8idiSoft:CR8-E2:US:", |
vn = FCpt(EpicsMotor, "{motor_prefix}:{_v_negative_motor}", labels={"motors"}) | ||
|
||
|
||
i_sl9 = IndividualSlits( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name here does not suggest that this object contains the motors.
i_sl9 = IndividualSlits( | |
sl9_motors = IndividualSlits( |
and make the name=
match on Line 57. Same for other(s) below.
logger.info(__file__) | ||
|
||
|
||
class IndividualSlits(Device): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an MotorBundle
object that is often overlooked. It might be appropriate to switch to that here from Device
. It's docs state:
This provides better default behavior for 'hints'.
Could not test this at the beamline. Could not connect with the EPICS motor PVs. In [9]: i_sl9.hp
Out[9]: EpicsMotor(prefix='8ideSoft:CR8-I2:m12', name='i_sl9_hp', parent='i_sl9', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['user_offset', 'user_offset_dir', 'velocity', 'acceleration', 'motor_egu'])
In [10]: !caget 8ideSoft:CR8-I2:m12
Channel connect timed out: '8ideSoft:CR8-I2:m12' not found.
In [11]: !cainfo 8idiSoft:CR8-E2:US:m4
Channel connect timed out: '8idiSoft:CR8-E2:US:m4' not found. |
After a lot of testing I believe that the best way forward is just creating a separate device for the individual slits. OPHYD does not lend itself to what we are trying to do. Open to others solutions