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

GUI: option to display a facility graph #166

Open
tangkong opened this issue Oct 5, 2022 · 4 comments
Open

GUI: option to display a facility graph #166

tangkong opened this issue Oct 5, 2022 · 4 comments

Comments

@tangkong
Copy link
Contributor

tangkong commented Oct 5, 2022

Current Behavior

Currently the only view of the facility is through a singular BeamPath, which is workable if you're not considering other beamlines

Possible Solution

A button that displays an image of the facility, based off the LightController.graph. Could condense nodes between branching nodes, with an option to expand a branch by clicking on it. It would be a good place to also show the beam path through the facility from beginning to end.

Context

Currently there is no way to see the facility layout within lightpath itself. We have been referring users to an facility map, which may be inconvenient. With different endstations possibly changing their respective happi databases and configurations, it would be good to give people the ability to check what their changes have done.

Throughout development / testing, I've used pygraphviz to create some facility graphs which were honestly... ugly.
Screen Shot 2022-07-27 at 3 50 03 PM
pygraphviz tries to keep each depth at the same level, which does not at all work for the facility graph.

This was something that was spitballed early on during the lightpath rework, but tabled.

Your Environment

lightpath master

@klauer
Copy link
Contributor

klauer commented Oct 5, 2022

I think a manual layout will be not too difficult though and provide a better output in the end. It'll be extra work, of course.

(Though I do wonder, for the graphviz stuff, did you use dot and specify L-to-R layouts (via rankdir)?)

@tangkong
Copy link
Contributor Author

tangkong commented Oct 5, 2022

I didn't try a L-to-R layout, but that image did use dot (which worked the best of all the other options I tried).

I briefly looked at rolling my own layout, but after seeing things like spring constants for node spacing, I decided to do more impactful lightpath work

@ZLLentz
Copy link
Member

ZLLentz commented Oct 5, 2022

it might be possible to use a simple grid layout with precisely-placed widgets to draw a fully-functional branching lightpath

@klauer
Copy link
Contributor

klauer commented Oct 6, 2022

Grid layout could be quick and might look pretty good - I like the idea

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

No branches or pull requests

3 participants