Commit 22a2e28b authored by Martin Reinecke's avatar Martin Reinecke
Browse files

try to fix failures

parent 9c1647e5
......@@ -1027,7 +1027,7 @@ cout << "data w range: " << wmin << " to " << wmax << endl;
y0 = -0.5*ny_dirty*psy;
double nmin = sqrt(max(1.-x0*x0-y0*y0,0.))-1.;
double dw = 0.25/abs(nmin);
size_t nplanes = max<size_t>(2,((wmax-wmin)/dw+1));
size_t nplanes = max<size_t>(2,((wmax-wmin)/dw+2));
dw=(wmax-wmin)/(nplanes-1);
auto w_supp = gconf.Supp();
......@@ -1068,7 +1068,7 @@ cout << "working on w plane #" << iw << " containing " << nvis_plane[iw]
idx_loc_.resize(nvis_plane[iw]);
auto idx_loc = mav<uint32_t,1>(idx_loc_.data(), {nvis_plane[iw]});
for (size_t ipart=0; ipart<nvis; ++ipart)
if ((iw>=minplane[ipart]) && (iw<minplane[ipart]+w_supp))
if ((int(iw)>=minplane[ipart]) && (iw<minplane[ipart]+w_supp))
{
double x=min(1.,2./(w_supp*dw)*abs(wcur-wval[ipart]));
vis_loc[cnt] = vis[ipart]*kernel(x);
......@@ -1120,7 +1120,7 @@ template<typename T> void dirty2vis_wstack(const Baselines<T> &baselines,
y0 = -0.5*ny_dirty*psy;
double nmin = sqrt(max(1.-x0*x0-y0*y0,0.))-1.;
double dw = 0.25/abs(nmin);
size_t nplanes = max<size_t>(2,((wmax-wmin)/dw+1));
size_t nplanes = max<size_t>(2,((wmax-wmin)/dw+2));
dw=(wmax-wmin)/(nplanes-1);
auto w_supp = gconf.Supp();
......@@ -1171,14 +1171,14 @@ cout << "working on w plane #" << iw << " containing " << nvis_plane[iw]
idx_loc_.resize(nvis_plane[iw]);
auto idx_loc = mav<uint32_t,1>(idx_loc_.data(), {nvis_plane[iw]});
for (size_t ipart=0; ipart<nvis; ++ipart)
if ((iw>=minplane[ipart]) && (iw<minplane[ipart]+w_supp))
if ((int(iw)>=minplane[ipart]) && (iw<minplane[ipart]+w_supp))
idx_loc[cnt++] = idx[ipart];
myassert(cnt==nvis_plane[iw],"must not happen 2");
grid2vis_c(baselines, gconf, const_mav<uint32_t,1>(idx_loc), const_mav<complex<T>,2>(grid), vis_loc, const_mav<T,1>(nullptr,{0}));
cnt=0;
for (size_t ipart=0; ipart<nvis; ++ipart)
if ((iw>=minplane[ipart]) && (iw<minplane[ipart]+w_supp))
if ((int(iw)>=minplane[ipart]) && (iw<minplane[ipart]+w_supp))
{
double x=min(1.,2./(w_supp*dw)*abs(wcur-wval[ipart]));
vis[ipart] += vis_loc[cnt]*kernel(x);
......
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