Hello I am doing research on kinematic and dynamic scattering of xrays on a crystals. I am attempting to simulate the diffraction patterns of a silicon substrate and I have already simulated two other layers of a Silicon Quantum Well and SiGe from which the hetero structure was composed of. In my book called Elements of Modern Xray Physics it tells me that the scattering amplitude squared is the scattered intensity. I understand that dynamical scattering is used for a substrate(infinite amounts of layers) but I am confused how to apply the equations of the Darwin Curve(dynamical under the curve and kinematical outside of the curve) to put into my code apart from using the scattered intensity with the kinematical approximation. The equations that I was given in the book are Intensity Reflectivity = (S_o/T_o)(S_o/T_o)* = (x-√x^2-1)^2 for x≥1, 1 for abs(x) ≤1, (x+√x^2-1)^2 for x≤1. Where x= ∈/g, ∈=mπζ-πζ, g is defined as the amplitude reflectivity for one layer. Sorry for the confusing symbols, I guess that is why I am so confused. Thank you!