Compute a Wavelet Transform of FileIn along the Frequency/Velocity axis. Direction indicates if a direct or inverse Wavelet transformation is applied.
If Direction = 0, the number of channels is extended to the nearest power of 2, and a direct wavelet transform is performed
If Direction > 0, an inverse wavelet transform is performed (that assumes a power of 2 in number of channels in FileIn) and the first Direction channels only are kept in FileOut.
Thus, for a data cube of Nc channels, TRANSFORM WAVE In Out 0 followed by TRANSFORM WAVE Out In Nc re-creates the original data.