diffraction#

Dynamical electron diffraction: reflection lists, Bethe potentials, Bloch waves.

Functions

build_dynamical_matrix(structure_factors, refl)

The Bloch dynamical matrix A (complex, nm^-2) for one classified list.

candidate_reflections(refl, sg, wavelength, ...)

Mask of reflections kept for one beam direction.

classify_reflections(structure_factors, ...)

Candidate + strong/weak classification for one beam direction.

excitation_errors(g_cart, k_hat, wavelength)

Excitation errors s_g in nm^-1 (EMsoft Calcsg), batched over beams.

master_reflection_list(structure_factors)

All centering-allowed reflections with d >= dmin, sorted by |g|.

partition_strong_weak(hkl, sg, forbidden, ...)

Classify candidate reflections as STRONG / WEAK / IGNORED.

reduce_to_fundamental_sector(directions, ...)

Fold directions onto the point-group fundamental sector.

resolve_backend(backend)

Map a backend name to an instance; pass instances through.

sample_incident_directions(npx[, device, dtype])

Both hemispheres of the square Lambert grid as unit direction vectors.

Classes

BetheParameters([strong, weak, cutoff, ...])

Strong/weak/ignore thresholds for the Bethe-potential truncation.

BlochPrismBackend([cdtype])

Scattering-matrix (PRISM) Bloch backend: one shared eigen-decomposition.

BlochWaveBackend()

The physical Bloch-wave backend (EMsoft CalcLgh + Sgh).

DynamicalMatrix(matrix, hkl, k, reflections)

The dynamical matrix for one beam direction (inspectable stage).

KVectorGrid(npx, directions)

Incident-beam directions covering the sphere.

MasterPatternBackend()

Interface every master-pattern intensity backend implements.

ReflectionList(hkl, g, d, u_mod, forbidden)

A list of reflections, optionally classified for one beam direction.

SimulationInputs(structure_factors, bethe, ...)

Everything a backend needs, prepared once by the simulator.