I am trying to figure out what normilization of the output of nufft(x,t) satisfied Parseval's theorem and am unable to figure it out. I tested uniformly sampled data and can see that nufft clearly is not normalized the same way as fft, but am unable to figure out correct normalization.
To illustrate my confusion let me first define a signal that I can calculate the energy of analytically.
sig = sqrt(2)*(A1.*cos(t*2*pi*f1) +A2.*cos(t*2*pi*f2));
Now, lets compute the non-uniform FFT of this uniform data useing nufft
Once I have computer the approximate Fourier Transform, let's calculate the power spectrum and normalize it the way FFT would require.
P_NU = abs(NUFT(round(1:L/2+1))).^2;
P_U = abs(UFT(round(1:L/2+1))).^2;
Now, lets look at Parsevals theroem
disp(['The true energy = ',num2str(E_true)])
E_t = trapz(t,sig.^2)/(dt*(L-1));
disp(['Energy in time domain = ',num2str(E_t)])
E_f_U = trapz(f,P_U)*(dt*(L-1));
disp(['Energy in freq domain (fft)= ',num2str(E_f_U)])
E_f_NU = trapz(f,P_NU)*(dt*(L-1));
disp(['Energy in freq domain (nufft)= ',num2str(E_f_NU)])
Running this code yeilds:
The true energy = 1
Energy in time domain = 1
Energy in freq domain (fft)= 1.0007
Energy in freq domain (nufft)= 0.0006591
How am I supposed to normalize the output of nufft?