# # 構造因子の計算 (エネルギー依存) # import xrayutilities as xu import numpy import matplotlib.pyplot as plt GaAs = xu.materials.GaAs energy= numpy.linspace(500, 20000, 5000) # 500 - 20000 eV F = GaAs.StructureFactorForEnergy(GaAs.Q(1, 1, 1), energy) plt.figure(); plt.clf() plt.plot(energy, F.real, '-k', label='Re(F)') plt.plot(energy, F.imag, '-r', label='Imag(F)') plt.xlabel("Energy (eV)"); plt.ylabel("F"); plt.legend() plt.show()