Skip to content

Strain mapping improvements: adding independent optimizers for model fitting and multipeak fitting for cepstral calculation v2#245

Draft
mitis1 wants to merge 5 commits into
electronmicroscopy:fitting_models_cleanfrom
mitis1:strain-multi-optimizer-fitting-models
Draft

Strain mapping improvements: adding independent optimizers for model fitting and multipeak fitting for cepstral calculation v2#245
mitis1 wants to merge 5 commits into
electronmicroscopy:fitting_models_cleanfrom
mitis1:strain-multi-optimizer-fitting-models

Conversation

@mitis1

@mitis1 mitis1 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

What problem this PR addressees
This PR updates the fitting-models to allow for strain mapping and independent optimizers for each component. This allows each component to have a different learning rate, which improves model fitting.

It also updates strain_autocorrelation to support multipeak cepstral transform fitting for improved strain mapping. This is controlled by the refine_all_peaks option in choose_lattice_vector() and fit_lattice_vectors().

It adds a StrainFitting class in strain_visualization. This takes the u and v arrays from different strain calculation algorithms and uses them to calculate and plot the strain. The goal is to make the final plots look consistent regardless of which algorithm was used, and the results can be saved using Autoserialize.

It also adds bragg disk detection for strain mapping similar to py4DSTEM to quantEM.

What should the reviewer(s) do
See the test notebooks and verify they work. Also see the StrainFitting class and if it is usable for multiple different strain calculation methods.

Test notebook for multi-peak cepstral fitting and strain plotting using StrainFitting:
strain_cepstral_multi_01.ipynb

Test notebook for model fitting and strain plotting using StrainFitting:
strain_model_01.ipynb

Test notebook for bragg disk detection and strain plotting using StrainFitting:
strain_template_correlation_01.ipynb

@mitis1 mitis1 requested a review from arthurmccray June 10, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant