Skip to content

Commit 01d18e1

Browse files
committed
Add some comments
1 parent a6f3c44 commit 01d18e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/lucy_richardson.jl

+4
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,21 @@ function richardson_lucy_iterative(measured, psf;
6666

6767
iter = isnothing(regularizer) ? iter_without_reg : iter_with_reg
6868

69+
# the loss function is only needed for logging, not for LR itself
6970
loss(myrec) = begin
7071
fwd = conv_temp(myrec, otf)
7172
return sum(fwd .- measured .* log.(fwd))
7273
end
7374

75+
# logging part
7476
tmp_time = 0.0
7577
if progress !== nothing
7678
record_progress!(progress, rec, 0, loss(rec), 0.0, 1.0)
7779
tmp_time=time()
7880
end
7981
code_time = 0.0
82+
83+
# do actual optimization
8084
for i in 1:iterations
8185
rec .*= iter(rec)
8286
if progress !== nothing

0 commit comments

Comments
 (0)