skued.baseline_dt

skued.baseline_dt(array, max_iter, level=None, first_stage='sym6', wavelet='qshift1', background_regions=None, mask=None, mode='constant', axis=-1)

Iterative method of baseline-determination based on the dual-tree complex wavelet transform. This function only works in 1D, along an axis. For baseline of 2D arrays, see baseline_dwt().

Parameters:
  • array (~numpy.ndarray, shape (M,N)) – Data with background. Can be either 1D signal or 2D array.

  • max_iter (int) – Number of iterations to perform.

  • level (int or None, optional) – Decomposition level. A higher level will result in a coarser approximation of the input signal (read: a lower frequency baseline). If None (default), the maximum level possible is used.

  • first_stage (str, optional) – Wavelet to use for the first stage. See skued.available_first_stage_filters() for a list of suitable arguments

  • wavelet (str, optional) – Wavelet to use in stages > 1. Must be appropriate for the dual-tree complex wavelet transform. See skued.available_dt_filters() for possible values.

  • background_regions (iterable or None, optional) –

    Indices of the array values that are known to be purely background. Depending on the dimensions of array, the format is different:

    • 1D signal: background_regions is a list of ints (indices) or slices, e.g. [0, 7, slice(534, 1000)].

    • 2D signal: background_regions is a list of tuples of ints (indices) or tuples of slices, e.g. [(14, 19), (slice(59, 82), slice(81,23))].

    Default is empty list.

  • mask (~numpy.ndarray, dtype bool, optional) – Mask array that evaluates to True for pixels that are invalid.

  • mode (str, optional) – Signal extension mode, see pywt.Modes.

  • axis (int, optional) – Axis over which to compute the wavelet transform. Default is -1

Returns:

baseline – Baseline of the input array.

Return type:

~numpy.ndarray, shape (M,N)

References