-
Notifications
You must be signed in to change notification settings - Fork 34
Description
I am trying to calculate reflectivity of a sapphire crystal. I followed the examples on the website but found the reflectivity is very weak. It seems that the extinction rules are different than expected. For example, extinction is expected for (0 0 4) reflection, but I can get a strong reflection by xrt. But for (0 0 6), which should not have extinction, I got very weak intensity. I also compared with results calculated by other programs such as XOP and found the same discrepancy. Could you help to check the following code? Thanks a lot!
import numpy as np
import matplotlib.pyplot as plt
import os, sys; sys.path.append(os.path.join('xrt-1.6.0')) # path to xrt
import xrt.backends.raycing.materials_crystals as xcryst
SapphireCrys = xcryst.AlphaAlumina(hkl=(0, 0, 4))
E = 14400
dtheta = np.linspace(-100,300, 501)
theta = SapphireCrys.get_Bragg_angle(E) + dtheta*1e-6
print(SapphireCrys.get_Bragg_angle(E)*180/np.pi)
curS, curP = SapphireCrys.get_amplitude(E, np.sin(theta))
print(np.max(curS))
plt.plot(dtheta, abs(curS)**2, 'r', dtheta, abs(curP)**2, 'b')
plt.show()