Magpylib is a Python package for calculating 3D static magnetic fields of magnets, line currents and other sources. The computation is based on analytical expressions and therefore extremely fast. A user friendly geometry interface enables convenient relative positioning between sources and observers.
Python3.7+, Numpy, Scipy, Matplotlib, Plotly
Please check out our documentation for installation, examples and detailed information!
Magpylib is on PyPI and conda-forge. Install using pip (pip install magpylib
) or conda (conda install magpylib
) package managers.