I have a repeating fringe pattern on my data and I am trying to get it out by Fourier transforming it and deleting the pattern. However I can't seem to find the correct way back to image space.
red_cube_array = (cube_array - np.median(cube_array)) * taper
im_fft = (fftpack.fft2(red_cube_array))
im_po = fftpack.fftshift((np.conjugate(im_fft) * im_fft).real)
mask = np.empty_like(im_po[0])*0 + 1
mask[417:430, 410:421] = 0
mask[430:443, 438:450] = 0
im_po_mask = im_po * mask
im_ifft = fftpack.ifft2(fftpack.ifftshift(im_po_mask))
taper is just an array that smooths the edges to get rid of the edge effects while doing an FFT. Then I FFT the array and filter out the gunk very roughly. However going back does not seem to work. Am I tripping up somewhere?