Commit e87c64c2 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

compute vdot in double precision ...

parent f490d7eb
......@@ -88,7 +88,7 @@ def test_adjointness_wgridding(nxdirty, nydirty, nrow, nchan, epsilon):
@pmp("singleprec", (True, False))
@pmp("wstacking", (True, False))
def test_adjointness_wgridding_highlevel(nxdirty, nydirty, nrow, nchan, epsilon, singleprec, wstacking):
if singleprec and epsilon < 8e-5:
if singleprec and epsilon < 5e-6:
return
np.random.seed(42)
pixsizex = np.pi/180/60/nxdirty*0.2398
......@@ -115,9 +115,9 @@ def test_adjointness_wgridding_highlevel(nxdirty, nydirty, nrow, nchan, epsilon,
else:
f1 = ng.gridding_f
f2 = ng.degridding_f
dirty2 = f1(uvw, freq, vis, None, nxdirty, nydirty, pixsizex, pixsizey, epsilon, 1, 0)
vis2 = f2(uvw, freq, dirty, None, pixsizex, pixsizey, epsilon, 1, 0)
tol = 8e-5 if singleprec else 5e-13
dirty2 = f1(uvw, freq, vis, None, nxdirty, nydirty, pixsizex, pixsizey, epsilon, 1, 0).astype("f8")
vis2 = f2(uvw, freq, dirty, None, pixsizex, pixsizey, epsilon, 1, 0).astype("c16")
tol = 5e-5 if singleprec else 2e-13
assert_allclose(np.vdot(vis, vis2).real, np.vdot(dirty2, dirty),
rtol=tol)
......
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