Dynamic diffraction#
- exception pyemaps.ddiffs.BlochListError(message='')#
Bases:
ExceptionRaised when a list of dynamic diffraction images,
BImgList, is invalid.- __init__(message='')#
- class pyemaps.ddiffs.BlochImgs(name)#
Bases:
objectA list of dynamic diffraction (Bloch) images, each paired with the microscope controls it was simulated with, including its sample thickness. Returned by
generateBloch()andgetBlochImages(), and displayed byshowBloch(). It’s also available asBImgList.for emc, img in bloch_imgs: print(emc.simc.sth, img.shape) # thickness (Å) and image size
- __init__(name)#
- Parameters:
name (str, required) – the crystal’s name.
- Raises:
BlochListError – if name is empty.
- property name#
The crystal’s name.
- property blochList#
The images, as a list of
(controls, image)tuples; each image is a 2-D numpy array.
- add(emc, b)#
Add an image, with the controls it was simulated with.
- Parameters:
emc (
EMControl, required) – the controls.b (2-D numpy.ndarray, required) – the image.
- Raises:
BlochListError – if emc isn’t an EMControl or b isn’t a 2-D array.
- sort()#
Sort the images by their controls.