Skip to content

Commit

Permalink
Only redraw the convergence plot when its has new values
Browse files Browse the repository at this point in the history
  • Loading branch information
samtygier-stfc committed Jan 3, 2025
1 parent 86d46c0 commit 7abe1a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mantidimaging/core/reconstruct/cil_recon.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def __init__(self, verbose=1, progress: Progress | None = None) -> None:

def __call__(self, algo: Algorithm) -> None:
if self.progress:
extra_info = {'iterations': algo.iterations, 'losses': algo.loss}
extra_info = {}
if algo.iterations and algo.iterations[-1] == algo.iteration:
extra_info = {'iterations': algo.iterations, 'losses': algo.loss}
if algo.last_residual and algo.last_residual[0] == algo.iteration:
extra_info["residual"] = algo.last_residual[1]
self.progress.update(
Expand Down

0 comments on commit 7abe1a0

Please sign in to comment.