BlochPrismBackend#
- class de_ebsd.diffraction.BlochPrismBackend(cdtype=torch.complex128)[source]#
Bases:
BlochWaveBackendScattering-matrix (PRISM) Bloch backend: one shared eigen-decomposition.
cdtypeselects the working precision:torch.complex128(default, exact against the reference) ortorch.complex64(faster, ~1e-4).The whole intensity path is torch (
matrix_exp+ a depth recurrence), so it is autograd-differentiable: with arequires_gradstructure-factor LUT (u_lut) gradients flow through the Bloch solve back toU_g(matching finite differences; M4). ConnectingU_gto crystal parameters needs torch structure factors – the remaining M4 piece.Methods
Intensities (K,) for unit directions (K, 3).
Build and cache per-simulation tensors on the target device.
Attributes
name- uses_depth_profile = True#
whether this backend consumes a Monte Carlo exit-depth profile; the simulator builds a native one (EMsoft-free) when the user supplies none.