-
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
XIA filter support needs to expand #462
Comments
The existing support is for a dual PF4 configuration. All Components (2 banks and common) are defined in the class. To improve modularity, might be useful to build a configuration from parts: class Pf4FilterCommon(Device):
transmission = Component(EpicsSignalRO, "trans", kind="hinted")
inverse_transmission = Component(EpicsSignalRO, "invTrans", kind="normal")
thickness_Al_mm = Component(EpicsSignalRO, "filterAl", kind="config")
thickness_Ti_mm = Component(EpicsSignalRO, "filterTi", kind="config")
thickness_glass_mm = Component(EpicsSignalRO, "filterGlass", kind="config")
energy_keV_local = Component(EpicsSignal, "E:local", kind="config")
energy_keV_mono = Component(EpicsSignal, "displayEnergy", kind="config")
mode = Component(EpicsSignal, "useMono", string=True, kind="config")
class Pf4FilterBank(Device):
fPos = FormattedComponent(EpicsSignal, "{prefix}fPos{_bank}", kind="config")
bank = FormattedComponent(EpicsSignalRO, "{prefix}bank{_bank}", kind="config")
bitFlag = FormattedComponent(EpicsSignalRO, "{prefix}bitFlag{_bank}", kind="config")
transmission = FormattedComponent(EpicsSignalRO, "{prefix}trans{_bank}", kind="config")
def __init__(self, prefix, bank=None, **kwargs):
self._bank= bank
super().__init__(prefix, **kwargs) This would produce a device with a hierarchical structure, different than provided by the existing class MyTriplePf4(Pf4FilterCommon):
A = Component(Pf4FilterBank, "", bank="A")
B = Component(Pf4FilterBank, "", bank="B")
C = Component(Pf4FilterBank, "", bank="C")
triple_pf4 = MyTriplePf4(ioc_prefix, name="triple_pf4")
# triple_pf4.transmission transmission through all filters
# triple_pf4.B.transmission transmission through bank B filters |
Needs testing at APS |
Usage at APS 6-ID-B includes three banks of the XIA filter box. The underlying support may also be different than the existing support. Need to check it.
See these EPICS database files:
pf4bank.db
pf4common.db
The text was updated successfully, but these errors were encountered: