CIL
CIL copied to clipboard
TotalVariation proximal in place
TotalVariation proximal is not calculated in place correctly. This was spotted when trying to run SIRT with a TV constraint in https://github.com/TomographicImaging/CIL/issues/1514.
data = dataexample.SIMPLE_PHANTOM_2D.get(size=(128,128))
plt.figure()
plt.imshow(data.as_array())
plt.show()
out=data.geometry.allocate('random')
TotalVariation().proximal(data, tau=1, out=out)
plt.figure()
plt.imshow(out.as_array())
plt.show()
gives
data = dataexample.SIMPLE_PHANTOM_2D.get(size=(128,128))
plt.figure()
plt.imshow(data.as_array())
plt.show()
TotalVariation().proximal(data, tau=1, out=data)
plt.figure()
plt.imshow(data.as_array())
plt.show()
gives
Need to also test with strong convexity constant >0