polyTEM.image.stem.SED

class polyTEM.image.stem.SED(data, data_params, process_params)

Bases: object

Scanning Electron Diffraction

This class is designed to work with the output .npy files after pre-processing of 4DSTEM data either using py4Dstem or the Salleo Group code written by Luke Balhorn. Thus the input data is assumed to be of shape (position, q, angles). The positions are the flattened index from the 2D raster scan of the sample area, which is assumed to be perfectly square.

Variables:
  • data (array-like) – with shape (position, q, angle)

  • data_params (dict) – 4D-STEM Data Acquisition Parameters. Expected Keys “q_min”, “q_max”, “q_step”, “probe_step” (nm), “angle_step”

  • process_params (dict) – Data Analysis Parameters. Expected Keys “peak_q”,”peak_q_sigma”, “peak_theta_sigma”, “processor”

  • bkg (np.ndarray) – shape (images, q). Median intensity for each q in each diffraction pattern

__init__(data, data_params, process_params)

Methods

__init__(data, data_params, process_params)

featurize(peak_threshold_function[, verbose])

Extract local orientation from peak features in data

Attributes

required_params

_orientation_filters()

Create set of gaussian filters to extract diffraction peak intensity as function of angle, discretized based on data’s angle_step.

Returns:

Shape (q, theta, theta)

Return type:

gaussian_filters (np.ndarray)

featurize(peak_threshold_function, verbose=False)

Extract local orientation from peak features in data