hotstepper.Sequency.denoise

Sequency.denoise(input_values, method='walsh', basis_span='post', pad_mode='constant', denoise_mode='value', denoise_strength=0.5)

Perform a denoise operation on the input_values using either Walsh or Fourier method.

Parameters
  • input_values (array_like) – The data to be denoised via Walsh transform.

  • method ({'walsh', 'fourier}, Optional) –

    The denoise method to apply to the data.
    • walsh, use a Walsh decomposition to produce the components to modify for denoising.

    • fourier, use a Fourier decomposition to produce the components to modify for denoising.

  • basis_span ({'post','pre'}, Optional) –

    How long the Walsh basis functions should be relative to the input data.
    • post will extend the Walsh basis to the next length beyond the input data length that is a power of 2.

    • pre will truncate the Walsh basis to the next length less than the input data length that is a power of 2.

  • pad_mode ({None, 'edge','constant'}, Optional) –

    This is how the input data is to be padded to match the requirement of each Walsh basis being a length which is a power of 2.

    Note

    The allowable parameters are the same as those for the Numpy.pad function and therefore any valid mode string or function can be used here and it will be passed to the Numpy.pad function.

  • denoise_mode ({'range', 'value'}, Optional) –

    The type of filtering to use.
    • range will remove a proportion of the higher sequency/frequency components based on the denoise_strength value.

    • value will remove the sequency/frequency components that are below the value based on the denoise_strength.

denoise_strengthfloat, Optional

The strength of the denoising, this parameter controls how the components are altered in order to denoise the input_data.

Returns

denoised data

Return type

array