Donnelly et al.1 report a technique for resolving 3D configurations of electron spins (magnetic moments) in materials. a, The authors demonstrate their technique on a magnetic gadolinium cobalt cylinder. They direct a beam of polarized X-rays at a particular spot on the cylinder, using an optical device that acts like a lens. The X-rays are diffracted from the cylinder, producing a diffraction pattern — the colours indicate the intensity of X-rays, from black (low) to dark red (high). By scanning the beam across the cylinder and gradually rotating the cylinder (black arrow), the authors collect a series of diffraction patterns. They then tilt the cylinder 30° (green arrow) and repeat the observations, allowing all three dimensions of magnetization to be accessed. b, Donnelly and colleagues apply sophisticated algorithms to the diffraction patterns to reconstruct images of the cylinder's magnetization. An example image is shown in which each arrow represents an electron's spin and the colours indicate the direction of magnetization from downwards (blue) to upwards (brown). Diffraction pattern in a, and b, adapted from Fig. 1a and Extended Data Fig. 3b in ref. 1, respectively.