pyxem.components package

Submodules

pyxem.components.diffraction_component module

Forward model component for kinematical electron diffraction.

class pyxem.components.diffraction_component.ElectronDiffractionForwardModel(electron_diffraction_calculator, structure, calibration, reciprocal_radius, d11=1.0, d12=0.0, d13=0.0, d21=0.0, d22=1.0, d23=0.0, d31=0.0, d32=0.0, d33=1.0)[source]

Bases: hyperspy.component.Component

Fits structure deformation to observed diffraction patterns

Used in a HyperSpy model, this component will iteratively adjust the nine entries of a deformation matrix, apply the deformation to the crystal structure, and simulate the resultant diffraction pattern, to find the best-fit deformation.

Parameters
  • electron_diffraction_calculator (DiffractionGenerator) – The model used to simulate electron diffraction patterns from structures.

  • structure (Structure) – The base crystal structure used for the forward model.

  • calibration (float) – Calibration in reciprocal Angstroms per pixel.

  • dij (float) – Components of the transformation matrix used to deform the structure. Defaults to the identity matrix.

function(*args, **kwargs)[source]
simulate()[source]

Deforms the structure and simulates the corresponding electron diffraction pattern.

Returns

simulation – Simulated diffraction pattern of the deformed structure

Return type

DiffractionSimulation

pyxem.components.scalable_reference_pattern module

class pyxem.components.scalable_reference_pattern.ScalableReferencePattern(signal2D, d11=1.0, d12=0.0, d21=0.0, d22=1.0, t1=0.0, t2=0.0, order=3)[source]

Bases: hyperspy.component.Component

Fixed diffraction pattern component which is scaled by a 2D affine transformation of the form:

X = d11*x + d12*y Y = d21*x + d21*y

The fixed two-dimensional pattern is defined by a single image which must be passed to the ScalableReferencePattern2D constructor, e.g.:

In [1]: im = load('my_image_data.hdf5')
In [2] : ref = components.ScalableFixedPattern(im.inav[11,30]))
D

List containing matrix components for affine matrix

Type

list

order

Interpolation order used when applying image transformation

Type

1, 3

construct_displacement_gradient()[source]

Construct a map of the displacement gradient tensor at each navigation position as determined by fitting an affine transformed reference pattern.

Returns

D – Signal containing the displacement gradient tensor at each navigation postion.

Return type

DisplacementGradientMap

function(x, y)[source]

Module contents