9 #ifndef DP3_FLAGCOUNTER_H_
10 #define DP3_FLAGCOUNTER_H_
12 #include <casacore/casa/Arrays/Vector.h>
52 void incrChannel(
unsigned int chan) { channel_counts_[chan]++; }
63 return base_line_counts_;
65 const std::vector<int64_t>&
channelCounts()
const {
return channel_counts_; }
67 return correlation_counts_;
80 static void showPerc1(std::ostream&,
double value,
double total);
83 static void showPerc3(std::ostream&,
double value,
double total);
87 void saveStation(int64_t npoints,
const casacore::Vector<int64_t>& nused,
88 const casacore::Vector<int64_t>& count)
const;
91 void saveChannel(int64_t npoints,
const std::vector<int64_t>& count)
const;
93 const DPInfo* info_{
nullptr};
94 std::string save_filename_{};
95 double warning_percentage_{0.0};
96 bool show_fully_flagged_{
false};
100 std::vector<int64_t> base_line_counts_{};
101 std::vector<int64_t> channel_counts_{};
102 std::vector<int64_t> correlation_counts_{};
General info about DP3 data processing attributes like averaging.
Definition: DPInfo.h:35
Class to keep counts of nr of flagged points.
Definition: FlagCounter.h:35
void init(const DPInfo &info)
void showStation(std::ostream &os, int64_t ntimes) const
void incrBaseline(unsigned int bl)
Increment the count per baseline.
Definition: FlagCounter.h:49
static void showPerc1(std::ostream &, double value, double total)
Show percentage with 1 decimal.
const std::vector< int64_t > & channelCounts() const
Definition: FlagCounter.h:65
const std::vector< int64_t > & correlationCounts() const
Definition: FlagCounter.h:66
void add(const FlagCounter &that)
Add the contents of that to this.
void showCorrelation(std::ostream &os, int64_t ntimes) const
FlagCounter(const common::ParameterSet &, const std::string &prefix)
void showChannel(std::ostream &os, int64_t ntimes) const
FlagCounter()=default
The default constructor creates an empty object. It does not save.
void showBaseline(std::ostream &os, int64_t ntimes) const
Print the counts and optionally save percentages in a table.
void incrCorrelation(unsigned int corr)
Increment the count per correlation.
Definition: FlagCounter.h:55
const std::vector< int64_t > & baselineCounts() const
Definition: FlagCounter.h:62
void incrChannel(unsigned int chan)
Increment the count per channel.
Definition: FlagCounter.h:52
static void showPerc3(std::ostream &, double value, double total)
Show percentage with 3 decimals.
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53