From cee943d74a60347d7182a6c6a85e1b1ea9e73ee9 Mon Sep 17 00:00:00 2001 From: Martin Reinecke <martin@mpa-garching.mpg.de> Date: Thu, 22 Aug 2019 16:47:01 +0200 Subject: [PATCH] fixes --- nifty_gridder.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nifty_gridder.cc b/nifty_gridder.cc index 50fe3bd..f597b1f 100644 --- a/nifty_gridder.cc +++ b/nifty_gridder.cc @@ -1474,7 +1474,7 @@ template<typename T> pyarr_c<complex<T>> vis2dirty_wstack(const Baselines<T> &ba size_t nvis = size_t(vis_.shape(0)); checkArray(idx_, "idx", {nvis}); auto vis=vis_.template unchecked<1>(); - auto idx = idx_.template unchecked<1>(); + auto idx=idx_.template unchecked<1>(); // determine w values for every visibility, and min/max w; T wmin=T(1e38), wmax=T(-1e38); @@ -1534,7 +1534,8 @@ cout << "working on w plane #" << iw << endl; if (abs(wcur-wval[ipart]) < dwmax) { double x=2./(w_supp*dw)*abs(wcur-wval[ipart]); - vis_loc[cnt] = vis[ipart]*exp(beta*sqrt(1.-x*x)); +myassert(cnt<nvis_plane[iw],"must not happen"); + vis_loc[cnt] = vis[ipart]*exp(beta*(sqrt(1.-x*x)-1.)); idx_loc[cnt] = idx[ipart]; ++cnt; } -- GitLab