Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simulation is now a single file, and requires no dependencies. It is quite performant, I can run for a million crystals with no stuttering on my desktop.
I tried commenting the maths, but it can be hard to follow some places.
Hopefully you can try this out, @Baharis! I find it strange that it did not work for you before. It should also work with real microscopes, but the way communication is established is not pretty..
Of course, if you still want to keep complete seperation of simulation, then this PR can be ignored. It simply collects the existing simulation into one file, with a slight rewrite of some parts for simplicity.
I have not checked how accurate the spot positions are when accounting for camera length calibration ect, nor did I try to change the unit cell much.