httomolibgpu.prep.normalize

Contents

httomolibgpu.prep.normalize#

Modules for raw projection data normalization

httomolibgpu.prep.normalize.normalize(data: <cp.ndarray>, flats: <cp.ndarray>, darks: <cp.ndarray>, flats_multiplier: float = 1.0, darks_multiplier: float = 1.0, cutoff: float = 10.0, minus_log: bool = True, nonnegativity: bool = False, remove_nans: bool = False) <cp.ndarray>[source]#

Normalize raw projection data using the flat and dark field projections. This is a raw CUDA kernel implementation with CuPy wrappers.

Parameters:
  • data (cp.ndarray) – Projection data as a CuPy array.

  • flats (cp.ndarray) – 3D flat field data as a CuPy array.

  • darks (cp.ndarray) – 3D dark field data as a CuPy array.

  • flats_multiplier (float) – A multiplier to apply to flats, can work as an intensity compensation constant.

  • darks_multiplier (float) – A multiplier to apply to darks, can work as an intensity compensation constant.

  • cutoff (float) – Permitted maximum value for the normalised data.

  • minus_log (bool) – Apply negative log to the normalised data.

  • nonnegativity (bool) – Remove negative values in the normalised data.

  • remove_nans (bool) – Remove NaN and Inf values in the normalised data.

Returns:

Normalised 3D tomographic data as a CuPy array.

Return type:

cp.ndarray