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

Catch errors in HypnotoadGui.run() #24

Merged
merged 7 commits into from
Apr 27, 2020
Merged

Catch errors in HypnotoadGui.run() #24

merged 7 commits into from
Apr 27, 2020

Conversation

johnomotani
Copy link
Collaborator

@johnomotani johnomotani commented Apr 26, 2020

Allows settings to be changed before trying Run again if there is an error.

Also a couple of very small tidy up changes:

  • print options from TokamakEquilibrium.__init__() instead of TokamakEquilibrium.makeRegions()

  • add setting to choose the displacement of grid points that should be at the X-point

  • Updated doc/whats-new.md with a summary of the changes

Previously was called in TokamakEquilibrium.makeRegions() which had the
same effect as makeRegions is called from __init__, but it's clearer to
call directly from __init__.
Adds xpoint_offset option to control how far points that should be at
the X-point are shifted to avoid the null.
Some settings are needed in TokamakEquilibrium.__init(), so need to
create a new object if they are changed before run().
Allow settings to be adjusted to retry, instead of hypnotoad-gui
closing on any error.
@johnomotani johnomotani added the enhancement New feature or request label Apr 26, 2020
@johnomotani johnomotani mentioned this pull request Apr 26, 2020
1 task
hypnotoad/gui/gui.py Outdated Show resolved Hide resolved
@ZedThree
Copy link
Member

Future wishlist: raise OptionError with name of option as an attribute so we can highlight bad options?

@ZedThree ZedThree merged commit 9740ff1 into master Apr 27, 2020
@ZedThree ZedThree deleted the allow-rerun branch April 27, 2020 12:08
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

Successfully merging this pull request may close these issues.

2 participants