X-rays can be generated through several methods, the most common being the use of an X-ray tube or a synchrotron. In an X-ray tube, high-energy electrons are accelerated and then suddenly decelerated upon hitting a metal target, producing X-rays. Synchrotrons use high-speed electron beams circulating in a magnetic field to emit intense X-rays.