jgieseler / solarmach

Python package of the multi-spacecraft longitudinal configuration plotter Solar-MACH
https://solarmach.readthedocs.io
BSD 3-Clause "New" or "Revised" License
28 stars 6 forks source link

Plot magnetogram on solar surface in PFSS 3d plot #60

Open jgieseler opened 5 months ago

jgieseler commented 5 months ago

The PFSS extension offers a 3d plot including the Sun, like the following (e.g., run PFSS analysis in streamlit beta version):

newplot

For this figure, provide the option to plot the magnetogram (that has been downloaded for the PFSS analysis before) on the solar surface. This is already accomplished with sunkit-pyvista's example https://docs.sunpy.org/projects/sunkit-pyvista/en/stable/generated/gallery/field_lines.html:

image

But that uses a different plotting engine. So either check if it makes sense to start with the sunkit-pyvista plot and add the solarmach functionality to that, or see how the plotting is done there and apply it to the current plotly figure used in solarmach. For the first option, one important question to check is whether sunkit-pyvista can be run within streamlit.

jgieseler commented 5 months ago

But that uses a different plotting engine. So either check if it makes sense to start with the sunkit-pyvista plot and add the solarmach functionality to that, or see how the plotting is done there and apply it to the current plotly figure used in solarmach. For the first option, one important question to check is whether sunkit-pyvista can be run within streamlit.

pyvista is so far only indirectly supported by streamlit (cf. e.g. https://discuss.streamlit.io/t/stpyvista-show-pyvista-3d-visualizations-in-streamlit/31802/23), so right now it's probably not a good idea to rely on it.