casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FlagAgentShadow.h
Go to the documentation of this file.
1 //# FlagAgentShadow.h: This file contains the interface definition of the FlagAgentShadow 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 FlagAgentShadow_H_
24 #define FlagAgentShadow_H_
25 
27 
28 namespace casa { //# NAMESPACE CASA - BEGIN
29 
31 
32 public:
33 
34  FlagAgentShadow(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube = false, casacore::Bool flag = true);
36 
37 protected:
38 
39  // Common functionality for each visBuffer (don't repeat at the row level)
40  void preProcessBuffer(const vi::VisBuffer2 &visBuffer);
41 
42  // Common preProcessing code for the single/multiple agent cases
43  void preProcessBufferCore(const vi::VisBuffer2 &visBuffer);
44 
45  // Compute flags afor a given mapped visibility point
46  bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row);
47 
48  // Parse configuration parameters
50 
51 private:
52 
53  // casacore::Function to compute antenna UVW values for the current timestep
55  // casacore::Function to compute shadowed antennas, given a list of antenna UVWs.
56  void calculateShadowedAntennas(const vi::VisBuffer2 &visBuffer, casacore::Int rownr);
57  // casacore::Function to decide if the 'behind' antenna is shadowed or not, for one baseline
59  // casacore::Function to return baseline index.
61 
65 
66  // Copies of antenna-information lists, containing extra antennas if specified.
70 
71  // Declaration of static members for common pre-processing
73  static std::vector<casacore::Int> shadowedAntennas_p;
75  static std::vector<bool> startedProcessing_p;
76  static bool preProcessingDone_p;
78 
79  // Private variables that change with each timestep
82 
83  casacore::Bool firststep_p; // helper variable to control a debug print statement
84 
85 };
86 
87 } //# NAMESPACE CASA - END
88 
89 #endif /* FlagAgentShadow_H_ */
90 
int Int
Definition: aipstype.h:50
casacore::uShort agentNumber_p
Declaration of static members for common pre-processing.
casacore::Matrix< casacore::Double > uvwAnt_p
Private variables that change with each timestep.
casacore::Vector< casacore::MPosition > shadowAntennaPositions_p
A top level class defining the data handling interface for the flagging module.
static casacore::uShort nAgents_p
casacore::Double shadowTolerance_p
casacore::Input parameters ///
casacore::Bool firststep_p
static casa::async::Mutex staticMembersMutex_p
casacore::Vector< casacore::Double > shadowAntennaDiameters_p
Copies of antenna-information lists, containing extra antennas if specified.
bool computeRowFlags(const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row)
Compute flags afor a given mapped visibility point.
casacore::Bool computeAntUVW(const vi::VisBuffer2 &vb, casacore::Int rownr)
casacore::Function to compute antenna UVW values for the current timestep
void decideBaselineShadow(casacore::Double uvDistance, casacore::Double w, casacore::Int antenna1, casacore::Int antenna2)
casacore::Function to decide if the &#39;behind&#39; antenna is shadowed or not, for one baseline ...
A top level class defining the interface for flagging agents.
casacore::uInt baselineIndex(casacore::uInt nAnt, casacore::uInt a1, casacore::uInt a2)
casacore::Function to return baseline index.
double Double
Definition: aipstype.h:55
static std::vector< bool > startedProcessing_p
void calculateShadowedAntennas(const vi::VisBuffer2 &visBuffer, casacore::Int rownr)
casacore::Function to compute shadowed antennas, given a list of antenna UVWs.
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::Record additionalAntennas_p
static bool preProcessingDone_p
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
casacore::Double currTime_p
void preProcessBuffer(const vi::VisBuffer2 &visBuffer)
Common functionality for each visBuffer (don&#39;t repeat at the row level)
void preProcessBufferCore(const vi::VisBuffer2 &visBuffer)
Common preProcessing code for the single/multiple agent cases.
FlagAgentShadow(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube=false, casacore::Bool flag=true)
static std::vector< casacore::Int > shadowedAntennas_p
unsigned int uInt
Definition: aipstype.h:51
unsigned short uShort
Definition: aipstype.h:49
void setAgentParameters(casacore::Record config)
Parse configuration parameters.