Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ttk
radioSphere
Commits
3dcc707b
Commit
3dcc707b
authored
Oct 26, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tools/detectSpheres.py
View file @
3dcc707b
...
...
@@ -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)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment