## 3 Results
### Spectral Characteristics of Electron Radiation  
Figure 5 shows the corresponding spectrum of electrons at the maximum radiation power angle \((\theta_{\mathrm{max}},\varphi_{\mathrm{max}})\) with the same parameter settings as above. Figure 5a-h show  
Figure 4: Maximum radiated power angle of electrons (blue) and the trend of corresponding radiated power (red). the effect of laser pulses with different pulse widths on the higher harmonics of the electron radiation. The maximum horizontal coordinates in the graph are: a, b: 1000; c, d: 1500; e, g, h: 200; f: 3000; i: 200. The maximum vertical coordinates in the graph are: a: 1400; b: 7000; c: 12,000; d: 9 \(\times\) 10\({}^{5}\); e: 2.5 \(\times\) 10\({}^{6}\); g: 1.8 \(\times\) 10\({}^{7}\); h: 1.2 \(\times\) 10\({}^{6}\); f: 31.5 \(\times\) 10\({}^{6}\); i: 5000. Firstly, observing Figure 5 from the perspective of the distribution of energy, we can easily see that for electrons in an applied magnetic field, its higher harmonics of the electron radiation reach a tenth of the peak energy at 500\(\omega_{0}\) when the pulse width of the laser pulse is L = \(\lambda_{0},2\lambda_{0},3\lambda_{0}\). And as the pulse width of the laser pulse increases, the higher harmonics of the electron radiation increase. When L = \(4\lambda_{0}\), the higher harmonics of the electron radiation reach a tenth of the peak energy at 800\(\omega_{0}\). When L > 6, the situation is similar to the one mentioned earlier, the electrons reach saturation, and the higher harmonics of the electron radiation are almost constant, both reaching a tenth of the peak energy at about 2000\(\omega_{0}\). However, the special point is that at L = \(6\lambda_{0}\), the electron's higher harmonics of the electron radiation do not reach a tenth of the peak energy until 2600 \(\omega_{0}\). This indicates that the electron's high harmonics increase until saturation (L = \(6\lambda_{0}\)) under the combined effect of the tightly focused laser pulse and the magnetic field, and the best case is at L = \(6\lambda_{0}\). We can assume that the tightly focused laser pulse with L = \(6\lambda_{0}\) works best. For the electron without the applied magnetic field, Figure 5i, its higher harmonics of the electron radiation reach a tenth of the peak energy at only 150\(\omega_{0}\). This indicates the superiority of the method of modulating X-rays using an applied magnetic field compared to the conventional method, which has abilities that the conventional method does not have. Furthermore, observing from the perspective of the distribution of energy magnitudes, we can find that the maximum energy of the electrons increases as the laser pulse L increases, from 1200 at L = \(\lambda_{0}\) to about 1.8 \(\times\) 10\({}^{7}\) at L = \(6\lambda_{0}\). However, when L = \(10\lambda_{0},15\lambda_{0}\), the higher harmonics of the electron radiation instead decrease to 1.1 \(\times\) 10\({}^{7}\) and 1.4 \(\times\) 10\({}^{7}\), respectively. This also corresponds to the conclusion above that tightly focused laser pulses at L = \(6\lambda_{0}\) work best. It is due to the fact that as the spatial radiation collimation of electrons increases, at the maximum radiated power angle, we can observe more spectrums of electron radiation of different angles. While the spectrum on the maximum radiation power angle and the spectrum on the other azimuthal angles for superposition, resulting in higher harmonics of the electron radiation on the high \(\omega_{0}\) still have higher energy. That is to say, originally, the energy on different orientation has its fixed main frequency. When the spatial radiation collimation of electrons is improved, the spectrum on different orientation can be observed at the same time, forming the spectrum that can be observed in Figure 5a-h. Therefore, because of the asymmetry of the electrons in Figure 3 at pulse widths L = \(10\lambda_{0},15\lambda_{0}\), the higher harmonic energy of the electrons is low and decreases quickly.