superpose_deltas#
- abtem.integrals.superpose_deltas(positions, array, weights=None, round_positions=False)[source]#
Add superposition of delta functions at given positions to a 2D array.
- Parameters:
positions (np.ndarray) – Array of 2D positions as an nx2 array. The positions are given in units of pixels.
array (np.ndarray) – The delta functions are added to this 2D array.
weights (np.ndarray, optional) – If given each delta function is weighted by the given factor. Must match the length of positions.
round_positions (bool, optional) – If True, the delta function positions are rounded to the center of the nearest pixel, otherwise subpixel precision is used.
- Return type:
ndarray