Commit 3dcc707b authored by Olga Stamati's avatar Olga Stamati
Browse files

tomopack: shift zero phase angle of psi at the centre of the detector

parent 61506afe
Pipeline #78312 passed with stage
in 1 minute and 35 seconds
......@@ -133,7 +133,11 @@ def tomopack(radioMM, psiMM, maxIterations=50, l=0.1, epsilon='iterative', kTrus
# define the psi function and its FFT -- the structuring element for SR
# Start with the projection of a centred sphere
psiMM_FFT = numpy.fft.fft2(psiMM)
#psiMM_FFT = numpy.fft.fft2(psiMM)
# 2021-10-26 OS: phase shift of psi so that zero phase angle is positioned at the centre of the detector
# avoids the HACK of shifting f_x later on line 187
psiMM_FFT = numpy.fft.fft2(numpy.fft.fftshift(psiMM))
# This is comparable to Figure 7 in TomoPack
# if GRAPH:
......@@ -179,8 +183,8 @@ def tomopack(radioMM, psiMM, maxIterations=50, l=0.1, epsilon='iterative', kTrus
# if GRAPH: plt.plot(f_k,'k.')
f_k[k_trust] = f_k_naiive[k_trust]
# if GRAPH: plt.plot(f_k,'r.')
#f_x = numpy.fft.ifft2(f_k)
f_x = numpy.fft.fftshift(numpy.fft.ifft2(f_k)) # importing HACK from 1D version
f_x = numpy.fft.ifft2(f_k)
#f_x = numpy.fft.fftshift(numpy.fft.ifft2(f_k)) # importing HACK from 1D version
f_x = f_x + l*(_PI_projector(f_x) - f_x)
#print(numpy.amax(numpy.abs(f_x - f_x_old)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment