SPEC
SPEC copied to clipboard
Integrate more python tools
I have made some changes to some python tools. Personally, I would like to integrate all functions into one class, such that it is convenient to use and portable.
In spec.py from the pythontools
branch, I have implemented/moved some plotting functions for SPEC and put them into the SPEC
class (Each function is documented).
Here is a way to use it.
from spec import SPEC
# you can also do something like '%run spec.py
test = SPEC('spec_output.sp.h5')
# plot pressure profile
plt.figure()
test.plot_pressure(normalize=False)
# plot KAM surfaces (using FourSurf)
plt.figure()
test.plot_kam_surface()
# poincare plot
test.plot_poincare()
This is just to motivate some discussions on working together with more SPEC python functions.