Author Archives: Yi-Xin Liu

Julia in Practice: Building Scattering.jl from Scratch (5)

By: Yi-Xin Liu

Re-posted from: http://www.yxliu.group/2020/04/scattering-5

In this post we will present a concise review of the fundamental theory of X-ray scattering, including electromagnetic waves, flux and intensity, scattering cross section and scattering length, scattering by an electron, interference, and atomic form factor. Although the specific properties of X-rays are used, the derivation is applicable to other incident beams, such as neutrons. The derivation presented here is different from most of literature with an emphasis on a consistent treatment on the wave nature of the incident beam. The notations used in this post mostly follow the book by Roe1.

Continue reading

Julia in Practice: Building Scattering.jl from Scratch (4)

By: Yi-Xin Liu

Re-posted from: http://www.yxliu.group/2020/04/scattering-4

In this post we implement submodules rotation.jl of Scattering.jl to rotate a vector in the reference coordinate system to the internal coordinate system of the scatterer. Three representations of a rotaion operation are discussed and implemented. The conversion among and math operations on these representations are also implemented.

Continue reading