Commits

Pam Harris authored 50f54811482
Disallow antenna averaging for pure antenna-based tables

casa5/code/plotms/Data/PlotMSCTAverager.cc

Modified
485 485 } else {
486 486 accumFParam_(outPos) += wt * iterFParam(inPos);
487 487 }
488 488 accumParamErr_(outPos) += wt * iterParamErr(inPos);
489 489 accumSnr_(outPos) += wt * iterSnr(inPos);
490 490
491 491 if (avgChan_p) {
492 492 accumFreq_(outchan) += iterFreq(channum);
493 493 }
494 494 }
495 -
495 +
496 496 if (avgChan_p) {
497 497 // Add channel to list
498 498 chanNumsAveraged.push_back(channum);
499 499
500 500 ++nChanInBin;
501 501
502 502 // Check if bin is complete and finalize
503 503 if ((nChanInBin % nChanPerBin_p) == 0) {
504 504 // Save channels averaged then clear
505 505 casacore::Vector<casacore::Int> channums(chanNumsAveraged);
546 546
547 547 //----------------------------------------------------------------------------
548 548
549 549 void PlotMSCTAverager::antennaAccumulate (ROCTIter& cti, std::vector<casacore::Slice>& chansel) {
550 550 // Accumulate a CTIter chunk with per-antenna averaging
551 551
552 552 if (debug_) {
553 553 cout << " PMSCTA::antAccumulate() " << endl;
554 554 }
555 555
556 + if (cti.thisAntenna2() == -1) {
557 + throw(AipsError("Antenna averaging invalid for pure antenna-based table."));
558 + }
559 +
556 560 if (!initialized_p) {
557 561 initialize(cti, chansel);
558 562 }
559 563
560 564 // Only accumulate chunks with the same number of channels
561 565 if (cti.nchan() != nChan_p) {
562 566 throw(AipsError("PlotMSCTAverager: data shape does not conform"));
563 567 }
564 568
565 569 // For chan loop:

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

Add shortcut