casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FlagAgentSummary.h
Go to the documentation of this file.
1 //# FlagAgentSummary.h: This file contains the interface definition of the FlagAgentSummary class.
2 //#
3 //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
4 //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
5 //# Copyright (C) European Southern Observatory, 2011, All rights reserved.
6 //#
7 //# This library is free software; you can redistribute it and/or
8 //# modify it under the terms of the GNU Lesser General Public
9 //# License as published by the Free software Foundation; either
10 //# version 2.1 of the License, or (at your option) any later version.
11 //#
12 //# This library is distributed in the hope that it will be useful,
13 //# but WITHOUT ANY WARRANTY, without even the implied warranty of
14 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 //# Lesser General Public License for more details.
16 //#
17 //# You should have received a copy of the GNU Lesser General Public
18 //# License along with this library; if not, write to the Free Software
19 //# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 //# MA 02111-1307 USA
21 //# $Id: $
22 
23 #ifndef FlagAgentSummary_H_
24 #define FlagAgentSummary_H_
25 
27 
28 namespace casa { //# NAMESPACE CASA - BEGIN
29 
31 
32  struct summary
33  {
35  {
36  accumflags.clear();
37  accumtotal.clear();
38  accumChannelflags.clear();
39  accumChanneltotal.clear();
40  accumPolarizationflags.clear();
41  accumPolarizationtotal.clear();
42  accumAntScanflags.clear();
43  accumAntScantotal.clear();
44  accumTotalFlags = 0;
45  accumTotalCount = 0;
46  }
47 
48  std::map<std::string, std::map<std::string, casacore::uInt64> > accumflags;
49  std::map<std::string, std::map<std::string, casacore::uInt64> > accumtotal;
50 
51  std::map<casacore::Int, std::map<casacore::uInt, casacore::uInt64> > accumChannelflags;
52  std::map<casacore::Int, std::map<casacore::uInt, casacore::uInt64> > accumChanneltotal;
53 
54  std::map<casacore::Int, std::map<std::string, casacore::uInt64> > accumPolarizationflags;
55  std::map<casacore::Int, std::map<std::string, casacore::uInt64> > accumPolarizationtotal;
56 
57  std::map<casacore::Int, std::map<casacore::Int, casacore::uInt64> > accumAntScanflags;
58  std::map<casacore::Int, std::map<casacore::Int, casacore::uInt64> > accumAntScantotal;
59 
61  };
62 
63 public:
64 
67 
69 
70 protected:
71 
72  // Common functionality for each visBuffer (don't repeat at the row level)
73  void preProcessBuffer(const vi::VisBuffer2 &visBuffer);
74 
75  // Compute flags for a given mapped visibility point
76  bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row);
77 
78  // Parse configuration parameters
80 
81  // Get the summary dictionary, and 'view' reports.
83 
84  // Utility method to facilitate creation of sub-summaries per field
86 
87 private:
88 
89  // Build simple plot-reports from the summary dictionary
91  std::map<casacore::Int , std::vector<casacore::Double> > frequencyList;
92 
98 
99  std::map<std::string, summary* > fieldSummaryMap;
106 
107  string arrayId_str;
108  string fieldId_str;
109  string spw_str;
110  string scan_str;
112 
113 };
114 
115 
116 } //# NAMESPACE CASA - END
117 
118 #endif /* FlagAgentSummary_H_ */
119 
int Int
Definition: aipstype.h:50
FlagAgentSummary(FlagDataHandler *dh, casacore::Record config)
casacore::Record getResult()
A top level class defining the data handling interface for the flagging module.
std::map< std::string, std::map< std::string, casacore::uInt64 > > accumflags
void getResultCore(casacore::Record &summary)
Utility method to facilitate creation of sub-summaries per field.
unsigned long long uInt64
Definition: aipsxtype.h:39
std::map< casacore::Int, std::map< std::string, casacore::uInt64 > > accumPolarizationflags
std::map< std::string, std::map< std::string, casacore::uInt64 > > accumtotal
void preProcessBuffer(const vi::VisBuffer2 &visBuffer)
Common functionality for each visBuffer (don&#39;t repeat at the row level)
FlagReport getReport()
Get the summary dictionary, and &#39;view&#39; reports.
Everything going into the FlagReport is by value Everything going out of it is by reference...
Definition: FlagReport.h:40
std::map< casacore::Int, std::map< casacore::uInt, casacore::uInt64 > > accumChannelflags
casacore::Bool spwChannelCounts
bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row)
Compute flags for a given mapped visibility point.
A top level class defining the interface for flagging agents.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool baselineCounts
void setAgentParameters(casacore::Record config)
Parse configuration parameters.
std::map< casacore::Int, std::map< casacore::Int, casacore::uInt64 > > accumAntScantotal
std::map< casacore::Int, std::map< casacore::Int, casacore::uInt64 > > accumAntScanflags
std::map< casacore::Int, std::map< std::string, casacore::uInt64 > > accumPolarizationtotal
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
casacore::Bool spwPolarizationCounts
casacore::String display_p
std::map< casacore::Int, std::vector< casacore::Double > > frequencyList
String: the storage and methods of handling collections of characters.
Definition: String.h:223
std::map< std::string, summary * > fieldSummaryMap
FlagReport buildFlagCountPlots()
Build simple plot-reports from the summary dictionary.
unsigned int uInt
Definition: aipstype.h:51
std::map< casacore::Int, std::map< casacore::uInt, casacore::uInt64 > > accumChanneltotal
casacore::Bool fieldCounts