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

XIA filter support needs to expand #462

Closed
prjemian opened this issue Nov 18, 2020 · 3 comments · Fixed by #558
Closed

XIA filter support needs to expand #462

prjemian opened this issue Nov 18, 2020 · 3 comments · Fixed by #558
Milestone

Comments

@prjemian
Copy link
Contributor

prjemian commented Nov 18, 2020

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.

6idb1 filters

See these EPICS database files:

@prjemian prjemian added this to the 1.3.9 milestone Nov 18, 2020
@prjemian
Copy link
Contributor Author

optics filter screen

@prjemian prjemian modified the milestones: 1.3.9, 1.3.10 Nov 19, 2020
@prjemian prjemian modified the milestones: 1.4.0, 1.4.1 Jan 13, 2021
@prjemian prjemian modified the milestones: 1.4.1, 1.4.2 Jan 19, 2021
@prjemian prjemian modified the milestones: 1.5.0, 1.5.1 Mar 22, 2021
@prjemian prjemian modified the milestones: 1.5.1, 1.5.2 Jul 8, 2021
@prjemian prjemian modified the milestones: 1.5.2, 1.5.3 Sep 24, 2021
@prjemian
Copy link
Contributor Author

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 DualPf4FilterBox(). Don't change that support while supplying the new support. Here's an example:

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

prjemian added a commit that referenced this issue Oct 13, 2021
prjemian added a commit that referenced this issue Oct 13, 2021
prjemian added a commit that referenced this issue Oct 13, 2021
@prjemian
Copy link
Contributor Author

Needs testing at APS

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

Successfully merging a pull request may close this issue.

1 participant