httomolibgpu.prep.phase#

Modules for phase retrieval and phase-contrast enhancement

httomolibgpu.prep.phase.paganin_filter_savu(data: <cp.ndarray>, ratio: float = 250.0, energy: float = 53.0, distance: float = 1.0, resolution: float = 1.28, pad_y: int = 100, pad_x: int = 100, pad_method: str = 'edge', increment: float = 0.0) <cp.ndarray>[source]#

Apply Paganin filter (for denoising or contrast enhancement) to projections.

Parameters
  • data (cp.ndarray) – The stack of projections to filter.

  • ratio (float, optional) – Ratio of delta/beta.

  • energy (float, optional) – Beam energy in keV.

  • distance (float, optional) – Distance from sample to detector in metres.

  • resolution (float, optional) – Pixel size in microns.

  • pad_y (int, optional) – Pad the top and bottom of projections.

  • pad_x (int, optional) – Pad the left and right of projections.

  • pad_method (str, optional) – Numpy pad method to use.

  • increment (float, optional) – Increment all values by this amount before taking the log.

Returns

The stack of filtered projections.

Return type

cp.ndarray

httomolibgpu.prep.phase.paganin_filter_tomopy(tomo: <cp.ndarray>, pixel_size: float = 0.0001, dist: float = 50.0, energy: float = 53.0, alpha: float = 0.001) <cp.ndarray>[source]#

Perform single-material phase retrieval from flats/darks corrected tomographic measurements. See [4] for a reference.

Parameters
  • tomo (cp.ndarray) – 3D array of f/d corrected tomographic projections.

  • pixel_size (float, optional) – Detector pixel size in cm.

  • dist (float, optional) – Propagation distance of the wavefront in cm.

  • energy (float, optional) – Energy of incident wave in keV.

  • alpha (float, optional) – Regularization parameter, the ratio of delta/beta. Larger values lead to more smoothing.

Returns

The 3D array of Paganin phase-filtered projection images.

Return type

cp.ndarray