Correction to: Nature Physics https://doi.org/10.1038/s41567-023-02115-2, published online 3 July 2023

In the version of the article initially published, the fourth paragraph did not include the text “A similar technique was proposed in 1976 to enhance the dose rate in pion therapy machines1. However, we are not aware of any literature that tested or implemented the proposal. Moreover, a wedge system is commonly employed for in-flight production and magnetic separation of radioactive ion beams2.” This has now been added to the HTML and PDF versions of the article, with the new references added as refs. 15 and 16.