A measured error magnetic field distribution is divided into eigen-mode components obtained by a singular decomposition and iron piece arrangements corresponding to respective modes are combined and arranged on a shim-tray. An eigen-mode to be corrected is selected in accordance with an attainable magnetic field accuracy (homogeneity) and appropriateness of arranged volume of the iron pieces. Because the adjustment can be made with the attainable magnetic field accuracy (homogeneity) being known, an erroneous adjustment can also be known, and the adjustment is automatically done during repeated adjustments. As a result, an apparatus with a high accuracy can be provided. In addition, there is an advantageous effect of being able to detect a poor magnet earlier by checking the attainable homogeneity.