TomographicImaging / CCPi-Regularisation-Toolkit

The set of CPU/GPU optimised regularisation modules for iterative image reconstruction and other image processing tasks
Apache License 2.0
49 stars 25 forks source link

FGP_dTV cpu nonneg enforcement not working #158

Closed mhquah closed 3 years ago

mhquah commented 3 years ago

When using FGP_dTV with pdhg, we have been trying to enforce non negative values but are still getting them. The issue does not seem to occur with FGP_TV. The PC we are testing on does not have gpu capability, so we have only been able to test cpu.

@ashgillman @paskino @epapoutsellis

mhquah commented 3 years ago

happy to submit a mwe if required

epapoutsellis commented 3 years ago

It is very strange since the constraints are here for 2D and here for 3D. Could you share some code to test?

ashgillman commented 3 years ago

I agree, I am quite unsure what's happening. Although perhaps its more pertinent to compare TV/dTV

https://github.com/vais-ral/CCPi-Regularisation-Toolkit/blob/4026724a9808cac901e73c67eb364b9b91ee2f58/src/Core/regularisers_CPU/FGP_dTV_core.c#L140

https://github.com/vais-ral/CCPi-Regularisation-Toolkit/blob/4026724a9808cac901e73c67eb364b9b91ee2f58/src/Core/regularisers_CPU/FGP_TV_core.c#L129

ashgillman commented 3 years ago

Oh my, terribly sorry @epapoutsellis , but I think the cause of this error is entirely our fault. It appears that we have made an embarrassingly simple mistake - we assumed the argument order was the same between FGP_TV and FGP_dTV. We can chat about it further on the meeting tonight (or in the morning).