spyrit.misc.walsh_hadamard.iwalsh_S
- spyrit.misc.walsh_hadamard.iwalsh_S(s, T=None)[source]
Return the inverse Walsh S-transform of s
- Args:
x (np.ndarray): n-by-1 signal. n+1 should be a power of two.
- Returns:
np.ndarray: n-by-1 inverse transformed signal
- Examples:
Inverse S-transform of a 4095-by-1 signal
>>> import spyrit.misc.walsh_hadamard as wh >>> import numpy as np >>> x = np.random.rand(4095,1) >>> s = wh.walsh_S(x) >>> y = wh.iwalsh_S(s) >>> err = np.linalg.norm(1-y/x) >>> print(f'Error: {err}')