TomographicImaging / CIL

A versatile python framework for tomographic imaging
https://tomographicimaging.github.io/CIL/
Apache License 2.0
97 stars 45 forks source link

Power method tolerance 1e-5 should be smaller #1982

Open MargaretDuff opened 2 hours ago

MargaretDuff commented 2 hours ago

Description

The default tolerance for the power method, used to calculate the norm of linear operators, is set to 1e-5. This is used when deciding if the calculated norm is small enough to be assumed to be zero and prevents the algorithm from diverging by dividing by zero.

https://github.com/TomographicImaging/CIL/blob/5d569dc054759a8c137ca72611fc7be07be6080e/Wrappers/Python/cil/optimisation/operators/Operator.py#L339-L345

@bosschmidt found that this incorrectly returned his operator's norm to zero, and setting the tolerance to 1e-8 eventually led to the power method calculating a correct non-zero norm value.

Perhaps this tolerance needs re-thinking.