-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
3D map plotting #4591
3D map plotting #4591
Conversation
Maybe this would be better as a submodule in |
This is super cool 🌞 |
😢 readthedocs doesn't support a headless display, so I don't think pyvista examples will run on RTD (readthedocs/readthedocs.org#1951 (comment)) |
Given this, what about skipping the example just so people know it's possible? |
Yep, that's what I was planning. Could also possibly embed a .gif or a .png with the output run locally. |
a35bd53
to
e8dc7e7
Compare
It is technically possible to compile VTK in headless mode so it doesn't need an X server... |
Another (easier idea) is maybe to spin this up in the conf.py: https://pypi.org/project/xvfbwrapper/ |
There is supposed to be a conda-forge vtk variant which is compiled with osmesa (off screen mesa GL), but it seems to have been disabled for the newest builds (despite me seemingly being able to use it with a rc of vtk 9.0) so it's possible there is a decent solution to this not that far away. |
Hmm, I gave this a go, but VTK doesn't seem to be detecting/using the xvfb wrapper and is just spinning up it's own window for me locally. |
I'm wondering about spinning this off into a separate package, so I can more rapidly develop and test it without putting it all in what would be a mega PR. I think there's enough things different (needing pyvista/vtk installed, and really need a way to do image comparison tests with pyvista, which is possible, but I think worth trialing elsewhere first) to warrant this. |
This is a very very rough draft of code to enable 3D plots to be made with
Map
. This works by:HeliocentricInertial
coordinates (an arbitrary, but fixed choice of coordinate frame).pyvista
(a python interface to VTK) mesh from these mesh coordinatespyvista
This is super useful when combining visualisation of multiple objects (e.g. adding magnetic field lines, or adding a LASCO map and an AIA map as in #3997 (comment))
If you checkout this branch and run
test.py
hopefully you should get something like:All feedback welcome!