Commits

Bob Garwood authored be7a26ee503
CAS-12545: try to only emit IF transfer switching warning once for a given antenna name
No tags

code/nrao/VLA/VLAFiller.cc

Modified
889 889 DebugAssert(nAnt == 1, AipsError);
890 890 return true;
891 891 }
892 892
893 893 // Check if the transfer switch is only set on some antennas. If so warn
894 894 // the user that the polarisation may be misslabeled
895 895 {
896 896 const Stokes::StokesTypes ant0Pol = itsRecord.ADA(0).ifPol(VLAEnum::IFA);
897 897 for (uInt a = 1; a < nAnt; a++) {
898 898 if (itsRecord.ADA(a).ifPol(VLAEnum::IFA) != ant0Pol) {
899 - itsLog << LogIO::WARN
900 - << "The IF transfer switch for antenna "
901 - << itsRecord.ADA(a).antName(itsNewAntName)
902 - << " is different from the setting for antenna "
903 - << itsRecord.ADA(0).antName(itsNewAntName) << "." << endl
904 - << "Correlations involving this antenna may have "
905 - << "incorrect polarisation labelling."
906 - << LogIO::POST;
899 + // only warn if there's been no warning on this antenna yet - only ants with warnings are ever here
900 + if (itsTransferWarned.count(itsRecord.ADA(a).antName(itsNewAntName)) == 0) {
901 + itsLog << LogIO::WARN
902 + << "The IF transfer switch for antenna "
903 + << itsRecord.ADA(a).antName(itsNewAntName)
904 + << " is different from the setting for antenna "
905 + << itsRecord.ADA(0).antName(itsNewAntName) << "." << endl
906 + << "Correlations involving this antenna may have "
907 + << "incorrect polarisation labelling."
908 + << LogIO::POST;
909 + itsTransferWarned[itsRecord.ADA(a).antName(itsNewAntName)] = true;
910 + }
907 911 }
908 912 }
909 913 }
910 914
911 915 // Now sort out the polarisation subtable
912 916 if (nSpId != itsPolId.nelements()) {
913 917 itsPolId.resize(nSpId, true);
914 918 itsPolId = -1;
915 919 }
916 920 polTypes.resize(nSpId);

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut