wet_dry

cnn

stft

pycomlink.processing.wet_dry.stft.find_lowest_std_dev_period(rsl, window_length=600)

Find beginning and end of dry period

Parameters:
  • rsl (iterable of float) – Time series of received signal level

  • window_length (int, optional) – Length of window for identifying dry period (Default is 600)

Returns:

  • int – Index of beginning of dry period

  • int – Index of end of dry period

pycomlink.processing.wet_dry.stft.nans(shape, dtype=<class 'float'>)

Helper function for wet/dry classification

pycomlink.processing.wet_dry.stft.stft_classification(rsl, window_length, threshold, f_divide, t_dry_start=None, t_dry_stop=None, dry_length=None, mirror=False, window=None, Pxx=None, f=None, f_sampling=0.016666666666666666)

Perform wet/dry classification with Rolling Fourier-transform method

Parameters:
  • rsl (iterable of float) – Time series of received signal level

  • window_length (int) – Length of the sliding window

  • threshold (int) – Threshold which has to be surpassed to classifiy a period as ‘wet’

  • f_divide (float) – Parameter for classification with method Fourier transformation

  • t_dry_start (int) – Index of starting point dry period

  • t_dry_stop (int) – Index of end of dry period

  • dry_length (int) – Length of dry period that will be automatically identified in the provided rsl time series

  • mirror (bool (defaults to False)) – Mirroring values in window at end of time series

  • window (array of float, optional) – Values of window function. If not given a Hamming window function is applied (Default is None)

  • Pxx (2-D array of float, optional) – Spectrogram used for the wet/dry classification. Gets computed if not given (Default is None)

  • f (array of float, optional) – Frequencies corresponding to the rows in Pxx. Gets computed if not given. (Default is None)

  • f_sampling (float, optional) – Sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. (Default is 1/60.0)

  • mirror (bool)

Returns:

  • iterable of int – Time series of wet/dry classification

  • dict – Dictionary holding information about the classification

Note

Implementation of Rolling Fourier-transform method [2]

References