casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FlagAgentAntennaIntegrations.h
Go to the documentation of this file.
1 //# FlagAgentAntennaIntegrations.h: This file contains the interface definition of the FlagAgentAntennaIntegrations class.
2 //#
3 //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
4 //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2017, All rights reserved.
5 //# Copyright (C) European Southern Observatory, 2017, 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 FlagAgentAntennaIntegrations_H_
24 #define FlagAgentAntennaIntegrations_H_
25 
27 #include <unordered_map>
28 
29 namespace casa { //# NAMESPACE CASA - BEGIN
30 
50 
51  public:
52 
53  FlagAgentAntennaIntegrations(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube = false, casacore::Bool flag = true);
54 
56 
57  private:
58 
61 
62  // To use iteration approach FlagAgentBase::ROWS_PREPROCESS_BUFFER
63  void preProcessBuffer(const vi::VisBuffer2 &visBuffer);
64 
65  // Compute flags afor a given mapped visibility point
66  bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row);
67 
68  typedef std::unordered_map<casacore::Double, bool> FlaggedTimesMap;
69 
70  typedef std::vector<std::vector<bool>> TableFlagPerBaselinePerChannel;
71 
72  void doPreProcessingTimePoint(FlaggedTimesMap &flaggedTimes,
73  casacore::Double rowTime,
74  TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel);
75 
77  casacore::Double rowTime,
78  const TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel);
79 
81  casacore::Double rowTime,
82  const TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel);
83 
85  TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel,
86  casacore::uInt row, casacore::uInt baselineIdx);
87 
88 
91  const casacore::Vector<casacore::String> *antennaNames);
92 
93  // Time points that should be flagged
95 
96  // The antenna of interest. Pairs with this one are checked against the flag-threshold
98  // what fraction of channels need to be flagged to consider a
99  // polarization product flagged
101  // verbosity
102  bool verbose_p = false;
103 };
104 
105 
106 } //# NAMESPACE CASA - END
107 
108 #endif /* FlagAgentAntennaIntegrations_H_ */
int Int
Definition: aipstype.h:50
A top level class defining the data handling interface for the flagging module.
FlagAgentAntennaIntegrations(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube=false, casacore::Bool flag=true)
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
bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row)
Compute flags afor a given mapped visibility point.
A flag agent that implements the &#39;antint&#39; flagdata mode.
casacore::Double minChanThreshold_p
what fraction of channels need to be flagged to consider a polarization product flagged ...
std::vector< std::vector< bool > > TableFlagPerBaselinePerChannel
void preProcessBuffer(const vi::VisBuffer2 &visBuffer)
To use iteration approach FlagAgentBase::ROWS_PREPROCESS_BUFFER.
A top level class defining the interface for flagging agents.
casacore::Int antIdx_p
The antenna of interest.
void checkAnyPolarizationFlagged(const casacore::Cube< casacore::Bool > &polChanRowFlags, TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel, casacore::uInt row, casacore::uInt baselineIdx)
double Double
Definition: aipstype.h:55
void doPreProcessingTimePoint(FlaggedTimesMap &flaggedTimes, casacore::Double rowTime, TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel)
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
void setAgentParameters(casacore::Record config, casacore::Vector< casacore::String > *antennaNames)
FlaggedTimesMap doFlagTime_p
Time points that should be flagged.
void doPreProcessingTimePointSingleChannel(FlaggedTimesMap &flaggedTimes, casacore::Double rowTime, const TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel)
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
String: the storage and methods of handling collections of characters.
Definition: String.h:223
std::unordered_map< casacore::Double, bool > FlaggedTimesMap
casacore::uInt findAntennaID(const casacore::String &name, const casacore::Vector< casacore::String > *antennaNames)
unsigned int uInt
Definition: aipstype.h:51
void doPreProcessingTimePointMultiChannel(FlaggedTimesMap &flaggedTimes, casacore::Double rowTime, const TableFlagPerBaselinePerChannel &flagPerBaselinePerChannel)