-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NDFT tests #96
Fix NDFT tests #96
Conversation
|
||
|
||
@parametrize_with_cases( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is bad. Removed it :P
@@ -76,7 +53,32 @@ def test_ndft_implicit1(kspace, shape): | |||
linop_coef = implicit_type1_ndft(kspace, random_kspace.flatten(), shape) | |||
matrix_coef = matrix.conj().T @ random_kspace.flatten() | |||
|
|||
assert np.allclose(linop_coef, matrix_coef) | |||
assert_almost_allclose(linop_coef, matrix_coef, atol=1e-4, rtol=1e-4, mismatch=5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is good, so added it :P
Good catch ! could you detail a bit which things were wrong (and why) ? |
@paquiteau Ill let you add this test for CD! I think that its good practice to run it before every release. (More importantly, we need to make it run right now to make sure the tests run fine.) |
Can i merge when green? @paquiteau |
The fixes include:
ortho
, this is important as mostly all NUFFT is normalized.test_ndft_grid_matrix
, which tries o get the FFT matrix and match to a gridded NDFT matrix. But this is too complex and not generalizable currently. The test seems redundant so I removed it.