spyrit.misc.walsh_hadamard.ifwalsh2_S

spyrit.misc.walsh_hadamard.ifwalsh2_S(Y, ind=True)[source]

Inverse Fast Walsh S-transform of Y in ā€œ2Dā€

Args:

Y (np.ndarray): n-by-n signal. n**2 should be a power of two.

ind (bool, optional): True for sequency (default)

ind (list, optional): permutation indices.

Returns:

np.ndarray: n-by-1 S-transformed signal

Examples:
>>> import spyrit.misc.walsh_hadamard as wh
>>> X = np.array([[1, 3, 0, 8],[7, 5, 1, 2],[2, 3, 6, 1],[4, 6, 8, 0]])
>>> print(f"image:\n {X}")
>>> Y = wh.fwalsh2_S(X)
>>> print(f"s-transform:\n {Y}")
>>> Z = wh.ifwalsh2_S(Y)
>>> print(f"inverse s-transform:\n {Z}")

Note that the first pixel is not meaningful and arbitrily set to 0.