An example particle accelerator includes the following: a resonant cavity in which particles are accelerated, where the resonant cavity has a background magnetic field having a first shape, and where the background magnetic field is at least 6 Tesla; and an extraction channel for receiving particles output from the resonant cavity. The extraction channel comprises a series of focusing regions to focus a beam of received particles. At least one of the focusing regions is a focusing element configured to alter a shape of the background magnetic field to a second shape that is substantially opposite to the first shape in the presence of a magnetic field gradient resulting from reduction of the at least 6 Tesla background magnetic field from the resonant cavity to the extraction channel.本發明揭示一種實例性粒子加速器,其包含以下各項:一諧振腔,在該諧振腔中使粒子加速,其中該諧振腔具有包含一第一形狀之一背景磁場,且其中該背景磁場係至少6特斯拉(Tesla);及一提取通道,其用於接收自該諧振腔輸出之粒子。該提取通道包括用以聚焦一所接收粒子束之一系列聚焦區域。該等聚焦區域中之至少一者係經組態以在存在由該至少6特斯拉背景磁場自該諧振腔至該提取通道之減少產生之一磁場梯度之情況下將該背景磁場之一形狀更改為實質上與該第一形狀相反之一第二形狀的一聚焦元件。