ess.imaging.tools.analysis.blockify#

ess.imaging.tools.analysis.blockify(image, **sizes)[source]#

Blockify an image by folding it into blocks of specified sizes. The sizes should be provided as keyword arguments, where the keys are dimension names and the values are the sizes of the blocks. The shape of the input image must be divisible by the block sizes.

Parameters:
  • image (Variable | DataArray) – The image to blockify.

  • sizes – Keyword arguments specifying the block sizes for each dimension. For example, x=4, y=4 will create blocks of size 4x4.

Return type:

Variable | DataArray