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

User interface #7

Open
4 of 14 tasks
johnomotani opened this issue Apr 15, 2020 · 7 comments
Open
4 of 14 tasks

User interface #7

johnomotani opened this issue Apr 15, 2020 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@johnomotani
Copy link
Collaborator

johnomotani commented Apr 15, 2020

It would be nice to have an interface (maybe even graphical?) that makes it easier to prototype/experiment when creating an input file than just passing input file names to a command line script like hypnotoad2_geqdsk experimental_equilib.g my_grid.yml.

There are already plotting functions which could be used to provide output.

Possible features:

  • The aim of the interface would be to generate a final input file, so that whatever grid is generated can be recreated directly by running from the command line.
  • For prototyping, it would be nice to have a second set of options (for example reduced nx and finecontour_Nfine, and possibly some looser atols) which would make iterating on the original grid quicker.
  • Import for example TokamakEquilibrium.default_options and provide some sort of browser where the user could see the current and default settings for all options, see help/description, and modify the values. Done in Add basic experimental GUI #17
  • Create and show a prototype grid, using the current prototype options (not sure if it's useful to have an option to generate check the Mesh.geometry() output for the prototype?).
  • Save a .yml file with the final settings, and generate a grid-file from it. Done in Add basic experimental GUI #17.
    • possibly browse the created grid, metric coefficients, etc?
    • integrate with xBOUT to help plotting the final results?
  • Load an existing .yml input file, to prototype changes to it interactively. Done in Add basic experimental GUI #17.

We could probably achieve quite a bit of this quickly by providing methods/functions that could be called at the Python interactive prompt. Maybe a template Jupyter notebook containing a suggested grid-generation workflow. A hypnotoad1-like gui interface would be the nicest option... GUI added in #17 thanks to @ZedThree! Some extras for the gui that would be nice to have:

  • hide options that aren't used (e.g. a bunch of nonorthogonal settings if orthogonal = True.
  • still plot psi if finding X-points and O-points fails - I tried this for one geqdsk file (not sure what was in it, might have been TORPEX!) and hypnotoad-gui exited; would be nice to have an error message and a plot of psi to see what went wrong
  • plot the wall contour (if it exists). Done in Plot wall in gui #23.
  • Always save an input file along with the final generated grid file (although all the hypnotoad2 options should be saved to the grid file already).
  • Add undo stack
  • Keep equilibrium/mesh plots in separate tabs
@johnomotani johnomotani added this to the Release 1.0 milestone Apr 15, 2020
@ZedThree
Copy link
Member

A GUI is a good idea. I can mock something up with QtCreator if you like

@johnomotani johnomotani added the enhancement New feature or request label Apr 16, 2020
@johnomotani
Copy link
Collaborator Author

@ZedThree that would be great if you have time. I've floated the possibility with @bendudson of trying for an RSE project at Culham to work on some of this stuff...

Before actually starting on the GUI, I think we need to define better (and possibly provide methods/functions for) the workflow for creating a new grid. Once we've done that it should be clearer what exactly the GUI can/should do. I don't have a timeline for that - not sure if/when I'll be generating new grid files myself, but maybe you or @bendudson are doing that at the moment anyway?

@ZedThree
Copy link
Member

I'm about halfway to getting a vaguely usable mockup that essentially just follows the geqdsk example. I currently don't have much time to devote to this, so if getting an RSE from Culham would be great.

It would be super lovely to incorporate FreeGS into this as well, to be able to go from specify coil positions and currents, etc., through to grid generation in a single tool. I can think of at least one project where that might be handy...

@bendudson
Copy link
Contributor

I don't plan on making lots of grids in the near future, so it's really a nice to have for me but not essential. Working out the use case would be good, and making key parts of it faster: A GUI would be nice if a user could get quick feedback on any changes, so the grid generation needs to be almost instant (ideally).

@ZedThree
Copy link
Member

John's suggestion above of using a reduced resolution to do prototyping might be useful there. Getting parallelisation in is also likely essentially

@bendudson
Copy link
Contributor

bendudson commented Apr 16, 2020

Thanks @ZedThree! That would be very cool... making the process of importing or generating equilibria, adjusting them, and then generating grids smooth would be good. New grids are not needed all that often, but a basic task which should really just work.

Edit: By basic I mean fundamental, not easy... because it definitely isn't!

@ZedThree
Copy link
Member

hypnotoad2_screenshot

Currently doesn't even quite do the bare minimum, but you get the gist. By the end of tomorrow it should be a little bit more functional.

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

No branches or pull requests

3 participants