28 #ifndef FLAGGING_RFFLAGCUBE_H
29 #define FLAGGING_RFFLAGCUBE_H
267 throw std::logic_error(
"Cannot do this in kiss mode (program bug, please report)");
300 return (iter)(ich,ifr);
325 throw std::logic_error(
"Cannot do this in kiss mode (program bug, please report)");
334 throw std::logic_error(
"Cannot do this in kiss mode (program bug, please report)");
363 #ifndef AIPS_NO_TEMPLATE_SRC
364 #include <flagging/Flagging/RFFlagCube.tcc>
365 #endif //# AIPS_NO_TEMPLATE_SRC
casacore::uInt flag_itime
casacore::Bool preFlagged(casacore::uInt ich, casacore::uInt ifr)
the preFlagged() function uses the corr-mask to tell if any of this agent's correlations are pre-flag...
void printStats()
prints flagging stats to stderr
RFCubeLatticeIterator< T > newIter()
creates a new iterator for this lattice
static RFlagWord base_flagmask
static casacore::Vector< RFlagWord > corr_flagmask
corr_flagmask is a mapping from corrmasks into masks of agents that flag the given corrmask ...
casacore::uInt tot_fl_raised
flagging stats for this instance
casacore::uInt tot_row_fl_raised
casacore::uInt row_fl_cleared
const RFlagWord RowFlagged
special row flag masks.
casacore::uInt RFlagWord
RFAs use bitwise flags.
static casacore::Int pos_get_flag
const FlagMatrix & flagMatrix()
Returns full flag matrix (i.e.
static casacore::uInt npol
RFlagWord checkCorrMask()
returns the checked-correlations mask for this agent (=0 for RESET/IGNORE policies, or =corrMask() for HONOR policy).
casacore::Bool rowPreFlagged(casacore::uInt ifr, casacore::uInt itime)
tells if a row is pre-flagged in the casacore::MS (or does not exist)
static casacore::Matrix< std::vector< bool > > flagrow_kiss
casacore::LogIO & logSink()
returns reference to logsink
void setMSFlags(casacore::uInt itime)
transfers all flags from lattice into VisBuffer
void reset()
resets at start of pass
static casacore::Cube< casacore::Bool > in_flags
A 2-D Specialization of the Array class.
ostream-like interface to creating log messages.
RFlagWord my_corrflagmask
RFlagWord check_rowmask
RESET or IGNORE policy, or to corrmask for HONOR.
void init(RFlagWord polmsk, casacore::uInt nAgent, bool is_selector, const casacore::String &name="")
creates flag cube for current chunk.
static casacore::LogIO default_sink
default log sink
static casacore::Int agent_count
<n> is the value of this variable
static casacore::Int num_inst
number of instances in use
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
casacore::uInt num(StatEnums which) const
returns a data dimension (POL, CHAN, IFR, etc.)
RFFlagCube: a cube of flags.
void cleanup()
cleans up at end of chunk
static casacore::Bool reset_preflags
RFFlagCube(RFChunkStats &ch, casacore::Bool ignore=false, casacore::Bool reset=false, casacore::LogIO &os=default_sink)
constructor
casacore::Bool clearRowFlag(casacore::uInt ifr, casacore::uInt itime)
casacore::Bool setFlag(casacore::uInt ich, casacore::uInt ifr, FlagCubeIterator &iter)
sets or clears a flag at the given flag cursor
casacore::Bool anyFlagged(casacore::uInt ich, casacore::uInt ifr)
The anyFlagged() uses the corr-flagmask to tell if any of my correlations are flagged either by any a...
const RFlagWord RowAbsent
static casacore::Int pos_set_flag
static bool in_flags_flushed
void advance(casacore::uInt it, casacore::Bool getFlags=false)
advances global flag iterator to time slot it (if required), sets the flag cursor from the iterator (...
casacore::LogIO os
log sink
casacore::String getSummary()
returns summary of stats in text form
FlagCubeIterator & iterator()
returns reference to internal iterator
PreFlagPolicy pfpolicy
pre-flag policy (can be set on a per-instance basis)
casacore::Bool rowAgentFlagged(casacore::uInt ifr, casacore::uInt itime)
tells if a row is flagged by any agent
bool Bool
Define the standard types used by Casacore.
RFlagWord flagmask
Flag mask used by this instance.
FlagCubeIterator newCustomIter()
creates a custom iterator
static FlagMatrix flagrow
static casacore::uInt nchan
template <class T, class U> class vector;
casacore::uInt row_fl_raised
FlaggerEnums: collection of enums for various flagger classes.
void getMSFlags(casacore::uInt it)
fills global flag lattice with apriori flags from a VisBuffer (if required)
RFCubeLatticeIterator< RFlagWord > FlagCubeIterator
RFlagWord getFlag(casacore::uInt ich, casacore::uInt ifr, FlagCubeIterator &iter)
Gets full flag word at the given flag cursor.
casacore::uInt num(StatEnums which)
shortcut to RFChunkStats::num
casacore::uInt fl_cleared
static void setMaxMem(casacore::Int maxmem)
sets the maximum memory usage for the flag cube
casacore::LogicalArray maskBits(const casacore::Array< T > &, const T &)
returns a casacore::LogicalArray corresponding to (ARR&MASK)!=0
const Double c
Fundamental physical constants (SI units):
static RFlagWord full_corrmask
String: the storage and methods of handling collections of characters.
FlagMatrix * flag_curs
local flag cursor used by this instance (setFlag and clearFlag).
RFChunkStats: vital information and flagging stats for a visibility chunk.
unsigned long flagmask_kiss
static RFlagWord fullCorrMask()
returns mask of all correlations
casacore::Array< T > operator&(const casacore::Array< T > &, const T &)
casacore::Function for working with bitmasks.
static casacore::Int numInstances()
returns the number of instances of the flag cube
static RFCubeLattice< RFlagWord > flag
casacore::Bool clearFlag(casacore::uInt ich, casacore::uInt ifr, FlagCubeIterator &iter)
RFCubeLatticeIterator< T > & iterator()
provides access to lattice itself std::vector<std::vector<bool> > & lattice() { return lat; } ...
RFlagWord corrMask()
returns correlations mask for this agent
RFlagWord flagMask()
returns flag mask for this agent
casacore::Bool setRowFlag(casacore::uInt ifr, casacore::uInt itime)
Sets or clears a row flag.
static casacore::uInt estimateMemoryUse(const RFChunkStats &ch)
returns estimated size of flag cube for a given chunk.
static int getMaxMem()
returns the current maximum memory usage
RFlagWord getRowFlag(casacore::uInt ifr, casacore::uInt itime)
Gets full row flag word.
casacore::Bool rowFlagged(casacore::uInt ifr, casacore::uInt itime)
preFlagged OR agentFlagged