1. A method for generating a multiple-energy X-ray pulse, the method comprising:generating a beam of electrons with an electron gun;
modulating the beam of electrons prior to injection into an accelerating structure to achieve at least a first pulse of electrons having a first specified beam current amplitude and a first specified beam current temporal profile, and a second pulse of electrons having a second specified beam current amplitude and a second specified beam current temporal profile, wherein the first pulse of electrons and the second pulse of electrons are each characterized by an electron beam pulse duration;
applying to the accelerating structure a radio frequency field with a specified RF field amplitude and a specified RF temporal profile characterized by an RF pulse duration;
injecting the beam of electrons at the first specified beam current amplitude and then at the second specified beam current amplitude after a specified delay in such a manner as to achieve at least two distinct endpoint energies of electrons accelerated within the accelerating structure during a course of a single RF-pulse, wherein the first specified beam current amplitude is different from the second specified beam current amplitude and wherein the specified delay is a function of a decay time of the accelerating structure;
optimizing a coupling coefficient between an RF source and the accelerating structure so as to achieve zero RF power reflection at a specified beam current;
accelerating the beam of electrons with the radio frequency field within the accelerating structure to produce accelerated electrons; and
impinging the accelerated electrons upon a target for generating X-rays by Bremsstrahlung.