Commit 2fe1cc19 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'powergrid' into better_params

parents a0bb6c79 8f44eb9b
......@@ -711,7 +711,7 @@ template<typename T> pyarr_c<uint32_t> getIndices(const Baselines<T> &baselines,
vector<uint32_t> acc(nbu*nbv+1, 0);
vector<uint32_t> tmp(nrow*(chend-chbegin));
for (size_t irow=0, idx=0; irow<nrow; ++irow)
for (int ichan=chbegin; ichan<chend; ++ichan, ++idx)
for (int ichan=chbegin; ichan<chend; ++ichan)
if (!flags[irow*nchan+ichan])
{
auto uvw = baselines.effectiveCoord(irow, ichan);
......@@ -723,7 +723,7 @@ template<typename T> pyarr_c<uint32_t> getIndices(const Baselines<T> &baselines,
iu0 = (iu0+nsafe)>>logsquare;
iv0 = (iv0+nsafe)>>logsquare;
++acc[nbv*iu0 + iv0 + 1];
tmp[idx] = nbv*iu0 + iv0;
tmp[idx++] = nbv*iu0 + iv0;
}
}
......@@ -732,9 +732,13 @@ template<typename T> pyarr_c<uint32_t> getIndices(const Baselines<T> &baselines,
auto res = makearray<uint32_t>({acc.back()});
auto iout = res.mutable_data();
for (size_t irow=0, idx=0; irow<nrow; ++irow)
for (int ichan=chbegin; ichan<chend; ++ichan, ++idx)
for (int ichan=chbegin; ichan<chend; ++ichan)
if (!flags[irow*nchan+ichan])
iout[acc[tmp[idx]]++] = irow*nchan+ichan;
{
auto uvw = baselines.effectiveCoord(irow, ichan);
if ((uvw.w>=wmin) && (uvw.w<wmax))
iout[acc[tmp[idx++]]++] = irow*nchan+ichan;
}
return res;
}
......
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