from crystals import Crystal
from skued import kinematicsim
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage import gaussian_filter

extent = np.linspace(-10, 10, num=1024)
kx, ky = np.meshgrid(extent, extent)
kk = np.sqrt(kx**2 + ky**2)

I = kinematicsim(Crystal.from_database("C"), kx=kx, ky=ky, energy=50)
I[kk < 1] = 0.0

# Clean up the image a bit
I[:] = gaussian_filter(I, sigma=3)

fig, ax = plt.subplots(1,1, figsize=(4.5, 4.5))
ax.imshow(I, vmax=0.9*I.max(), cmap='inferno')
ax.axis('off')

plt.show()