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

adjust tolerances

parent d55fad0c
......@@ -77,18 +77,18 @@ def test_adjointness_wgridding(nxdirty, nydirty, nrow, nchan, epsilon):
dirty2 = ng.vis2dirty_wstack(bl, conf, idx, vis)
vis2 = ng.dirty2vis_wstack(bl, conf, idx, dirty)
assert_allclose(np.vdot(vis, vis2).real, np.vdot(dirty2, dirty),
rtol=epsilon)
rtol=2e-13)
@pmp("nxdirty", (128, 300))
@pmp("nydirty", (128, 250))
@pmp("nrow", (1, 10, 10000))
@pmp("nchan", (1, 10, 100))
@pmp("epsilon", (1e-2, 1e-3, 5e-5, 1e-6, 1e-7, 2e-13))
@pmp("epsilon", (1e-2, 1e-3, 5e-5, 1e-6, 1e-7, 5e-13))
@pmp("singleprec", (True, False))
@pmp("wstacking", (True, False))
def test_adjointness_wgridding_highlevel(nxdirty, nydirty, nrow, nchan, epsilon, singleprec, wstacking):
if singleprec and epsilon < 5e-5:
if singleprec and epsilon < 8e-5:
return
np.random.seed(42)
pixsizex = np.pi/180/60/nxdirty*0.2398
......@@ -117,8 +117,9 @@ def test_adjointness_wgridding_highlevel(nxdirty, nydirty, nrow, nchan, epsilon,
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
assert_allclose(np.vdot(vis, vis2).real, np.vdot(dirty2, dirty),
rtol=epsilon)
rtol=tol)
@pmp("nxdirty", (128,))
......
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