A program to decompose the magnetic field of a dipole magnet into harmonics.
Dipole (B), Quadrupole (G), Sextupole (S) and Octupole (O) harmonics are presented.
Using a magnetic field map, particle tracking searches a reference orbit for decomposition. Equations of motion are solved via the Runge-Kutta numerical algorithm.