ucurv.zoneplate

ucurv.zoneplate(sz, engine: str = 'auto')[source]

Generate an N-dimensional zone plate pattern.

Parameters:

sz (sequence of int) – A sequence of length 2, 3, or 4 specifying the size along each dimension. For example, (nx, ny) for 2D, (nx, ny, nz) for 3D, or (nx, ny, nz, np) for 4D.

Returns:

rsq – An N-dimensional array of shape tuple(sz) containing the zone plate values computed as

cos(pi / max(sz) * (x_1**2 + x_2**2 + … + x_N**2)),

where each coordinate x_i is linearly spaced from -sz[i]/2 to sz[i]/2.

Return type:

ndarray

Raises:

ValueError – If sz does not have length 2, 3, or 4. Higher dimensions than 4 are not implemented.