Skip to content

Commit

Permalink
Add test for CircularConvolve with non-default h_center parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Jun 7, 2024
1 parent b5be65d commit 7391926
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scico/test/optimize/test_admm.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,11 @@ def test_admm_quadratic_matrix(self):


@pytest.mark.parametrize("extra_axis", (False, True))
@pytest.mark.parametrize("center", (None, [-1.0, 2.5]))
class TestCircularConvolveSolve:

@pytest.fixture(scope="function", autouse=True)
def setup_and_teardown(self, extra_axis):
def setup_and_teardown(self, extra_axis, center):
np.random.seed(12345)
Nx = 8
x = snp.pad(snp.ones((Nx, Nx), dtype=np.float32), Nx)
Expand All @@ -377,10 +378,7 @@ def setup_and_teardown(self, extra_axis):
x = x[np.newaxis]
psf = psf[np.newaxis]
self.A = linop.CircularConvolve(
h=psf,
input_shape=x.shape,
ndims=2,
input_dtype=np.float32,
h=psf, input_shape=x.shape, ndims=2, input_dtype=np.float32, h_center=center
)
self.y = self.A(x)
λ = 1e-2
Expand Down

0 comments on commit 7391926

Please sign in to comment.