CoilGen: Open-source MR coil layout generator
Magnetic Resonance in Medicine. 2022;88(3):1465–1479.
Read the original publication ↗CoilGen² · Magnetic coil design
Interactive design and field evaluation for MR gradient and shim coils.
Define a support surface and target field, optimize the surface current, and turn its contours into a winding. CoilGen2 brings these steps into a Python library and a desktop workbench.
Created by Philipp Amrein. Started at the University of Freiburg.

Design & inspect
Work from a current-carrying surface to conductor geometry, while tracking how each processing step changes the calculated magnetic field.
Support geometry, target field and suppression regions.
Surface-current distribution with regularization and physical objectives.
Contours, connections, return paths and conductor placement.
Fields, electrical estimates and geometric diagnostics.

Cross-sections & sweeping
Define an elliptical, rectangular or custom convex profile, then sweep it along the winding. Inspect the resulting conductor body and its placement on the support surface.

Numerical geometry demonstration. The illustrated configurations did not pass all configured geometric checks. Finite cross-section electromagnetic fields were not evaluated.
Explore the coil examples →Research foundations
Developed during doctoral research in Freiburg, CoilGen connects target-field optimization with coil-layout generation. CoilGen2 continues this work in Python with a shared numerical engine for scripts and graphical projects.
Publications & citing works →Magnetic Resonance in Medicine. 2022;88(3):1465–1479.
Read the original publication ↗Start designing
Start with a gradient or shim example, or use the Python API for a reproducible design study.