Python 3 implementation of the Graduated Cylindrical Shell model (GCS, Thernisien, 2011).
Based on the existing IDL implementation in SolarSoft
(cmecloud.pro, shellskeleton.pro).
The code in gcs/geometry.py provides the basic implementation of the GCS geometry, while the Qt-based GUI in
gcs/gui.py uses SunPy and Matplotlib to plot the model on top of coronagraph images provided by
Helioviewer.org.
A more detailed description of the GCS model, this Python implementation and its validation is given in this excerpt from my PhD thesis.
This code is still in a quite early stage. It has been compared with the original IDL/SolarSoft version to verify the results, but only for a few case studies. Please be careful when using it and compare to IDL when in doubt. If you find a bug or have suggestions for improvement, please notify me with a GitHub issue or Pull Request.
If you use this code in a publication, please cite it using the DOI generated by Zenodo. I would also appreciate it if you drop me an email and tell me what you used it for :)
Python 3.7 or later is required.
# install GCS
pip3 install git+https://github.com/johan12345/gcs_python.git
# run GCS GUI, providing a date/time and the spacecraft to use
gcs_gui "2020-04-15 06:00" STA SOHO
Information on the available command line arguments for the GUI is given when you run the help option:
gcs_gui -hSimply install GCS (as seen above) and use
import gcs.geometryto import the code from the GCS package. You can find some examples what you can do with it in the files
sample.py and sample_sunpy.py.
First, clone the git repository:
git@github.com:johan12345/gcs_python.gitIt is recommended to use a virtual environment so that the
Python packages you install as dependencies of GCS don't interfere with your globally installed packages.
On some Linux distributions, the additional python3-venv package needs to be installed for this to work.
python3 -m venv env
. env/bin/activateThen, install the dependencies:
# install requirements
python3 -m pip install --upgrade pip setuptools
pip3 install -r requirements.txtand test the GUI using
python -m gcs.gui "2020-04-15 06:00" STA SOHO