Skip to content

Commit

Permalink
make pSTIR tests_two more robust
Browse files Browse the repository at this point in the history
make test on norm of uniform image depend on computed result,
not stored result
  • Loading branch information
KrisThielemans committed Jul 8, 2024
1 parent ccd132f commit 3a05f06
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/xSTIR/pSTIR/tests/tests_two.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_main(rec=False, verb=False, throw=True):
test.check(acq_data.norm())

image = acq_data.create_uniform_image(1.0)
test.check(image.norm())
test.check_if_equal_within_tolerance(image.norm(), numpy.sqrt(numpy.prod(image.dimensions())))

acq_model = AcquisitionModelUsingRayTracingMatrix()
acq_model.set_up(acq_data, image)
Expand Down
2 changes: 0 additions & 2 deletions src/xSTIR/pSTIR/tests/tests_two.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
4.932500e+04
7.182416e+02
2.256327e+02
4.932500e+04
7.182416e+02
2.256327e+02

0 comments on commit 3a05f06

Please sign in to comment.