23 #ifndef FlagAgentBase_H_
24 #define FlagAgentBase_H_
36 class FlagDataHandler;
445 void apply(
bool sequential =
false);
void setCheckMode(bool enable)
Set function to activate check mode.
casacore::String uvwSelection_p
void indigen(std::vector< casacore::uInt > &index, casacore::uInt size)
Generate index for all rows.
casacore::Matrix< casacore::Double > uvwList_p
void setProfiling(bool enable)
Set function to activate profiling.
casacore::Vector< casacore::Bool > * originalFlagRow_p
virtual void passFinal(const vi::VisBuffer2 &visBuffer)
casacore::Vector< casacore::Int > fieldList_p
bool isZero(casacore::Double number)
std::vector< casacore::uInt > * generateAntennaPairRowsIndex(casacore::Int antenna1, casacore::Int antenna2)
A top level class defining the data handling interface for the flagging module.
casacore::Vector< casacore::Int > scanIntentList_p
casacore::Bool profiling_p
Debugging configuration.
void generatePolarizationIndex(casacore::uInt nPolarizations)
static FlagAgentBase * create(FlagDataHandler *dh, casacore::Record config)
void processAntennaPair(casacore::Int antenna1, casacore::Int antenna2)
Methods to interactively iterate trough list of antenna pairs.
casacore::Vector< casacore::Int > scanList_p
bool checkIfProcessBuffer()
Check if buffer has to be processed.
void setDataSelection(casacore::Record config)
FlagAgentBase(FlagDataHandler *dh, casacore::Record config, casacore::uShort iterationApproach, casacore::Bool writePrivateFlagCube=false, casacore::Bool flag=true)
unsigned long long uInt64
std::vector< FlagAgentBase * > container_p
void iterateRows()
Iterate trough list of rows.
casacore::Cube< casacore::Bool > * commonFlagCube_p
casacore::MS-related objects
casacore::String baselineSelection_p
volatile casacore::Bool threadTerminated_p
casacore::Bool antennaNegation_p
Command
Special commands to the LogIO object.
casacore::String timeSelection_p
std::map< casacore::uShort, casacore::uShort > polarizationMap
bool flagAutoCorrelations_p
casacore::String expression_p
casacore::Data source configuration selection expression to pass to the VisMapper ...
virtual void passIntermediate(const vi::VisBuffer2 &visBuffer)
Iter-passes method.
casacore::uInt64 chunkFlags_p
Flag counters.
casacore::String fieldSelection_p
Everything going into the FlagReport is by value Everything going out of it is by reference...
bool isNaNOrZero(casacore::Float number)
casacore::Vector< casacore::Int > arrayList_p
Own data selection indexes.
void iterateInRows()
Iterate trough visibilities mapper.
std::map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::uInt > > antennaPairMap
volatile casacore::Bool terminationRequested_p
Thread state parameters.
casacore::Cube< casacore::Bool > * privateFlagCube_p
casacore::String agentName_p
casacore::Bool timeavg_p
Pre-averaging parameters.
casacore::String arraySelection_p
Own data selection ranges.
casacore::String sanitizeCorrExpression(casacore::String corrExpression, std::vector< casacore::String > *corrProducts)
Method to sanitize correlation expression and keep going.
casacore::LogIO::Command logLevel_p
casacore::String summaryName_p
casacore::Bool checkFlags_p
FlagReport gatherReports()
Method to accumulate reports from all agents.
casacore::String observationSelection_p
casacore::uInt64 tableFlags_p
A top level class defining the interface for flagging agents.
casacore::Double timebin_p
casacore::Bool uvwUnits_p
casacore::Matrix< casacore::Double > timeList_p
volatile casacore::Bool processing_p
casacore::Bool prepass_p
Running configuration.
casacore::uInt64 chunkNaNs_p
casacore::uShort dataReference_p
virtual bool computeAntennaPairFlags(const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flags, casacore::Int antenna1, casacore::Int antenna2, std::vector< casacore::uInt > &rows)
Compute flags for a given (time,freq) antenna pair map.
std::map< casacore::Int, casacore::Vector< casacore::Int > > polarizationList_p
casacore::String channelSelection_p
casacore::Vector< casacore::Int > antenna1List_p
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
virtual void preProcessBuffer(const vi::VisBuffer2 &visBuffer)
Common functionality for each visBuffer (don't repeat at the row level)
casacore::Vector< casacore::Int > observationList_p
void iterateAntennaPairs()
Iterate trough list of antenna pairs.
casacore::String polarizationSelection_p
casacore::Bool checkVisExpression(polarizationMap *polMap)
casacore::String scanSelection_p
casacore::Bool writePrivateFlagCube_p
Flagging mode configuration.
void setProfiling(bool enable)
casacore::String dataColumn_p
Needed to be protected for timeavg in clip.
casacore::Vector< casacore::Int > antenna2List_p
casacore::uShort iterationApproach_p
Running mode configuration.
casacore::Vector< casacore::Bool > * privateFlagRow_p
std::vector< casacore::uInt > polarizationIndex_p
casacore::Bool backgroundMode_p
Externally visible configuration.
std::vector< FlagAgentBase * >::iterator iterator_p
VisBuffer2s encapsulate one chunk of visibility data for processing.
casacore::Matrix< casacore::Int > baselineList_p
std::unique_ptr< casacore::LogIO > logger_p
void push_back(FlagAgentBase *agent_i)
Methods to mimic vector.
casacore::String spwSelection_p
virtual bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row)
Compute flags for a given visibilities point.
std::vector< casacore::uInt > rowsIndex_p
Lists of elements to process jagonzal (CAS-4312): We need channelIndex_p available for the Rflag agen...
casacore::Bool channelavg_p
String: the storage and methods of handling collections of characters.
void setCheckMode(bool enable)
bool find(const casacore::Vector< casacore::Int > &validRange, casacore::Int element)
For checking ids.
FlagDataHandler * flagDataHandler_p
Common used members that must be accessible to derived classes.
casacore::Bool multiThreading_p
Multithreading configuration and agent id.
void runCore()
Convenience function to be shared by parallel/non-parallel mode.
vi::VisBuffer2 * visibilityBuffer_p
casacore::Matrix< casacore::Int > channelList_p
casacore::uInt64 visBufferFlags_p
std::vector< casacore::uInt > channelIndex_p
casacore::Vector< casacore::Int > spwList_p
virtual void iterateAntennaPairsInteractive(antennaPairMap *antennaPairMap_ptr)
void generateRowsIndex(casacore::uInt nRows)
virtual FlagReport getReport()
Get a report casacore::Record from the agent, at the end of the run The report returned by getReport(...
casacore::Cube< casacore::Bool > * originalFlagCube_p
casacore::uInt64 tableNaNs_p
void generateChannelIndex(casacore::uInt nChannels)
void apply(bool sequential=false)
casacore::String scanIntentSelection_p
casacore::Vector< casacore::Bool > * commonFlagRow_p
void setFlagsMap(std::vector< casacore::uInt > *rows, FlagMapper *flagMap)
void iterateAntennaPairsFlags()
Iterate trough list of antenna pairs w/o loading visibilities.
casacore::Vector< casacore::Int > chanbin_p
bool isNaN(casacore::Double number)
Check if a given number is nan (for visibilities,gains and Tsys primarily)
virtual bool computeInRowFlags(const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flags, casacore::uInt row)
Compute flags for a given visibilities point.
virtual void setAgentParameters(casacore::Record config)
TODO: This class must be re-implemented in the derived classes.
void start()
Methods to mimic FlagAgentBase.
void setVisibilitiesMap(std::vector< casacore::uInt > *rows, VisMapper *visMap)
Mapping functions (abs, real, imag, etc.) as requested by Urvashi.