-
Notifications
You must be signed in to change notification settings - Fork 9
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
2M & 4M undulators #1002
2M & 4M undulators #1002
Conversation
Random and unrelated EPICS CA connection timeout problems in testing. |
On 3rd (or 4th?) re-run of all tests, they passed. Might adjust master timeout if failures continue: apstools/apstools/tests/__init__.py Line 12 in ded5219
Applied here: apstools/apstools/tests/__init__.py Lines 27 to 32 in ded5219
|
Testing is more stable with the longer master timeout. 3s was borderline to encounter EPICS CA connection timeouts. |
@MDecarabas Now, this is ready for review. |
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.
Small question about if we can just reuse the 2m undulator class for the 4m as well. Might have missed something but it does not look like any of the code is different
apstools/devices/aps_undulator.py
Outdated
class Undulator2M(ID_Spectrum_Mixin, ID_Controls_Mixin, ID_Misc_Mixin, Device): | ||
"""APS 2M Undulator. | ||
|
||
.. index:: | ||
Ophyd Device; PlanarUndulator | ||
Ophyd Device; Undulator2M | ||
|
||
APS Use: 1ID, downstream. | ||
|
||
EXAMPLE:: | ||
|
||
undulator = Undulator2M("S01ID:DSID:", name="undulator") | ||
""" | ||
|
||
# PVs not found | ||
busy = None | ||
magnet = None | ||
version_plc = None | ||
version_hpmu = None | ||
|
||
done = Component(EpicsSignalRO, "BusyM.VAL", kind="omitted") | ||
done_value = 0 | ||
|
||
|
||
class Undulator4M(ID_Spectrum_Mixin, ID_Controls_Mixin, ID_Misc_Mixin, Device): | ||
"""APS 4M Undulator. | ||
|
||
.. index:: | ||
Ophyd Device; PlanarUndulator | ||
Ophyd Device; Undulator4M | ||
|
||
APS Use: 11ID, downstream & upstream. | ||
|
||
EXAMPLE:: | ||
|
||
undulator = Undulator4M("S11ID:DSID:", name="undulator") | ||
""" | ||
|
||
# PVs not found | ||
busy = None | ||
magnet = None | ||
version_plc = None |
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.
Isn't this the same content with just a different class name?
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.
Made 4M as a subclass of 2M
Thought about this, too. Similar to the |
Are you saying as the class will grow you expect to see differences? |
I'm saying that as the class is used at the beam lines, we might discover signals needed by one but not the others. |
NOTE: 2M & 4M -- No PV for Done Moving, rely on Busy and set
done_value=0
instead.@cooleyv
@cpchuang