-
Notifications
You must be signed in to change notification settings - Fork 10
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
[WIP] Plot poloidal plane with contourf #34
Conversation
Hello @TomNicholas! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-08-19 15:22:39 UTC |
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
===========================================
- Coverage 48.76% 33.91% -14.85%
===========================================
Files 8 9 +1
Lines 404 628 +224
Branches 79 108 +29
===========================================
+ Hits 197 213 +16
- Misses 185 393 +208
Partials 22 22
Continue to review full report at Codecov.
|
Adds accessor methods to plot poloidal slices using the old
griddata
approach. Should be general enough to work for any tokamak geometry.Adds
da.bout.contourf()
, which gives:Optionally plots both separatrices, and optionally marks the positions of the limiters with hatched lines to indicate solid surfaces.
Also adds
da.bout.regions()
, which I created for debugging purposes, but it helps understand how the griddata-style plotting approach works:To get this to work for any geometry I had to extend the old griddata and fix a few bugs with it, but the result is that it can now handle both X-points, both separatrices, and knows how big the limiters should be, as you can see in this s-alpha plot:
It would be good if someone could try it with (or just send me) a single-null grid file to test against, as I've only tried it with these two examples.
One problem I'm still having is getting the aspect ratio of the plot correct automatically. If I force it with
plt.set_aspect()
then I end up with loads of whitespace which I can't seem to get rid of.(@ZedThree This PR should be based off of the grids PR, branch feature/grids on my forked version of xBOUT, but I couldn't quite work out how to do that.)