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

ScalerCH.select_channels() accepts channel named "" #691

Closed
prjemian opened this issue Feb 27, 2019 · 1 comment
Closed

ScalerCH.select_channels() accepts channel named "" #691

prjemian opened this issue Feb 27, 2019 · 1 comment
Assignees
Labels

Comments

@prjemian
Copy link
Contributor

Gets a bit complicated here. Ultimately, though, ophyd.scaler.ScalerCH.select_channels([""]) is an allowed possibility and that should not be allowed.

ScalerCH differs from EpicsSignal by exposing (and using) the EPICS scaler channel names to ophyd users.

In ophyd.scaler.ScalerCH.match_names(), the text names configured in the EPICS scaler PV .NMn fields are copied to the local scaler channel name. This is great since we can then focus on describing/reading/recording only the named channels in EPICS, assuming that unnamed channels are not in use and otherwise not worthy of our attention.

In select_channels(), the name_map thus will have a key that corresponds to the last unnamed channel. Since this channel is in the name_map, it is also a permissible selection candidate for the chan_names Iterable. The dictionary expression, nicely compact, is too tricky in this case and misses this typical scenario.

@prjemian
Copy link
Contributor Author

Remove this line

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

1 participant