CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
527 stars 180 forks source link

FDK printing regardless of verbose kwarg #532

Closed gfardell closed 2 months ago

gfardell commented 3 months ago

Algorithm prints Tigre geometry and shape as default. I'm guessing this was left in from some debugging, but should probably be behind the a verbosity check.

https://github.com/CERN/TIGRE/blob/3abdda462a2216df71bb2ac2384382f45b21307b/Python/tigre/algorithms/single_pass_algorithms.py#L159-L160

casperdcl commented 3 months ago

proper solution: TIGRE should use logging.getLogger(__name__).{info,warning,debug} instead of print.

temporary end-user work-around for now:

with contextlib.redirect_stdout(io.StringIO()):
    tigre.algorithms.fdk(...)
AnderBiguri commented 3 months ago

Thanks @gfardell and @casperdcl ! indeed some leftover code, will fix "soon". Ugh, many if these silly things all the time, I need some software engineering people working on TIGRE hehe