The pattern

class scatman.Pattern

Object that conains a diffraction pattern.

This object doesn’t have to be directly defined by the user, and it is only returned by the acquire and acquire_dataset methods of the detectors. The pattern is bit-compatible with a 2D numpy array, and can be re-interpreted as the latter by an explicit conversion, i.e.:

import numpy as np

my_numpy_pattern = np.array(my_pattern)


The pattern object is actually needed only for data management within the module. It is very likely that in future releases it will be removed, by allowing the acquire and acquire_dataset methods to directly return a 2D numpy array.


Coordinates representation type of the diffraction pattern ( 'projection', 'momentum' , 'angle' or 'detector' ).

get_field(self: scatman.Pattern) → array

Get the complex scattered field.


If the option “field” of the detector’s acquire method is set to false (default), this function will return just an zero size array.

Returns:A 2D numpy complex array containing the complex scattere field.
  • If coordinates = 'projection' or coordinates = 'momentum', the unit is the reciprocal of a length.
  • If coordinates = 'angle', the unit is degrees.
  • If coordinates = 'detector', the unit is the ratio between the detector’s physical pixel size and the detector distance
Type:Pixel size of the diffraction pattern. Depening on the coordinates type, it can assume different units

Linear resolution, in pixel, of the diffraction pattern.