Skip to content

Commit

Permalink
Fix(align_tpm): forgotten trace
Browse files Browse the repository at this point in the history
  • Loading branch information
balbasty committed Oct 16, 2024
1 parent b4759c5 commit 21fb163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nitorch/tools/registration/affine_tpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def fit_affine_tpm(dat, tpm, affine=None, affine_tpm=None, weights=None,
end = '\n' if verbose >= 2 else '\r'
print(f'({basis_name[:6]}){space} | {n_iter:02d} | {mi.mean():12.6g}', end=end)

if mi.mean() - mi0.mean() < 0: #1e-4:
if mi.mean() - mi0.mean() < 1e-4:
print('converged', mi.mean() - mi0.mean())
break

Expand Down Expand Up @@ -442,7 +442,7 @@ def fit_affine_tpm(dat, tpm, affine=None, affine_tpm=None, weights=None,
h.diagonal(0, -1, -2).add_(h.diagonal(0, -1, -2).abs().max() * 1e-5)
delta = lmdiv(h, g.unsqueeze(-1)).squeeze(-1)

plot_registration(dat, mov, f'{basis_name} | {n_iter}')
# plot_registration(dat, mov, f'{basis_name} | {n_iter}')

if verbose == 1:
print('')
Expand Down

0 comments on commit 21fb163

Please sign in to comment.