kklmn / xrt

Package xrt (XRayTracer) is a python software library for ray tracing and wave propagation in x-ray regime. It is primarily meant for modeling synchrotron sources, beamlines and beamline elements.
MIT License
84 stars 30 forks source link

coherence fraction calculation #46

Closed yangfg-bsrf closed 4 years ago

yangfg-bsrf commented 4 years ago

In order to evaluate the coherence of the source, two methods are used. The first one is to calculate by the euqation (λ/2π)^2/(ε_V ε_H). And the other one is by the mode decomposition method and = β0/Σβi, which is generated by the example "test_coherent_fraction_stack.py". However, it is found that these two values are very different: (1) (λ/2π)^2/(ε_Vε_H) = (19.7pm. rad)^2/(44.9um 22.807urad 6.272um * 5.014urad)= 1.2% these data are also computed by the XRT. (2) β0/Σβi = 21% for mode -decomposition method. this difference also appears when I repeat the simulations in the paper “Coherence properties of the high-energy fourth-generation X-ray synchrotron sources”, which also use the XRT to calculate the coherent fraction. I wonder if I have make misunderstanding on these calculations.

kklmn commented 4 years ago

The result of (1) strongly depends on how you calculate the linear and angular source sizes. A few approaches based on the Wigner function (a very rough approximation to phase-space distribution) are given e.g. in R.P.Walker, Phys. Rev. Accel. Beams 22, 050704 (2019). You can see there that the definitions vary a lot.

The result of (2) can also vary depending on what source characteristics you include in the calculations. In particular, it depends on the electron beam energy spread, far- or near-field way of calculations, the (de)tuning of the undulator and the inspected field of view (beamline acceptance). You should also check that you reach convergence, i.e. the number of one-electron fields is sufficient.

I wonder if I have make misunderstanding on these calculations.

And yes, the people's understanding of the coherence properties also has a non-zero spread :)

I have collected all this material into plots and tables and I hope within a few months I will write a paper on these issues. In that paper, I compare (a) direct 1:1 source imaging by means of wave propagation with (b) back phase propagation into the source plane. And I analyze the coherence properties by means of (1) Wigner function, (2) eigenmode decomposition and (c) double-slit diffraction.

The paper you mention is very limited in the implementation and self-consistency. We, therefore, canceled our participation in it. So I am also not quite sure how and what they did in the calculations.

yangfg-bsrf commented 4 years ago

Thanks for your suggestion. Looking forward to reading your work, Now, we are trying to evaluate the error of different methods. As we know, the analytical result given by the Gauss approximation is good for determining the acceptance of the system for coherent application, especially for the coherence length. If the approximation fails as Walker's paper said, I wonder how to give evaluation. For the mode decomposition calculation, I just run the example and did not change any paramter, and following Walker's euqation, but the difference of coherence fraction is still big.