Skip to content

Commit

Permalink
Added more unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankong committed Jul 28, 2018
1 parent f8956da commit 5cc5bc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions sigpy/linop_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,26 @@ def test_Diag(self):
def test_FFT(self):

for ndim in [1, 2, 3]:
ishape = [3] * ndim
A = linop.FFT(ishape)
check_linop_linear(A)
check_linop_adjoint(A)
check_linop_unitary(A)
check_linop_pickleable(A)
for n in [3, 4, 5, 6]:
ishape = [n] * ndim
A = linop.FFT(ishape)
check_linop_linear(A)
check_linop_adjoint(A)
check_linop_unitary(A)
check_linop_pickleable(A)

def test_NUFFT(self):

for ndim in [1, 2, 3]:
ishape = [3] * ndim
coord = np.random.random([10, ndim])

A = linop.NUFFT(ishape, coord)
check_linop_linear(A)
check_linop_adjoint(A)
check_linop_pickleable(A)
for n in [3, 4, 5, 6]:
print(ndim)
ishape = [3] * ndim
coord = np.random.random([10, ndim])

A = linop.NUFFT(ishape, coord)
check_linop_linear(A)
check_linop_adjoint(A)
check_linop_pickleable(A)

def test_MatMul(self):

Expand Down
2 changes: 1 addition & 1 deletion sigpy/mri/app_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ def test_ones_JsenseRecon(self):
_app = app.JsenseRecon(ksp, mps_ker_width=6, ksp_calib_width=6)
mps_rec = _app.run()

npt.assert_allclose(mps, mps_rec.asarray(), atol=1e-1, rtol=1e-1)
npt.assert_allclose(mps, mps_rec, atol=1e-1, rtol=1e-1)

0 comments on commit 5cc5bc2

Please sign in to comment.