Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
irp
HoloTomoToolbox
Commits
5dde03b4
Commit
5dde03b4
authored
Jan 28, 2020
by
Leon Merten Lohse
Browse files
Fix support constraint in phaserec_nonlinTikhonov
The support mask for the initial guess was not padded.
parent
42e92497
Pipeline
#120044
passed with stage
in 1 minute and 48 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
functions/phaseRetrieval/holographic/phaserec_ctf.m
View file @
5dde03b4
...
...
@@ -280,7 +280,7 @@ if doIterativeOptimization
proxConstraints
=
@
(
f
,
tau
)
proxMax
(
proxMin
(
proxSupport
(
f
)))
;
%
Compute
minimizer
using
a
fast
ADMM
algorithm
[
result
,
stats
]
=
fADMM
(
proxConstraints
,
proxCTF
,
...
[
result
,
~
]
=
fADMM
(
proxConstraints
,
proxCTF
,
...
zeros
(
size
(
sumCTFHolograms
)
,
class
(
sumCTFHolograms
))
,
...
settings
.
optimization
)
;
...
...
functions/phaseRetrieval/holographic/phaserec_nonlinTikhonov.m
View file @
5dde03b4
...
...
@@ -184,7 +184,7 @@ end
% Optional padding of holograms (and of optional support)
holograms
=
padarray
(
gpuArrayIf
(
holograms
,
useGPU
),
[
settings
.
pady
settings
.
padx
],
'replicate'
);
if
~
isempty
(
settings
.
support
)
support
=
padarray
(
gpuArrayIf
(
settings
.
support
,
useGPU
),
[
settings
.
pady
settings
.
padx
]);
settings
.
support
=
padarray
(
gpuArrayIf
(
settings
.
support
,
useGPU
),
[
settings
.
pady
settings
.
padx
]);
end
N
=
size
(
holograms
(:,:,
1
));
...
...
@@ -194,7 +194,6 @@ N = size(holograms(:,:,1));
% ----------------------------------------------------------------------------------------------- %
% --------- Step 1: perform CTF-reconstruction to obtain initial guess (if not assigned) -------- %
% ----------------------------------------------------------------------------------------------- %
settingsCTF
=
settings
;
settingsCTF
.
padx
=
0
;
% Holograms are already padded,
settingsCTF
.
pady
=
0
;
% so no more padding necessary
...
...
@@ -257,8 +256,7 @@ if settings.minPhase > -inf || settings.maxPhase < inf || ~isempty(settings.supp
projMax
=
Id
;
end
if
numel
(
settings
.
support
)
% If padding is applied to the data, the support has to be padded as well
projSupport
=
@
(
f
)
support
.*
f
;
projSupport
=
@
(
f
)
settings
.
support
.*
f
;
else
projSupport
=
Id
;
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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