casa
$Rev:20696$
|
00001 //# LFDisplayFlags: A lighter flagger - for autoflag 00002 //# Copyright (C) 2000,2001 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Jan 28 2011 rurvashi Id$ 00027 #ifndef FLAGGING_LFEXAMINEFLAGS_H 00028 #define FLAGGING_LFEXAMINEFLAGS_H 00029 00030 #include <flagging/Flagging/LFBase.h> 00031 00032 namespace casa { //# NAMESPACE CASA - BEGIN 00033 00034 class LFExamineFlags : public LFBase 00035 { 00036 public: 00037 // default constructor 00038 LFExamineFlags (); 00039 00040 // default destructor 00041 virtual ~LFExamineFlags (); 00042 00043 // Return method name 00044 virtual String methodName(){return String("examineflags");}; 00045 00046 // Set autoflag params 00047 virtual Bool setParameters(Record ¶meters); 00048 00049 // Get default autoflag params 00050 virtual Record getParameters(); 00051 00052 // Run the algorithm 00053 virtual Bool runMethod(const VisBuffer &inVb, 00054 Cube<Float> &inVisc, Cube<Bool> &inFlagc, Cube<Bool> &inPreFlagc, 00055 uInt numT, uInt numAnt, uInt numB, uInt numC, uInt numP); 00056 00057 virtual Record getStatistics(); 00058 00059 protected: 00060 00061 void ReadMSInfo(const VisBuffer &vb); 00062 00063 void AccumulateStats(const VisBuffer &vb); 00064 00065 // Additional private members 00066 Record allflagcounts; 00067 Vector<String> antnames_p; 00068 Vector<String> corrlist_p; 00069 Vector<String> fieldnames_p; 00070 //Vector<xxx> spwlist_p; 00071 Vector<Double> freqlist_p; 00072 00073 00074 // Counters per chunk 00075 Vector<Float> chan_count, baseline_count, corr_count; 00076 Vector<Float> chan_flags, baseline_flags, corr_flags; 00077 Float chunk_count, chunk_flags; 00078 00079 // Counters across chunks (can be different shapes 00080 // Statistics per antenna, baseline, spw, etc. 00081 // These maps of maps is used e.g. like: 00082 // 00083 // accumflags["baseline"]["2&&7"] == 42 00084 // accumflags["spw" ]["0" ] == 17 00085 // 00086 // which means that there were 42 flags on baseline 2 - 7, etc. 00087 std::map<std::string, std::map<std::string, float> > allflags; 00088 std::map<std::string, std::map<std::string, float> > allcounts; 00089 00090 uInt a1,a2; 00091 00092 }; 00093 00094 00095 } //# NAMESPACE CASA - END 00096 00097 #endif 00098