The invention relates to a method for shimming a main magnetic field in a
magnetic resonance device. The method comprises the steps of generating
at least one spatially selective radio frequency pulse (RF) for exciting
nuclear spin magnetization within a restricted region of the examination
volume of the magnetic resonance device, acquiring a magnetic resonance
signal (ES) that is sensitive to the homogeneity of the main magnetic
field, and applying electric currents (SZ, SX, SY) to a shim coil
arrangement of the magnetic resonance device such that the main magnetic
field is adjusted in accordance to the properties of the acquired
magnetic resonance signal (ES). In order to provide a shimming method, in
which it is avoided that the shape or size of the selected volume is
influenced by the adjustment of the magnetic field distribution generated
by the shim coils, the invention proposes that the electric currents (SZ,
SX, SY) applied to the shim coil arrangement are at least partially
switched off during the generation of the spatially selective radio
frequency pulse (RF) and switched on during the acquisition of the
magnetic resonance signal (ES).