Commits

Des Small authored 616967e0231
Added reference antenna logging to the fringefitter task; fixed a showstopper bug

code/synthesis/MeasurementComponents/FringeJones.cc

Modified
1468 1468 if (activeAntennas.find(*a) != activeAntennas.end()) {
1469 1469 if (prtlev > 2)
1470 1470 cout << "[FringeJones.cc::findRefAntWithData] We are choosing refant " << *a << endl;
1471 1471 refAnt = *a;
1472 1472 break;
1473 1473 } else {
1474 1474 if (prtlev > 2)
1475 1475 cout << "[FringeJones.cc::findRefAntWithData] No data for refant " << *a << endl;
1476 1476 }
1477 1477 }
1478 - return refAntList(0);
1478 + return refAnt;
1479 1479 }
1480 1480
1481 1481
1482 1482 // Stolen from SolveDataBuffer
1483 1483 void
1484 1484 aggregateTimeCentroid(SDBList& sdbs, Int refAnt, std::map<Int, Double>& aggregateTime) {
1485 1485 // Weighted average of SDBs' timeCentroids
1486 1486 std::map<Int, Double> aggregateWeight;
1487 1487 for (Int i=0; i < sdbs.nSDB(); ++i) {
1488 1488 SolveDataBuffer& s = sdbs(i);
2217 2217 Double df0 = centroidFreq - sdbs(0).freqs()(0); // global center to global edge
2218 2218
2219 2219 logSink() << "Solving for fringes for spw=" << currSpw() << " at t="
2220 2220 << MVTime(refTime()/C::day).string(MVTime::YMD,7) << LogIO::POST;
2221 2221
2222 2222 std::map<Int, Double> aggregateTime;
2223 2223 // Set the refant to the first choice that has data!
2224 2224 refant() = findRefAntWithData(sdbs, refantlist(), prtlev());
2225 2225 if (refant()<0)
2226 2226 throw(AipsError("No valid reference antenna supplied."));
2227 + else
2228 + logSink() << "Using reference antenna " << refant() << LogIO::POST;
2227 2229
2228 2230 aggregateTimeCentroid(sdbs, refant(), aggregateTime);
2229 2231
2230 2232 if (DEVDEBUG) {
2231 2233 std::cerr << "Weighted time centroids" << endl;
2232 2234 for (auto it=aggregateTime.begin(); it!=aggregateTime.end(); ++it)
2233 2235 std::cerr << it->first << " => " << it->second - t0 << std::endl;
2234 2236 }
2235 2237
2236 2238 DelayRateFFT drf(sdbs, refant(), delayWindow(), rateWindow());

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

Add shortcut