Adding various strain mapping algorithms - #284
Draft
mitis1 wants to merge 58 commits into
Draft
Conversation
Create clean fitting_models branch tracking upstream/fitting_models_clean
…odels_clean Fitting models without all the extra commits, for easier merging into dev in the future.
This reverts commit 78111c4.
…or elliptical distortion
…ates and updating strain plotting
Adding L1 loss, fixing mask + lattice
… model fitting, and optimizer batched implementation
… fitting and strain mapping
…er-fitting-models
…er-fitting-models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem this PR addresses
This PR adds an implementation of the cepstral transform, template matching, and model fitting for strain mapping. The cepstral implementation is based on this paper by Padgett et al and the template matching is based on py4dstem's algorithm. Model fitting is a new method for calculating strain using a rendered diffraction pattern and fitting it to match the original.
The cepstral implementation is mainly in strain_autocorrelation.py file.
Disk detection is in bragg_vectors.py, bragg_vectors_visualization.py, and disk_detection.py.
Model fitting uses model_fitting.py and model_fitting_visualization.py. It also implements a base fitting model that can be used for implementations beyond strain mapping.
The PR also makes a strain class which calculates and saves the strain map using the results of any of the previous algorithms. It is implemented in strain.py and strain_visualizations.py
What should the reviewer(s) do
model-fitting.ipynb
cepstral_mp.ipynb
cepstral.ipynb
disk-detection.ipynb