diff --git a/CEP/DP3/DPPP/include/DPPP/OneApplyCal.h b/CEP/DP3/DPPP/include/DPPP/OneApplyCal.h index 5f01b6662614eb4e89ffbbb9f7fcbf5494220b5a..3d7b4c249a440612c00daf2cd088ac346e32e29c 100644 --- a/CEP/DP3/DPPP/include/DPPP/OneApplyCal.h +++ b/CEP/DP3/DPPP/include/DPPP/OneApplyCal.h @@ -108,6 +108,7 @@ namespace LOFAR { H5Parm itsH5Parm; string itsSolTabName; H5Parm::SolTab itsSolTab; + H5Parm::SolTab itsSolTab2; // in the case of full Jones, amp and phase table need to be open CorrectType itsCorrectType; bool itsInvert; uint itsTimeSlotsPerParmUpdate; diff --git a/CEP/DP3/DPPP/src/OneApplyCal.cc b/CEP/DP3/DPPP/src/OneApplyCal.cc index b0a2202b62cabfa9e76ded42444cd307f883592a..421a9891899dd7644c7907a0aae351ca9befdfdc 100644 --- a/CEP/DP3/DPPP/src/OneApplyCal.cc +++ b/CEP/DP3/DPPP/src/OneApplyCal.cc @@ -101,9 +101,14 @@ namespace LOFAR { itsSolTabName = (parset.isDefined(prefix + "correction") ? parset.getString(prefix + "correction") : parset.getString(defaultPrefix + "correction")); - - itsSolTab = itsH5Parm.getSolTab(itsSolTabName); itsCorrectType = stringToCorrectType(itsSolTab.getType()); + if(itsCorrectType == FULLJONES) + { + itsSolTab = itsH5Parm.getSolTab("amplitude"); + itsSolTab2 = itsH5Parm.getSolTab("phase"); + } + else + itsSolTab = itsH5Parm.getSolTab(itsSolTabName); if (itsCorrectType==PHASE && nPol("")==1) { itsCorrectType = SCALARPHASE; } @@ -448,7 +453,7 @@ namespace LOFAR { #pragma omp critical(updateH5ParmValues) { // TODO: understand polarization etc. - ASSERT(itsParmExprs.size()==1 || itsParmExprs.size()==2); + // ASSERT(itsParmExprs.size()==1 || itsParmExprs.size()==2); // Figure out whether time or frequency is first axis bool freqvariesfastest = true; @@ -469,12 +474,28 @@ namespace LOFAR { } for (uint ant = 0; ant < numAnts; ++ant) { - for (uint pol=0; pol<itsParmExprs.size(); ++pol) { - parmvalues[pol][ant] = itsSolTab.getValuesOrWeights("val", - info().antennaNames()[ant], - times, freqs, - pol, itsDirection); - } + if(itsCorrection == FULLJONES) + { + for (uint pol=0; pol<4; ++pol) { + // Place amplitude in even and phase in odd elements + parmvalues[pol*2][ant] = itsSolTab.getValuesOrWeights("val", + info().antennaNames()[ant], + times, freqs, + pol, itsDirection); + parmvalues[pol*2+1][ant] = itsSolTab2.getValuesOrWeights("val", + info().antennaNames()[ant], + times, freqs, + pol, itsDirection); + } + } + else { + for (uint pol=0; pol<itsParmExprs.size(); ++pol) { + parmvalues[pol][ant] = itsSolTab.getValuesOrWeights("val", + info().antennaNames()[ant], + times, freqs, + pol, itsDirection); + } + } } } // End pragma omp critical } else { // Use ParmDB