odlgroup / odl

Operator Discretization Library https://odlgroup.github.io/odl/
Mozilla Public License 2.0
374 stars 105 forks source link

Do ADMM and PDHG algorithms have positivity constraints or padding? #1611

Open ndjurabe opened 3 years ago

ndjurabe commented 3 years ago

So I've been trying to reconstruct some tomo data that has negative values and while I get a pretty nice results with fbp, when I try to run either the ADMM or the PDHG algorithms with the same data, I get only positive results (the exact values vary but mainly increase with the number of iterations) that look somewhat like unfiltered backprojection, even with a very small regularization parameter (1e-50): FBP reconstruction on the left and ADMM reconstruction on the right (PDHG gives a very similar result to ADMM) image I can restrict the reconstruction space a bit to get rid of the dark corners and get a slightly better contrast but it does not significantly improve the results. I followed the pdhg and admm example codes pretty closely, and tried also to replace the f functional by a [-1,1] box constraint but that seemingly made no difference.

# Stacking of the two operators
L = odl.BroadcastOperator(ray_trafo, grad)

# Data matching and regularization functionals
data_fit = odl.solvers.L2NormSquared(ray_trafo.range).translated(data)
reg_func = 1e-50 * odl.solvers.L2Norm(grad.range)
g = odl.solvers.SeparableSum(data_fit, reg_func)

# We don't use the f functional, setting it to zero
f = odl.solvers.IndicatorBox(L.domain, lower = -1, upper = 1)#odl.solvers.ZeroFunctional(L.domain)

I tried to investigate the proximal operators and the admm/pdhg code but haven't yet found the answer. Is there something I am missing?