function spectrum=ft(fid,pars)
%%Usage: spectrum=ft(fid,pars)
%% Spectrum is a complex array with the frequency in
%%the first column and the real and imaginary parts
%%in the second column
%%pars(3)=centrefreq, pars(1)=SW
	spectrum=fftshift(fft(fid(:,3)+i*fid(:,2)));
	tmp=size(spectrum);%matlab workaround
	freq=linspace(pars(3)+pars(1)/2,pars(3)-pars(1)/2,tmp(1));
	spectrum=[freq' spectrum];
endfunction
