Shimming is the process of fine-tuning a magnetic field to make it as uniform as possible, most commonly inside an MRI or spectroscopy scanner. Every MRI machine generates a powerful magnetic field, but that field is never perfectly even on its own. Tiny variations, sometimes caused by the magnet’s own manufacturing tolerances and sometimes by the patient’s body or nearby building materials, distort the field enough to blur images and corrupt data. Shimming corrects those distortions by layering a secondary, compensating field on top of the main one.
Why a Uniform Field Matters
MRI works by detecting signals from hydrogen atoms in your body as they respond to a magnetic field. Those signals carry location and chemical information, but only if the field strength is consistent across the entire area being scanned. When the field varies from point to point, the scanner misreads where signals are coming from, and the resulting images suffer.
For routine clinical imaging, the field needs to be uniform to within 0.5 parts per million (ppm) across a roughly 35-centimeter sphere inside the scanner bore. For advanced techniques like echo-planar imaging or spectroscopy, that tolerance drops to 0.1 ppm or tighter. To put that in perspective, the main field of a typical clinical MRI is 1.5 or 3 tesla, so even a fraction-of-a-ppm variation represents a measurable error that the scanner must correct before useful data can be collected.
Passive Shimming: Built Into the Hardware
The first layer of correction happens during installation. Engineers place small pieces of ferromagnetic metal (usually steel) at calculated positions inside the magnet bore. Each piece acts like a tiny magnetic source that nudges the local field in a specific direction. By choosing the right locations and thicknesses for dozens or hundreds of these shim pieces, the team can cancel out most of the field imperfections baked into the magnet itself.
Passive shimming also compensates for the scanner’s physical environment. Structural steel in a building’s floors, walls, or reinforcing bars can warp the magnetic field from outside the room. Site planners try to minimize nearby steel, but passive shim pieces can offset whatever influence remains. If a second MRI magnet operates in an adjacent room, adjusting or powering down that magnet may require reshimming the first one, since the surrounding magnetic landscape has changed.
Active Shimming: Electrical Adjustments for Each Scan
Passive shim pieces handle the broad, static imperfections, but every patient introduces new distortions. Air-filled sinuses, the skull’s curved bone, and the boundary between lungs and liver all create local magnetic field warps because different tissues interact with the field differently. Active shimming uses a set of dedicated electromagnetic coils, positioned inside the bore alongside the imaging coils, that carry adjustable electrical currents. By dialing those currents up or down, the scanner generates a correction field tailored to each patient and each body region.
Active shim coils are designed to be orthogonal to one another, meaning each coil corrects one specific pattern of field distortion without interfering with the others. A typical system includes coils labeled X, Y, Z, and Z², each targeting a different spatial component of the inhomogeneity. Higher-order shim coils add finer corrections for more complex distortion patterns, which becomes especially important at ultra-high field strengths like 7 tesla.
How Auto-Shimming Works During a Scan
Modern scanners handle active shimming automatically before each imaging sequence. The process starts with a quick “field map” acquisition: the scanner collects a low-resolution 3D snapshot that reveals exactly how the magnetic field varies across the region of interest. On a 7-tesla research scanner, acquiring this field map takes about 43 seconds.
Software then analyzes the field map, often using a brain-extraction algorithm (for neuroimaging) to isolate the tissue of interest from surrounding anatomy. It calculates which shim coil currents need to change and by how much, using a least-squares optimization that minimizes the remaining field variation. The updated currents are applied, and the scanner is ready to image. The entire automated procedure typically finishes within two minutes, adding only a brief pause to the patient’s time in the scanner.
What Happens When Shimming Is Poor
The consequences of inadequate shimming are most visible in magnetic resonance spectroscopy (MRS), a technique that identifies specific chemicals in living tissue based on their unique signal frequencies. Each chemical produces a narrow peak on a spectrum, and the width of that peak depends directly on how uniform the field is. Poor shimming broadens the peaks until they overlap and become impossible to tell apart.
In one documented example, the full width at half maximum (a standard measure of peak sharpness) reached 29.3 Hz, roughly double the 15 Hz threshold considered acceptable. At that level, key brain metabolites like choline and creatine could not be distinguished from each other, making the entire scan clinically useless. Improving the shimming algorithm in the same study brought the water peak linewidth from 10.5 Hz down to 6.1 Hz, a change that significantly boosted both signal clarity and the accuracy of chemical measurements.
For standard MRI imaging, poor shimming causes subtler but still problematic artifacts. Fat suppression techniques, which rely on precise frequency targeting, fail when the field drifts. Geometric distortions creep into echo-planar sequences, warping the apparent shape of brain structures. Signal can drop out entirely near air-tissue boundaries like the sinuses if the local field deviation overwhelms the scanner’s correction capacity.
Shimming at Different Field Strengths
Higher field strengths produce stronger signals and sharper images in theory, but they also amplify every source of field inhomogeneity. A tissue boundary that creates a barely noticeable distortion at 1.5 tesla becomes a significant artifact at 3 tesla and a major challenge at 7 tesla. This is why ultra-high-field systems rely on higher-order shim coils and more sophisticated automated shimming routines. The payoff is substantial: when shimming is done well at high field, the gains in image quality and spectral resolution far exceed what lower-field systems can achieve, even with perfect shimming.
For clinical scanners operating at 1.5 or 3 tesla, the built-in auto-shim routines are generally sufficient for most imaging protocols. Spectroscopy at any field strength demands more careful shimming, and technologists may run the shimming procedure multiple times or manually fine-tune the result before collecting data.

