During the simulation of synchrotron radiation generated by an electron beam, I'm unable to output the density profile for photons. #5059
Replies: 1 comment
-
Hi, The issue is that the quantity that you are trying to plot ( Note that, in your simulations, the photons were also saved as individual macroparticles, in the same HDF5 file. When reading them as individual macroparticles, you will be able to extract their momentum (and thus energy), position, weighting factor, etc. Does that work for you? Here is more info on how to extract the list of macroparticles from the file. |
Beta Was this translation helpful? Give feedback.
-
I am trying to calculate synchrotron radiation produced by an electron beam and further to plot the photon density profile for visualization. But the density plot always displays a value of 0(as shown in the figure below).
However, it is possible to output the energy and other information of photons.
Instead of pasting the code here directly, I attached the two files.
input_2d.txt
photon_densityprofile_plotting.txt
The 1st attachment (i.e. input_2d.txt) is the warpx input file that I am using to generate synchrotron radiation. The diagnostic output for photon density is available in a diagnostic named "diag1" in the end of the file (highlighted in red)(rho_photons).
Then, the 2nd attachment (i.e. photon_densityprofile_plotting.txt) is regarding the analysis and visualization of the photon density profile. I have successfully plotted density distribution for other particles using this script, but I am unable to plot the density distribution for photons.
Can anyone please help me pointing out the mistakes I might be doing? or help me modifying the code if necessary? I'm definitely missing something!
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions