To provide an operator with operability similar to that of conventional devices with an electromagnetic device that accurately maintains a magnetic field distribution by adjusting the magnetic field for each eigenmode obtained by singular value decomposition. The strength of a unique mode is found from a measurement magnetic field, a current for each unique mode of a negative feedback control according to the magnetic field is calculated and the current is added to each mode to obtain a current for each shim coil, and a coil current is controlled so as to reach the obtained current value. In an interface for an operator, a target for a corrected magnetic field and a magnetic field generated by a shim coil are displayed using a spherical surface harmonic function strength. Due to this configuration, a device which enables accurate magnetic field adjustment while offering operability similar to conventional devices can be provided.