From 52a7fab78f693c9058ec28acd0afe3c92976ba8e Mon Sep 17 00:00:00 2001 From: Josh Carmichael Date: Mon, 28 Sep 2026 11:46:24 -0400 Subject: [PATCH 1/4] Resolve test_oriented_source.py sporadic failures. Set Simulation seed and use C=1 volumes. --- tests/test_oriented_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_oriented_source.py b/tests/test_oriented_source.py index 30bb080b9f..b3e959f2fd 100644 --- a/tests/test_oriented_source.py +++ b/tests/test_oriented_source.py @@ -43,7 +43,7 @@ def src_fixture(request): estimator_kwargs.update({"n_theta": 36, "symmetry": symmetry}) # Generate an origianl source and an oriented source. - og_src = Simulation(L=L, n=n, vols=vol, offsets=0) + og_src = Simulation(L=L, n=n, vols=vol, C=1, offsets=0, seed=0) orient_est = estimator(og_src, max_shift=1 / L, mask=False, **estimator_kwargs) oriented_src = OrientedSource(og_src, orient_est) From dae1c7e05bc22b7418887c23b68183b815739c64 Mon Sep 17 00:00:00 2001 From: Josh Carmichael Date: Mon, 28 Sep 2026 11:51:47 -0400 Subject: [PATCH 2/4] Resolve test_oriented_source.py sporadic failures. Set JSync epsilon to 1e-3 for test. --- tests/test_commonline_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_commonline_utils.py b/tests/test_commonline_utils.py index bcced630a1..669d33ca01 100644 --- a/tests/test_commonline_utils.py +++ b/tests/test_commonline_utils.py @@ -98,8 +98,11 @@ def test_J_sync(dtype): Rijs_conjugated[ij] = Rij ij += 1 - # Initialize JSync instance with default params. - J_sync = JSync(n) + # Initialize JSync instance. + # For this small problem, set epsilon to 1e-3 (default is 1e-2) + # to prevent premature power method stoppage due to residual + # dipping below epsilon on a single early iteration. + J_sync = JSync(n, epsilon=1e-3) # Perform power method and check that signs are correct up to # multilication by -1. Also check dtype pass-through. From 42dbbd76bd62e583735b8c3733f64e557e878c33 Mon Sep 17 00:00:00 2001 From: Josh Carmichael Date: Mon, 28 Sep 2026 14:03:25 -0400 Subject: [PATCH 3/4] Resolve another test_oriented_source failure. C3/C4 algorithms create infeasible self-commonline search spaces for very low resolution (L=8). Setting L=12. --- tests/test_oriented_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_oriented_source.py b/tests/test_oriented_source.py index b3e959f2fd..0ec9930fb5 100644 --- a/tests/test_oriented_source.py +++ b/tests/test_oriented_source.py @@ -31,7 +31,7 @@ def src_fixture_id(params): @pytest.fixture(params=ESTIMATOR_SYMMETRY, ids=src_fixture_id) def src_fixture(request): estimator, symmetry = request.param - L = 8 + L = 12 # Must be greater than 8 for Cn algos. n = 10 vol = None From b3367bc9e0fc280924a5ec549ab8617d190762ef Mon Sep 17 00:00:00 2001 From: Josh Carmichael Date: Tue, 29 Sep 2026 09:12:57 -0400 Subject: [PATCH 4/4] Resolve test_oriented_source.py save-roundtrip failure. Failure was due to small batch size dependent errors originating in scipy fft. Caching the source avoided this. --- tests/test_oriented_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_oriented_source.py b/tests/test_oriented_source.py index 0ec9930fb5..0fa10d6c8e 100644 --- a/tests/test_oriented_source.py +++ b/tests/test_oriented_source.py @@ -138,7 +138,7 @@ def test_save(src_fixture, save_mode): Test save function and save_mode. """ - src = src_fixture[1] + src = src_fixture[1].cache() # Make a fresh tmp_dir with tempfile.TemporaryDirectory() as tmp_dir: