Commits

Pam Ford authored bd178b735c6 Merge
Merge branch 'master' into CAS-11501
No tags

code/flagging/Flagging/AgentFlagger.cc

Modified
581 581 agent_rec.print(os);
582 582 String str(os.str());
583 583 cout << str << endl;
584 584
585 585 }
586 586
587 587 // Get the mode
588 588 String mode;
589 589 agent_rec.get("mode", mode);
590 590
591 + /*
592 + * Special considerations for some agents
593 + */
594 +
591 595 // If clip agent is mixed with other agents and time average is true, skip it
592 596 if ((mode.compare("clip") == 0 and list_size > 1) or
593 597 (mode.compare("rflag") == 0 and list_size > 2) or
594 598 (mode.compare("tfcrop") == 0 and list_size > 2))
595 599 {
596 600 Bool tavg = false;
597 601 int exists = agent_rec.fieldNumber ("timeavg");
598 602 if (exists >= 0) agent_rec.get("timeavg", tavg);
599 603
600 604 if (tavg){
601 - os << LogIO::WARN << "Cannot have " << mode <<" mode with timeavg/channelavg=true in list mode" << LogIO::POST;
605 + os << LogIO::WARN << "Cannot have " << mode <<" mode with timeavg/channelavg=True in list mode" << LogIO::POST;
602 606 continue;
603 607 }
604 608 }
605 609
610 + // If quack mode with quackincrement = true, skip it
611 + if (mode.compare("quack") == 0 and i > 0 and list_size > 1){
612 + Bool quackincrement = false;
613 + int exists = agent_rec.fieldNumber ("quackincrement");
614 + if (exists >= 0) agent_rec.get("quackincrement", quackincrement);
615 +
616 + if (quackincrement){
617 + os << LogIO::WARN << "Cannot have quackincrement=True in list mode. Agent will be ignored!" << LogIO::POST;
618 + continue;
619 + }
620 + }
621 +
606 622 // Set the new time interval only once
607 623 if (!timeset_p and (mode.compare("tfcrop") == 0 or mode.compare("extend") == 0 or
608 624 mode.compare("rflag") == 0)) {
609 625 fdh_p->setTimeInterval(max_p);
610 626 timeset_p = true;
611 627 }
612 628
613 629 // Change the new iteration approach only once
614 630 if (!iterset_p and (mode.compare("tfcrop") == 0 or mode.compare("extend") == 0
615 631 or mode.compare("rflag") == 0 or mode.compare("display") == 0)) {

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

Add shortcut