1. Installation¶
1.1. Prerequisites¶
Most basic functionalities of planetMagFields require only NumPy, Matplotlib and SciPy. Other than that, the following external libraries are used for a few different functions:
2D plotting for map projections other than Hammer : Cartopy library (see more under Projections)
Potential extrapolation (optional): SHTns library for fast spherical harmonic transforms, else it falls back to SciPy.
3D visualisation: PyVista library
Writing vts files for 3D visualisation: PyEVTK library
planetMagFields can be installed in a few different ways:
1.2. Using pip¶
This is probably the easiest way. planetMagFields is available on PyPI and can be installed with
$ python3 -m pip install planetMagFields
1.3. Using setup.py¶
You can also use setup.py to install planetMagFields:
$ git clone https://github.com/AnkitBarik/planetMagFields
$ cd planetMagFields
$ python3 setup.py install --user
Or using pip:
$ git clone https://github.com/AnkitBarik/planetMagFields
$ cd planetMagFields
$ python3 -m pip install . --user
1.4. Using PYTHONPATH¶
Download the package from the GitHub repository and it to PYTHONPATH:
$ git clone https://github.com/AnkitBarik/planetMagFields
$ export PYTHONPATH=$PYTHONPATH:/path/to/planetMagFields