-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paracrystalline model simulation #507
base: master
Are you sure you want to change the base?
Conversation
The simulation code is still relevant in as much as it can be used to cross check the analytical results. It may also be useful in the development of models of different types of distortion. It is not part of the released packages so the code does not need careful checking. |
The powder peak positions now align with the analytic forms for fcc, bcc and sc, so this code can be merged. The peaks have the correct width and relative scale gives okay results with small distortion value (-w 0.04):
There are still improvements to be done.
Attempts to improve accuracy with larger lattices will not work. Too many of the n² pairs will be far apart and not contributing to the accuracy of the q region of interest. Instead we need a virtual lattice, with the appropriate pair-wise sampling to capture dispersity in position, orientation and size that can be summed over many pairs. This can be done with a separate PR. |
For checking implementation of #284 corrections we can simulate a lattice of spheres and compare the resulting patterns.
The
dnn
parameter as currently implemented represents lattice spacing. For example, the following shows that the peak positions are aligned when the lattice spacing (a=500) matches dnn in the code.The lineshape broadening appears to be less in the theory than in the simulation for a given distortion factor but I have not investigated different distortion factors and different simulation sizes. It may be that the distortion model (gaussian around the lattice point) is not implemented correctly or does not match what the paracrystal models are using for distortion.
Ignore details at low q due to finite lattice size.
The realspace.py is using an incorrect scaling factor, so ignore offset in y.
The basic simulation of a 2D pattern does not have enough resolution to verify the details of the simulation:
Increasing the lattice size did not help. Increasing the name of samples to s=150000 has not yet completed running since the algorithm is O(n²).