Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_SIRF.py to latest signature of Algorithm run method #2071

Merged
merged 3 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* XX.X
- Bug fixes:
- Fix deprecation warning for rtol and atol in GD (#2056)
- Removed the deprecated usage of run method in test_SIRF.py (#2070)


* 24.3.0
Expand Down
8 changes: 4 additions & 4 deletions Wrappers/Python/test/test_SIRF.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ def test_TVdenoisingMR(self):

# compare with FISTA algorithm
f = 0.5 * L2NormSquared(b=self.image1)
fista = FISTA(initial=self.image1*0.0, f=f, g=TV, max_iteration=10, update_objective_interval=10)
fista.run(verbose=0)
fista = FISTA(initial=self.image1*0.0, f=f, g=TV, update_objective_interval=10)
fista.run(10, verbose=0)
np.testing.assert_array_almost_equal(fista.solution.as_array(), res2.as_array(), decimal=3)


Expand Down Expand Up @@ -533,8 +533,8 @@ def test_SIRF_CIL_MLEM(self):
trunc.apply(initial_image)

ista = ISTA(initial = initial_image, f = obj_fun, g = IndicatorBox(lower=0.), step_size = -1.0,
preconditioner=sens,update_objective_interval=1, max_iteration=10)
ista.run(verbose=0)
preconditioner=sens,update_objective_interval=1)
ista.run(10, verbose=0)

print("adad")
np.testing.assert_allclose(ista.solution.as_array()[0], reconstructed_image.as_array()[0], rtol=1e-3)
Loading