Skip to content

Name the scattering-matrix backend for what it is, not PRISM - #35

Merged
CSSFrancis merged 2 commits into
mainfrom
refactor/scattering-matrix-name
Nov 13, 2026
Merged

CSSFrancis merged 2 commits into
mainfrom
refactor/scattering-matrix-name

Conversation

@CSSFrancis

Copy link
Copy Markdown
Member

bloch_prism / BlochPrismBackend solves the same Bloch-wave model as bloch through the scattering matrix: the wave at depth n·dz is Σⁿ applied to the incident beam, with Σ = exp(i·phase·A). That's Sturkey's (1962) formulation, mathematically equal to the eigendecomposition; test_scattering_matrix.py checks it to 1e-9. It is not Ophus's PRISM (2017), which gets its speed from Fourier interpolation of a STEM scattering matrix. Nothing here is interpolated.

Changes

  • New names: backend="bloch_smatrix" (still the default), BlochScatteringMatrixBackend, and the module de_ebsd.diffraction.smatrix.
  • The module docstring cites:
    • Sturkey 1962;
    • Wang & De Graef 2016 (Bethe potentials with the scattering matrix);
    • Singh & De Graef 2018 (GPU matrix exponentiation);
    • Winkelmann et al. 2007 and Callahan & De Graef 2013 (the EBSD model);
    • Ophus 2017, for what it is not.
      The architecture notes say the same.
  • The old names keep working with a DeprecationWarning: "bloch_prism", de_ebsd.BlochPrismBackend, de_ebsd.diffraction.BlochPrismBackend and de_ebsd.diffraction.prism. A test pins each one.
  • Examples, scripts, README, dev docs and the depth widget's label use the new name.
  • Changelog fragment: +scattering-matrix.deprecation.rst.

Results are unchanged. Ran ruff check, ruff format --check and the full suite: 670 passed, 16 skipped.

https://claude.ai/code/session_01DzXsKAUJSM4XYpqqzrcuV5

"bloch_prism" / BlochPrismBackend solves the Bloch-wave model by Sturkey's
scattering matrix (a matrix exponential stepped through the depth slices),
equal to the eigendecomposition; it is not Ophus's PRISM, which interpolates
a STEM scattering matrix in Fourier space. It is now backend="bloch_smatrix",
BlochScatteringMatrixBackend in de_ebsd.diffraction.smatrix, with its
references (Sturkey 1962; Wang & De Graef 2016; Singh & De Graef 2018;
Winkelmann et al. 2007; Callahan & De Graef 2013; and Ophus 2017 for what it
is not) in the module and the architecture notes.

The old names still work, with a DeprecationWarning: "bloch_prism",
de_ebsd.BlochPrismBackend, de_ebsd.diffraction.BlochPrismBackend and
de_ebsd.diffraction.prism. Results are unchanged.

Claude-Session: https://claude.ai/code/session_01DzXsKAUJSM4XYpqqzrcuV5
@CSSFrancis
CSSFrancis merged commit e5403b0 into main Nov 13, 2026
4 checks passed
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