Skip to content
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
7 changes: 5 additions & 2 deletions tests/test_commonline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions tests/test_oriented_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

Expand Down Expand Up @@ -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:
Expand Down
Loading