Commit 9e7a343d authored by Martin Reinecke's avatar Martin Reinecke

fix

parent 773ac355
Pipeline #46667 passed with stages
in 8 minutes and 29 seconds
......@@ -38,16 +38,16 @@ def test_gridding(nu, nv, N):
# re-order for performance
idx = GM.getReordering(uv)
uv, vis = uv[idx], vis[idx]
vis = ift.from_global_data(ift.UnstructuredDomain(vis.shape), vis)
vis2 = ift.from_global_data(ift.UnstructuredDomain(vis.shape), vis)
Op = GM.getFull(uv)
pynu = Op(vis).to_global_data()
pynu = Op(vis2).to_global_data()
# DFT
x, y = np.meshgrid(
*[-ss/2 + np.arange(ss) for ss in [nu, nv]], indexing='ij')
dft = pynu*0.
for i in range(N):
dft += (vis.val[i]*np.exp(2j*np.pi*(x*uv[i, 0] + y*uv[i, 1]))).real
dft += (vis[i]*np.exp(2j*np.pi*(x*uv[i, 0] + y*uv[i, 1]))).real
assert_allclose(dft, pynu)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment