MasterPatternBackend#

class de_ebsd.diffraction.MasterPatternBackend[source]#

Bases: ABC

Interface every master-pattern intensity backend implements.

A backend receives a batch of unit incident-beam directions (Cartesian crystal frame) and returns one backscatter intensity per direction. The simulator handles gridding, chunking, and assembly into the Lambert maps.

Methods

intensities

Intensities (K,) for unit directions (K, 3).

prepare

Build and cache per-simulation tensors on the target device.

Attributes

name

uses_depth_profile

whether this backend consumes a Monte Carlo exit-depth profile; the simulator builds a native one (EMsoft-free) when the user supplies none.

abstractmethod intensities(directions)[source]#

Intensities (K,) for unit directions (K, 3). Called after prepare.

abstractmethod prepare(inputs)[source]#

Build and cache per-simulation tensors on the target device.

uses_depth_profile = False#

whether this backend consumes a Monte Carlo exit-depth profile; the simulator builds a native one (EMsoft-free) when the user supplies none.