PROBLEM TO BE SOLVED: To provide a method that is capable of taking into account hardware limitations without a significant increase in a computational effort to determine a target magnetic field distribution during optimization when determining the target magnetic field distribution.SOLUTION: A method for homogenizing a static magnetic field with a distribution B0(r) in an active volume of a magnetic resonance device having a number N of shim coils comprises the steps of: (a) mapping the magnetic field distribution B0(r); (b) defining a target magnetic field distribution B0T(r); and (c) generating the target magnetic field distribution B0T(r) in the active volume by setting shim currents. In the step (b), in order to optimize a numerical quality criterion for the target magnetic field distribution B0T(r), an optimization procedure is used, resulting in supplying values for a number N of shim currents, and a spatial weighting function is used in the optimization procedure, and the optimization procedure further uses a filter method in which a norm of the shim currents is influenced by a filter coefficient.
展开▼