Skip to content
Snippets Groups Projects
Commit f413ca44 authored by Andre Offringa's avatar Andre Offringa
Browse files

Task #11550: Making smoothness constraint work with multiple pol, clean-up of SetWeights method

parent a5b18bfe
No related branches found
No related tags found
No related merge requests found
......@@ -37,21 +37,20 @@ std::vector<Constraint::Result> SmoothnessConstraint::Apply(
std::vector<std::vector<dcomplex> >& solutions, double, std::ostream*)
{
std::vector<dcomplex> data(solutions.size());
const size_t thread =
#ifdef AOPROJECT
omp_get_thread_num();
#else
LOFAR::OpenMP::threadNum();
#endif
const size_t nPol = solutions.size() / (_nAntennas*_nDirections);
#pragma omp parallel for
for(size_t antDirIndex = 0; antDirIndex<_nAntennas*_nDirections; ++antDirIndex)
{
#ifdef AOPROJECT
const size_t thread = omp_get_thread_num();
#else
const size_t thread = LOFAR::OpenMP::threadNum();
#endif
size_t antIndex = antDirIndex / _nDirections;
for(size_t pol = 0; pol!=nPol; ++pol)
{
size_t solutionIndex = antDirIndex*4 + pol;
size_t solutionIndex = antDirIndex*nPol + pol;
for(size_t ch=0; ch!=_nChannelBlocks; ++ch)
{
// Flag channels where calibration yielded inf or nan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment