I am trying to apply windowing to do MRI reconstruction. I have a 256 point one dimensional k-space samples which look as follows:
Here, the real part(green) is flat around 0 and the blue curve is the imaginary part. Now, what I would like to do is perform some apodization. For this, I construct a hanning window as follows:
from scipy import signal win = signal.hann(256) # sig is the sig = signal.convolve(sig, win, mode='same') / sum(win)
The hanning window is the same size as the k-space vector (256). Next, I convolved the k-space signal with the hanning window, which looks like:
Next, I performed the inverse fft to reconstruct the image (which should have near uniform intensity everywhere) using:
from scipy import fftpack rec = np.abs(fftpack.ifftshift(fftpack.ifftn(sig)))
This results in the recon image as:
I feel I have done something wrong as I was expecting to have a fairly uniform image rather than a spike. Do I need to do something post reconstruction to account for the fact that I have performed some windowing before the reconstruction?