Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an "Equilibrium" tab, moves previous interface into a "Mesh" tab
This is a bit rough, there's some copy-pasted bits from other parts of the code. I think we'd want to do a bit of refactoring of things before this goes in.
The
Equilibrium
tab has some controls for changing the differentpsi
limits, and instantly changes the corresponding values in the options table in theMesh
tab.The normalised and unnormalised values are hard-linked: changing one instantly changes the other correctly, both are stored in the GUI options table/dict.
There are controls to separate the inner SOL, PF and lower/upper PF. If not separated, they take their values from the "parent" control (so the inner SOL takes its value from SOL).
I've split
tokamak.read_geqdsk
into two, one halfjust_read_geqdsk
returns a dict with the read info in, and a couple of calculated values, andread_geqdsk
is just a thin wrapper around this andTokamakEquilibrium
, just the change didn't affect anything else. Likely it's best to just dropread_geqdsk
in favour ofjust_read_geqdsk
I've not changed the existing interface really, outside of moving it into a tab. This means it's possible to load different geqdsk files in the two tabs, which would be silly. Probably best thing is to remove the geqdsk reader from the mesh tab.
Enabling all the psi limits* makes the plot a bit messy. This could be cleaned up if we moved some logic out of
Equilibrium
. We probably don't want to do wall intersections here? But plotting the private flux limits in the correct place is presumably possible.Are there other options that make sense to go here?
How expensive would it be to try and draw outlines of the different regions Hypnotoad will eventually mesh?
* Do we have a good name for the category of thing that
psi_core
,psi_sol
are? In different places I've called them "limits" or "contours".