super_auto_comb.deglitch
Functions
|
Resize bounds to match arrays dimensions. |
|
Return a mask of data invalid because out of bounds. |
|
Return a mask of data from double counting. Uses numpy ptp (peak-to-peak) function. |
|
Return a mask for invalid data because f0 is out of bounds. |
|
Return a mask for data dissimila to neighbors. |
Module Contents
- super_auto_comb.deglitch.prepare_bounds(bounds, n)
Resize bounds to match arrays dimensions.
- super_auto_comb.deglitch.deglitch_from_bounds(data, bounds=(-np.inf, np.inf))
Return a mask of data invalid because out of bounds.
- Parameters:
data (array_like) – Input data
bounds (2-tuple of array-like, optional) – Lower and upper bounds for each column of the input array, by default (-np.inf, np.inf)
- Returns:
mask1 – Mask data out of bounds.
- Return type:
array
- super_auto_comb.deglitch.deglitch_from_double_counting(data, threshold=0.2, glitch_ext=3)
Return a mask of data from double counting. Uses numpy ptp (peak-to-peak) function.
- Parameters:
data (array_like) – Input data_
threshold (float, optional) – double counting threshold, by default 0.2
glitch_ext (int, optional) – Extend glitch to neighbourg points, by default 3
- Returns:
mask2 – Mask data for glitches detected by double counting.
- Return type:
array
- super_auto_comb.deglitch.deglitch_from_f0(f0, f0_nominal, threshold=0.25)
Return a mask for invalid data because f0 is out of bounds.
- Parameters:
f0 (array_like, 1d) – array of f0 values in Hz
f0_nominal (float or Decimal) – nominal f0 value in Hz
threshold (float, optional) – Threshold value in Hz, by default 0.25
- Returns:
mask3 – mask data for f0 out of bounds.
- Return type:
array
- super_auto_comb.deglitch.deglitch_from_median_filter(f_beat, premask, median_window=60, median_threshold=250.0, glitch_ext=3)
Return a mask for data dissimila to neighbors.
- Parameters:
f_beat (array_like) – Input data
premask (array_like) – Mask to apply to input data (from other deglitch functions)
median_window (int, optional) – Number of point over calculating rolling median filter, by default 60
median_threshold (float, optional) – Threshold value in Hz, by default 250.
glitch_ext (int, optional) – Extend glitch to neighbourg points, by default 3
- Returns:
_description_
- Return type:
_type_