darfix.core.imageOperations.background_subtraction#

darfix.core.imageOperations.background_subtraction(data, bg_frames, method='median')[source]#

Function that computes the median between a series of dark images from a dataset and subtracts it to each frame of the raw data to remove the noise.

Parameters:
  • data (ndarray) – The raw data

  • bg_frames (array_like) – List of dark frames

  • method (Union['mean', 'median', None]) – Method used to determine the background image.

Returns:

ndarray

Raises:

ValueError