holotomocupy.utils

Functions:

mshow mshow_complex mshow_polar write_tiff read_tiff

holotomocupy.utils.mshow(a, **args)[source]

Plot the 2D array, handling arrays on GPU

Parameters
  • a ((ny, nx) float32) – 2D array for visualization

  • args – Other parameters for imshow

holotomocupy.utils.mshow_complex(a, **args)[source]

Plot the 2D array in the rectangular representation with the real and imag parts, handling arrays on GPU

Parameters
  • a ((ny, nx) complex64) – 2D array for visualization

  • args – Other parameters for imshow

holotomocupy.utils.mshow_polar(a, **args)[source]

Plot the 2D array in the polar representation with the absolute value and phase, handling arrays on GPU

Parameters
  • a ((ny, nx) complex64) – 2D array for visualization

  • args – Other parameters for imshow

holotomocupy.utils.read_tiff(name, **args)[source]

Read tiff to a numpy array.

Parameters
  • name (str) – Output file name

  • args – Other parameters for dxchange.read_tiff

Returns

a (ndarray) – Output numpy array

holotomocupy.utils.write_tiff(a, name, **args)[source]

Write numpy/cupy array as a tiff file,

Parameters
  • a (ndarray) – Input numpy 2D/3D array to write to a tiff file

  • name (str) – Output file name

  • args – Other parameters for dxchange.write_tiff