Repository navigation
Correct the structure-factor and coupling formulas of the Bloch-wave tutorial - #49
Merged
Merged
Conversation
…tutorial The tutorial's formulas disagreed with abtem.bloch: - F(g) carries 1/Omega and the crystallographic sign exp(+2 pi i g.r_j), as in calculate_structure_factors. - The potential is V(r) = (1/kappa) sum_g F(g) exp(-2 pi i g.r), a sum over reciprocal lattice vectors divided by kappa, as in structure_factor_to_potential; it was written as an integral multiplied by kappa. - The Debye-Waller factor is exp(-2 pi^2 sigma_j^2 g^2), not ... g. - U_g = sigma F_g / (pi lambda kappa) = (2 m e / h^2) V_g, the prefactor calculate_structure_matrix applies; the tutorial had U_g = F_g. Markdown only; no cell outputs change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Four formulas in the Bloch-wave tutorial disagree with what
abtem.blochcomputes. The structure-matrix formulas were already corrected for the threeuse_wave_eqforms. This PR fixes the rest, in markdown only, so no cell outputs change.abtem/bloch/dynamical.py)calculate_structure_factors)structure_factor_to_potential)calculate_scattering_factors)calculate_structure_matrix)Here$\Omega$ is the unit-cell volume, $\kappa = 4\pi\epsilon_0 / (2\pi a_0 e)$ ($\sigma$ is the interaction parameter (
abtem.core.constants.kappa) andenergy2sigma). The PR also fixes two typos in the potential paragraph ("vaccum permitivity").Checks
jupyter-book build docs,ABTEM_DOCS_VERSION=dev). All 69 equations on the page render in MathJax with no errors, and the four edited ones read as intended.devsource named above.🤖 Generated with Claude Code