
Overview This Python program enables interactive exploration of the magnetic fields produced by rings and spherical clusters of permanent magnets. It provides a Graphical User Interface (GUI) for investigating magnet geometries and field homogeneity. The physical background is described in the article: Analytic approach to creating homogeneous fields with finite-size magnets Ingo Rehberg and Peter Blümler Phys. Rev. Applied 23, 064029 (2025), https://doi.org/10.1103/9nnk-jytn preprint: arXiv:2502.18262 Discretized Halbach spheres: Icosahedral symmetry for optimal field homogeneity Ingo Rehberg and Peter Blümler Phys. Rev. Applied 25, 054009 – Published 4 May, 2026 Version History v2.1.1 Adds additional analysis of the homogeneity of the center field, and a Fibonacci sphere cluster. v2.1.0 Adds spherical Halbach arrangements of the magnets, and allows to add clusters of individual design. v2.0.0 Adds magnets in the form of cuboids and spheres to the point- and line dipoles. v1.1.0 Adds the functionality to export STL files for 3D printing custom magnet holders. v1.0.1 This version includes a configuration inspired by: Sumit Tewari, Thomas O'Reilly, Andrew WebbImproving the Field Homogeneity of Fixed- and Variable-Diameter Discrete Halbach Magnet Arrays for MRI via Optimization of the Angular Magnetization DistributionJournal of Magnetic Resonance, Volume 324, 2021, 106923https://doi.org/10.1016/j.jmr.2021.106923
