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

Merge branch 'more_weights' of into more_weights

parents 3fffc031 f88d6721
......@@ -242,11 +242,15 @@ def test_correlations(nxdirty, nydirty, nrow, nchan, epsilon, du, dv):
idx = ng.getIndices(baselines, conf, flags)
y0 = ng.get_correlations(baselines, conf, idx, du, dv)
pts = ((nxdirty, nydirty), (nxdirty + 1, nydirty), (nxdirty//2,
pts = ((nxdirty, nydirty),
(nxdirty + 1, nydirty),
(nxdirty, nydirty//2),
(0, 0),
(2*nxdirty-1, 2*nydirty-1))
for pp in pts:
grid = np.zeros((2*nxdirty, 2*nydirty))
grid[pp[0], pp[1]] = 1
y1 = ng.apply_holo(baselines, conf, idx.copy(), grid.copy()).copy()
assert_allclose(y0[pp], y1[(pp[0] + du, pp[1] + dv)].real)
assert_allclose(0*y1, y1.imag, atol=1e-16)
grid[pp] = 1
y1 = ng.apply_holo(baselines, conf, idx, grid)
ind = (pp[0]+du) % (2*nxdirty), (pp[1]+dv) % (2*nydirty)
assert_allclose(y0[pp], y1[ind].real)
assert_allclose(np.zeros_like(y1), y1.imag)
Supports Markdown
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