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
79 stars 28 forks source link

Distribution function w for crystallite normals in mosaic crystals #122

Closed bbazi closed 1 year ago

bbazi commented 1 year ago

Hi, On line 1641 there is the Gaussian distribution function w for the crystallite normals in mosaic crystals. For mosaic graphite crystals (HOPG,HAPG) we know that the rocking curve is better fitted by a Lorentzian distribution than by a Gaussian one. Doesn't it make more sense if we would use a Lorentzian distribution for this function w (w = 1 / (np.pi * self.mosaicity * (1 + (delta / self.mosaicity)**2))) when we know from experiments that the rocking curve is Lorentzian shaped? Maybe one could specify between Gaussian and Lorentzian in the "get_amplitude_mosaic" function. I'm curious what you think of this.

kklmn commented 1 year ago

Hi,

For mosaic graphite crystals (HOPG,HAPG) we know that the rocking curve is better fitted by a Lorentzian distribution than by a Gaussian one.

Who we? Mankind or a particular experimental group? Please provide a reference. So far, I see it contradicts (1) below, which follows Bacon & Lowde.

  1. "The mosaicity is commonly equated with the standard deviation of this distribution."
  2. Lorentzian distribution doesn't have standard deviation (rms).
  3. It is certainly possible to derive new formulas and re-implement get_amplitude_mosaic() provided you (in the above sense) provide convincing experimental evidence.
bbazi commented 1 year ago

Hi, In the papers of Legall(2006), Legall(2009), Zastrau(2013) and Gerlach(2015), the rocking curves of HAPG crystals were best fit with a Lorenzian distribution. (not for HOPG, sorry for the confusion above)

Here are the citations:

kklmn commented 1 year ago

Thanks for the references!

It is pretty straightforward to adapt both the reflectivity calculations and the sampling of crystallite distribution for ray-tracing, I just have no priority for doing this.

Do you have an experimental setup for measuring rocking curves, similar to Fig.2 in [Gerlach et al. J. Appl. Cryst. (2015). 48, 1381–1390]?

bbazi commented 1 year ago

Hi,

Unfortunately, my knowledge one the reflectivity calculations is limited. My guess was, in the case of HAPG, to use a lorenzian distribution for w instead of a gaussian one. I was thinking of using the pdf from https://en.wikipedia.org/wiki/Cauchy_distribution and treating the scale parameter gamma as the mosaicity. If this is not the way to do it, I shall wait for you to implement this down the line.

No I don't have such an experimental setup available at the moment.

bbazi commented 1 year ago

I found a paper by Smid(2021) which presents a simulation code which takes into account the lorenzian distribution for HAPG, might be of interest to you. Unfortunately this code doesn't support the simulation of full cylinder crystal optics which I'm researching.

Paper: Šmíd, Michal, Xiayun Pan, and Katerina Falk. "X-ray spectrometer simulation code with a detailed support of mosaic crystals." Computer Physics Communications 262 (2021): 107811.