MRI reconstruction using windowing based apodization 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?
You say:


I have a 128 point one dimensional k-space samples...
The hanning window is the same size as the k-space vector (256)...


Make sure that you have the appropriate sizes in your algorithm.


Next, I convolved the k-space signal with the hanning window...


Windowing is applied in $k$-space by multiplication - you simply have to multiply your window and the original $k$-space line. In image space, this is a convolution, hence you could take the Fourier Transform of the window function and convolve the image with it. 

Another view: 
Apodization is applied to suppresses certain frequencies. For example, the highest frequencies are simply skipped by setting them to 0 due to the multiplication of the window function and the $k$-space data. If you were to convolve the two, you would "spill" the information of the higher frequencies all over $k$-space - which certainly is not what you want to achieve by apodization.