hotstepper.Sequency.fwt

Sequency.fwt(input_values, basis_span='post', pad_mode='constant', **kargs)

Perform a Fast Discrete Walsh Transform on the input data. This will decompose the data using Walsh basis functions and create a vector of weighting values that represent the amplitude of each Walsh basis within the data. This is the discrete step decomposition equivalent of a Discrete Fast Fourier Transform, whereby the Sine and Cosine basis functions are replaced by Walsh functions.

Parameters
  • input_values (array_like) – The data to be decomposed via Walsh functions.

  • 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.

  • kargs (any) – Key-value arguments that will be passed to the Numpy.pad function, please see the Numpy.pad documentation for further details of allowable kargs for this function.

Returns

sequencies, spectrum_amplitudes, walsh function range

Return type

tuple(array, array, int)

See also

Sequency.fft

References