paranoia / PyWaveletTransform / 0.1.0

Run some discrete-wavelet-related operation over the provided input data. Input supports the following options:

  • data, a required array of numbers to operate over
  • operation, specifies what to do with the data, currently supports:
     - forward, run a forward DWT from the time domain to the frequency domain
     - reverse, run a reverse DWT from frequency to time domain
     - denoise, run a forward DWT, zero out small coefficients, then reverse the transform
  • wavelet, the wavelet type to use for the transformation, see PyWavelets documentation
  • mode, how to treat the boundaries of the finite dataset, see the PyWavelets documentation
  • threshold, the cutoff level for component magnitudes below which they're zeroed, required if denoising

For input data that is not sized as a power of 2, the data will first be decomposed into sublists of sizes that do meet that requirement, and then each component is manipulated as before.