function Y=wiener(X,VT,VS)
% WIENER - Wiener filtering
%
% wiener :: 
% 	[[N]]	~'signal in time domain',
%	[[M]]	~'power spectrum of input',
%	[[M]]	~'desired power spectrum of output'
% -> [[N]]	~'filtered signal in time domain'
%		:- N/2=M-1.
%
% Maps columnwise over two dimensional arrays.

V=VS./VT;
V = [V; V(end-1:-1:2,:)];

% get filtered DFT
Y=real(ifft(fft(X).*V));



