Source
xxxxxxxxxx
virtual bool computeAntennaPairFlags(const vi::VisBuffer2 &visBuffer, VisMapper &visibilities,FlagMapper &flags,casacore::Int antenna1,casacore::Int antenna2,std::vector<casacore::uInt> &rows);
//# FlagAgentBase.h: This file contains the interface definition of the FlagAgentBase class.
//#
//# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
//# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
//# Copyright (C) European Southern Observatory, 2011, All rights reserved.
//#
//# This library is free software; you can redistribute it and/or
//# modify it under the terms of the GNU Lesser General Public
//# License as published by the Free software Foundation; either
//# version 2.1 of the License, or (at your option) any later version.
//#
//# This library is distributed in the hope that it will be useful,
//# but WITHOUT ANY WARRANTY, without even the implied warranty of
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//# Lesser General Public License for more details.
//#
//# You should have received a copy of the GNU Lesser General Public
//# License along with this library; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
//# MA 02111-1307 USA
//# $Id: $
// needed for antennaPairMap, polarizationMap, VisMapper, FlagMapper, etc. which should
// probably be split from the rather large FlagDataHandler.h
namespace casa { //# NAMESPACE CASA - BEGIN
class FlagDataHandler;
// <summary>
// A top level class defining the interface for flagging agents
// </summary>
//
// <use visibility=export>
//
// <prerequisite>
// <li> <linkto class="VisBuffer2:description">FlagDataHandler</linkto>
// <li> <linkto class="VisBuffer2:description">FlagReport</linkto>
// </prerequisite>
//
// <etymology>
// FlagAgentBase stands for a generic class, specific to the flagging operations
// </etymology>
//
// <synopsis>
//
// This is a top-level class defining the interface for flagging agents.
// There are various methods (virtual) that must be re-implemented by the specific derived
// classes, depending on the implemented algorithm. Here we find three categories:
//
// -# Iteration approach methods:
//
// - computeRowFlags(const VisBuffer &visBuffer, FlagMapper &flags, casacore::uInt row)
// - For agents that only depend on meta-data for their flagging operations (for FlagAgentManual,FlagAgentElevation,FlagAgentShadow,FlagAgentQuack)
// - This iteration method can also be used by agents that have to inspect the already existing flags (for FlagAgentSummary, FlagAgentExtension)
//
// - computeInRowFlags(const VisBuffer &visBuffer, VisMapper &visibilities,FlagMapper &flags, casacore::uInt row);
// - For agents that have to look into the visibility points, but regardless of their source baseline, like FlagAgentDisplay
//
// - computeAntennaPairFlags(const VisBuffer &visBuffer,FlagMapper &flags,casacore::Int antenna1,casacore::Int antenna2,vector<casacore::uInt> &rows);
// - For agents that have to look into the visibility points grouped by baseline (FlagAgentTimeFreqCrop,FlagAgentRFlag)
//
// - computeAntennaPairFlags(const VisBuffer &visBuffer, VisMapper &visibilities,FlagMapper &flags,casacore::Int antenna1,casacore::Int antenna2,vector<casacore::uInt> &rows)
// - For agents that have to look into the visibility points grouped by baseline, allowing user-driven navigation (FlagAgentDisplay)
// - NOTE: This method has to be used in combination with iterateAntennaPairsInteractive(antennaPairMap *antennaPairMap_ptr)
//
// -# Configuration methods:
//
// - FlagAgentBase::FlagAgentBase
// - Even though each derived agent has its specific constructor, it is necessary to call the base class constructor to set:
// - The FlagDataHandler implementation pointer
// - The iteration approach: For this the FlagAgentBase class contains an enumeration FlagAgentBase::iteration with the following modes:
// - FlagAgentBase::ROWS: Iterate row by row and flag depending on the corresponding meta-data (for FlagAgentManual,FlagAgentQuack)
// - FlagAgentBase::ROWS_PREPROCESS_BUFFER: Iterate row by row doing a pre-processing common to all the rows of each chunk (for FlagAgentElevation, FlagAgentShadow, FlagAgentSummary)
// - FlagAgentBase::IN_ROWS: Iterate row by row and flag depending on the data column (for FlagAgentClipping)
// - FlagAgentBase::ANTENNA_PAIRS: Iterate per baselines and flag depending on the data column (for FlagAgentTimeFreqCrop, FlagAgentRFlag)
// - FlagAgentBase::ANTENNA_PAIRS_FLAGS: Iterate per baselines accessing the individual flag points (for FlagAgentExtension)
// - FlagAgentBase::ANTENNA_PAIRS_INTERACTIVE: Iterate per baselines interactively accessing the data column (for FlagAgentDisplay)
//
// - setAgentParameters(casacore::Record config)
// - To parse the agent-specific parameters, although there is also an implementation of
// this method in the base class which has to be called to handle the following parameters:
// - datacolumn: To specify the column in which the agent has to operate (see FlagAgentBase::datacolumn enumeration)