imars3d.backend.preparation package

iMars3D preparation module.

Submodules

imars3d.backend.preparation.normalization module

iMars3D normalization module.

class imars3d.backend.preparation.normalization.minus_log(*, arrays, max_workers, name)[source]

Bases: ParameterizedFunction

Computation of the minus natural log of a given array.

Calls tomopy.prep.normalize.minus_log.

Parameters:
  • arrays (np.ndarray) – any multidimensional array with values greater than one.

  • max_workers (int) – number of cores to use for parallel processing, default is 0, which means using all available cores.

Return type:

np.ndarray

Raises:

ValueError – Any entry in the input array is equal or smaller than zero

class imars3d.backend.preparation.normalization.normalization(*, arrays, darks, flats, max_workers, name)[source]

Bases: ParameterizedFunction

Normalize the input array(s) by subtracting the dark field and dividing by the adjusted flat field.

Parameters:
  • arrays – 3D array of images, the first dimension is the rotation angle omega.

  • flats – 3D array of flat field images (aka flat field, open beam), axis=0 is the image number axis.

  • darks – 3D array of dark field images, axis=0 is the image number axis.

  • max_workers – number of cores to use for parallel processing, default is 0, which means using all available cores.

Return type:

normalized 3D array of images, the first dimension is the rotation angle omega.