This package contains basic processing tools for manipulating and visualising Solar and stellar magnetograms. These tools were originally developed during my Ph.D. at the University of Southern Queensland. Please cite
Evensberget et al. (2021)
or
Evensberget et al. (2022)
and mention the starwinds-magnetogram package if you use these tools in your research.
- Convert magnetogram coefficients from ZDI format to Stanford PFSS format suitable for ingestion into the SWMF;
- Plotting of ZDI and PFSS magnetograms;
- Magnetogram generation from e.g. noise and manipulation;
- Free rotation of a magnetogram;
- Some routines related to the Parker wind solution and Alfvén surface.
Once the repository is cloned, install using
pip install .As usual, the --user flag is required when the user cannot install in the root such as on an HPC; this will put the entry points in ~/.local/bin, which must then be on the $PATH.
- Magnetogram conversion shell commands
- Magnetogram manipulation notebook
- Publication ready plot of the radial field
This section may be ignored unless you want to make changes to starwinds-magnetogram.
To make the installation editable use the --editable flag:
pip install --editable .There is a conda environment file environment.yml in the project folder; it may be used to create a conda environment in the regular way.
To run the tests locally and generate a test summary type
cd tests
pytest -v --tb=nothere should be no failures in the code and tests. Test output is placed in the tests/artifacts folder.
The --disable-warnings flag can be used to hide any warnings (should be unnecessary).
To debug through the entry points (e.g. the sw-plot-magnetogram command), this should work:
python -m pdb $(\which sw-plot-magnetogram)The backslash character before which is present since the which command may be aliased to type -all on MacOS.