-
Notifications
You must be signed in to change notification settings - Fork 26
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
Use ophyd component name kwargs when present #420
base: master
Are you sure you want to change the base?
Conversation
We've been back and forth on this one on our end, though I think our general consensus for the typhos screens has been "keep it consistent with the component (attribute) name you'd find on the IPython command-line." Separately, though, Perhaps we could consider a configurable option for this functionality if we can't come to an agreement here (@ZLLentz?) |
I think there's definitely space in
|
I'm not seeing that adding the name kwarg affects bluesky. The field names and all other resulting documents are unaffected. The field name remains as Can you clarify the source of the limitations you were expecting? |
Does setting
|
In general, I'm thinking the behavior we want is something like:
If you disagree, I think it's good to use the name field as long as it is a configurable. Ken is out today so I'll talk to him when he gets back in. |
@ZLLentz I'd been attributing the name through the component. This is probably not intended usage after all.
I was expecting that the name kwarg here would get passed on to EpicsSignalRO, but its getting overwritten by the attribute name just before the signal is constructed. Although this 'worked', its not an ordained attribute, and so this is probably the wrong approach. It seems like there's no proper place for a display name in ophyd signals. I would advocate for an addition to satisfy this need. The signal name must be a valid python identifier, so it isn't comfortable to read. My impression is @danielballan If there's no place for a human-readable name for signals, could one be (optionally) added? |
Ah! That all makes sense now. I agree that there should be some ordained way in |
Ophyd components can have human-readable
name
kwargs. Using these rather than attribute names for labeling panel rows looks nice (see screenshot). This change defaults to the attr name when thename
kwarg is absent.The
temp_celsius
component has been given aname
kwarg, and so its typhos panel displays this instead.@ihumphrey @JulReinhardt