Multi-spacecraft longitudinal configuration plotter
Project description
The Solar MAgnetic Connection Haus (Solar-MACH) tool is a multi-spacecraft longitudinal configuration plotter. This is the repository of the pip/conda package of Solar-MACH, called solarmach. For the corresponding streamlit repository, which is used for solar-mach.github.io, see github.com/jgieseler/Solar-MACH.
Installation
solarmach requires python >= 3.7.
It can be installed either from PyPI using:
pip install solarmach
or from conda using:
conda install -c conda-forge solarmach
Usage
from solarmach import SolarMACH, print_body_list
# optional: get list of available bodies/spacecraft
print(print_body_list().index)
# necessary options
body_list = ['STEREO-A', 'Earth', 'BepiColombo', 'PSP', 'Solar Orbiter', 'Mars']
vsw_list = [400, 400, 400, 400, 400, 400, 400] # position-sensitive solar wind speed per body in body_list
date = '2021-10-28 15:15:00'
# optional parameters
coord_sys = 'Carrington' # 'Carrington' (default) or 'Stonyhurst'
reference_long = 273 # longitude of reference (None to omit)
reference_lat = 0 # latitude of reference (None to omit)
plot_spirals = True # plot Parker spirals for each body
plot_sun_body_line = True # plot straight line between Sun and body
long_offset = 270 # longitudinal offset for polar plot; defines where Earth's longitude is (by default 270, i.e., at "6 o'clock")
reference_vsw = 400 # define solar wind speed at reference
return_plot_object = False # figure and axis object of matplotib are returned, allowing further adjustments to the figure
transparent = False # make output figure background transparent
numbered_markers = True # plot each body with a numbered marker
filename = 'Solar-MACH_'+date.replace(' ', '_') # define filename of output figure
# initialize
sm = SolarMACH(date, body_list, vsw_list, reference_long, reference_lat, coord_sys)
# make plot
sm.plot(
plot_spirals=plot_spirals,
plot_sun_body_line=plot_sun_body_line,
reference_vsw=reference_vsw,
transparent=transparent,
numbered_markers=numbered_markers,
long_offset=long_offset,
return_plot_object=return_plot_object,
outfile=filename+'.png'
)
# obtain data as Pandas DataFrame
display(sm.coord_table)
Documentation
Full documentation for the package can be found at https://solarmach.readthedocs.io
Example Notebooks
solarmach can easily be run in a Jupyter Notebook.
Show extended example notebook (provided by SERPENTINE project)
Citation
Please cite the following paper if you use solarmach in your publication:
Gieseler, J., Dresing, N., Palmroos, C., von Forstner, J.L.F., Price, D.J., Vainio, R. et al. (2022). Solar-MACH: An open-source tool to analyze solar magnetic connection configurations. Front. Astronomy Space Sci. 9. doi:10.3389/fspas.2022.1058810
Acknowledgements
The Solar-MACH tool was originally developed at Kiel University, Germany and further discussed within the ESA Heliophysics Archives USer (HAUS) group.
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 101004159.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for solarmach-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | facce235a90d223aa1d1be11e01f34bd98f67ef498fd04da209d1a3c6a3643f6 |
|
MD5 | c577684a05829d1c977bb004e3e0c3bf |
|
BLAKE2b-256 | f0b219d34bb213b1ba7ca829d16950e3f2ac9253833ff757e60c692ac52648ec |