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

Merge remote-tracking branch 'origin/tests' into one_wstacker_to_rule_them_all

parents cee943d7 9c72632c
...@@ -291,15 +291,13 @@ def test_against_wdft(nxdirty, nydirty, nchan, nrow, fov): ...@@ -291,15 +291,13 @@ def test_against_wdft(nxdirty, nydirty, nchan, nrow, fov):
nplanes = 10000 nplanes = 10000
ws = mi + np.arange(nplanes)*(ma-mi)/(nplanes-1) ws = mi + np.arange(nplanes)*(ma-mi)/(nplanes-1)
for ii in range(len(ws)-1): for ii in range(len(ws)-1):
wkp1 = ws[ii+1] wmax = ws[ii+1] if ii != nplanes-2 else ws[ii+1] + abs(ws[ii+1])
if ii == nplanes-2: wmax = ws[ii+1] if ii != nplanes-2 else np.inf
wkp1 += abs(wkp1) iind = ng.getIndices(bl, conf, flags, wmin=ws[ii], wmax=wmax)
jj = ng.getIndices(bl, conf, flags, wmin=ws[ii], wmax=wkp1) if len(iind) == 0:
if len(jj) == 0:
continue continue
dd = conf.grid2dirty_c(ng.vis2grid_c(bl, conf, jj, bl.ms2vis(ms, jj))) dd = conf.grid2dirty_c(ng.vis2grid_c(bl, conf, iind, bl.ms2vis(ms, iind)))
wforplane = 0.5*(ws[ii+1]+ws[ii]) res0 += conf.apply_wscreen(dd, 0.5*(ws[ii+1]+ws[ii]), adjoint=False).real
res0 += conf.apply_wscreen(dd, wforplane, adjoint=False).real
# Compute dft with w term # Compute dft with w term
x, y = np.meshgrid(*[-ss/2 + np.arange(ss) for ss in [nxdirty, nydirty]], x, y = np.meshgrid(*[-ss/2 + np.arange(ss) for ss in [nxdirty, nydirty]],
......
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