reduce_tonal_noise_running_mean
- ketos.audio.utils.filter.reduce_tonal_noise_running_mean(img, time_const_len)[source]
Reduce continuous tonal noise produced by e.g. ships and slowly varying background noise by subtracting from each row a running mean, computed according to the formula given in Baumgartner & Mussoline, Journal of the Acoustical Society of America 129, 2889 (2011); doi: 10.1121/1.3562166
- Args:
- img: numpy.array
Spectrogram image
- time_const_len: int
Time constant in number of samples, used for the computation of the running mean. Must be provided if the method ‘RUNNING_MEAN’ is chosen.
- Returns:
- img_new2d numpy array
Corrected spetrogram image