learn

learn#

Implements functions for ptychographic deep learning.

tike.ptycho.learn.extract_patches(psi, scan, patch_width)[source]#

Extract patches from the object function.

Parameters
  • scan ((..., POSI, 2) float32) – Coordinates of the minimum corner of the patch grid for each extracted patch.

  • psi ((..., WIDE, HIGH) complex64) – The complex wavefront modulation of the object.

  • patch_width (int) – The desired width of the square patches to be extraced.

Returns

patches – Patches of psi extracted at the given scan positions.

Return type

(…, POSI, patch_width, patch_width) complex64 numpy-array