mask¶
Helper functions for masks.
The functions should be used when computing the azimuthal average of the image structure function.
# compute image structure function dqt
import fastddm as fddm
...
# compute azimuthal average and mask central cross
mask = fddm.mask.central_cross_mask(dqt.full_shape()[1:])
aa = fddm.azimuthal_average(dqt, bins=bins, range=(kmin, kmax), mask=mask)
- fastddm.mask.central_cross_mask(shape: Tuple[int, int], kx: ndarray | None = None, ky: ndarray | None = None) ndarray¶
Evaluate mask to remove central cross from azimuthal average.
If
kxorkyare not given, the half-plane representation for the 2D image structure function is assumed (i.e., the 0th column and the row atshape[0] // 2are masked out).- Parameters:
shape (Tuple[int, int]) – Shape of the full array, e.g., (128, 256).
kx (numpy.ndarray, optional) – The array of spatial frequencies along axis x. Default is None.
ky (numpy.ndarray, optional) – The array of spatial frequencies along axis y. Default is None.
- Returns:
The mask.
- Return type: