StructureFactor
StructureFactor copied to clipboard
Diffraction pattern is related to box shape
I'm dealing with a system composed of particles comfined in a circle and particles have arranged themselves into a triangular lattice. But I find that, the diffraction pattern is related to the box. Shouldn't the diffraction pattern independent of box?
from matplotlib import pyplot as plt
import numpy as np
import freud
uc = freud.data.UnitCell.hex()
n_repeats = (20, 20,1)
system = uc.generate_system(n_repeats)
position=system[1]
position=position[np.linalg.norm(position,axis=1)<10]
box=np.array([20., 40., 0., 0., 0., 0.], dtype="float32")
system=(box,position)
sf=freud.diffraction.DiffractionPattern(grid_size=512)
sf.compute(system,peak_width=1)