Commit 5fac0090 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fix an oversight which led to unnecessarily many w planes

parent bb244222
Pipeline #80189 failed with stages
in 18 minutes and 36 seconds
......@@ -288,6 +288,7 @@ template<typename T> class GridderConfig
size_t Supp() const { return supp; }
size_t Nsafe() const { return nsafe; }
size_t Nthreads() const { return nthreads; }
double Ofactor() const { return ofactor; }
void grid2dirty_post(mav<T,2> &tmav,
mav<T,2> &dirty) const
......@@ -1079,7 +1080,7 @@ template<typename T, typename Serv> class WgridHelper
double nmin = sqrt(max(1.-x0*x0-y0*y0,0.))-1.;
if (x0*x0+y0*y0>1.)
nmin = -sqrt(abs(1.-x0*x0-y0*y0))-1.;
dw = 0.25/abs(nmin);
dw = 0.5/gconf.Ofactor()/abs(nmin);
nplanes = size_t((wmax-wmin)/dw+supp);
wmin = (wmin+wmax)*0.5 - 0.5*(nplanes-1)*dw;
if (verbosity>0) cout << "Kernel support: " << supp << endl;
......
......@@ -91,7 +91,9 @@ def test_adjointness_ms2dirty(nxdirty, nydirty, ofactor, nrow, nchan, epsilon,
pixsizey, nu, nv, epsilon, wstacking, nthreads, 0).astype("f8")
ms2 = ng.dirty2ms(uvw, freq, dirty, wgt, pixsizex, pixsizey, nu, nv, epsilon,
wstacking, nthreads, 0).astype("c16")
tol = 5e-4 if singleprec else 5e-11
ref = max(np.vdot(ms,ms).real, np.vdot(ms2,ms2).real,
np.vdot(dirty, dirty), np.vdot(dirty2, dirty2))
tol = 1e-5*ref if singleprec else 1e-13*ref
assert_allclose(np.vdot(ms, ms2).real, np.vdot(dirty2, dirty), rtol=tol)
......
......@@ -565,9 +565,11 @@ const vector<NESdata> NEScache {
{15, 1.90, 4.407902e-14, 2.2222258168, 0.5056705159},
{15, 1.95, 2.6655793e-14, 2.2419149837, 0.5057005374},
{15, 2.00, 1.7108261e-14, 2.2390528894, 0.5072248580},
{16, 1.15, 4.5498331e-08, 1.7085132020, 0.5052624971},
{16, 1.20, 4.3986374e-09, 1.7630310045, 0.5055047860},
{16, 1.25, 6.1272681e-10, 1.7998874282, 0.5066934971},
// Some of the support=16 kernels have such a high dynamic range that cutoff
// errors become significant. Let's disable these.
//{16, 1.15, 4.5498331e-08, 1.7085132020, 0.5052624971},
//{16, 1.20, 4.3986374e-09, 1.7630310045, 0.5055047860},
//{16, 1.25, 6.1272681e-10, 1.7998874282, 0.5066934971},
{16, 1.30, 1.1509596e-10, 1.7892839755, 0.5122877693},
{16, 1.35, 3.2440049e-11, 1.8914441282, 0.5063521839},
{16, 1.40, 8.4329616e-12, 1.9296369098, 0.5065170208},
......
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