Commit 72de39d7 authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixups

parent de423302
......@@ -221,7 +221,7 @@ def test_no_correlation(nrow, nchan, epsilon, weight):
np.random.seed(42)
bl, conf, idx = _init_gridder(128, 128, epsilon, nchan, nrow)
wgt = np.random.rand(*idx.shape) if weight else None
w = conf.W()
w = conf.Supp()
for uu in range(-2*w, 2*w):
for vv in range(-2*w, 2*w):
if abs(uu) >= w or abs(vv) >= w:
......@@ -236,18 +236,13 @@ def test_no_correlation(nrow, nchan, epsilon, weight):
@pmp('nydirty', [4, 12, 128])
@pmp("nrow", (10, 100))
@pmp("nchan", (1, 10))
@pmp("complex_mode", (False, True))
def test_against_dft(nxdirty, nydirty, epsilon, nchan, nrow, complex_mode):
def test_against_dft(nxdirty, nydirty, epsilon, nchan, nrow):
bl, conf, idx = _init_gridder(nxdirty, nydirty, epsilon, nchan, nrow)
ms = np.random.rand(nrow, nchan)-0.5 + 1j*(np.random.rand(nrow, nchan)-0.5)
vis = bl.ms2vis(ms, idx)
uvw = bl.effectiveuvw(idx)
if complex_mode:
res0 = conf.grid2dirty_c(ng.vis2grid_c(bl, conf, idx, vis))
res1 = _dft(uvw, vis, conf, False)
else:
res0 = conf.grid2dirty(ng.vis2grid(bl, conf, idx, vis))
res1 = _dft(uvw, vis, conf, False).real
res0 = conf.grid2dirty_c(ng.vis2grid_c(bl, conf, idx, vis))
res1 = _dft(uvw, vis, conf, False)
assert_(_l2error(res0, res1) < epsilon)
......
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