Thresholding functions

The thresholding helper module implements the most popular signal thresholding functions.

Hard thresholding

hard(data, value[, substitute=0])

Hard thresholding. Replace all data values with substitute where their absolute value is less than the value param.

Data values with absolute value greater or equal to the thresholding value stay untouched.

Parameters:
  • data – numeric data
  • value – thresholding value
  • substitute – substitute value
Returns:

array

Soft thresholding

soft(data, value[, substitute=0])

Soft thresholding.

Parameters:
  • data – numeric data
  • value – thresholding value
  • substitute – substitute value
Returns:

array

Greater

greater(data, value[, substitute=0])

Replace data with substitute where data is below the thresholding value.

Greater data values pass untouched.

Parameters:
  • data – numeric data
  • value – thresholding value
  • substitute – substitute value
Returns:

array

Less

less(data, value[, substitute=0])

Replace data with substitute where data is above the thresholding value.

Less data values pass untouched.

Parameters:
  • data – numeric data
  • value – thresholding value
  • substitute – substitute value
Returns:

array