RFAFlagExaminer.h

Go to the documentation of this file.
00001 
00002 //# RFAFlagExaminer.h: this defines RFAFlagExaminer
00003 //# Copyright (C) 2000,2001
00004 //# Associated Universities, Inc. Washington DC, USA.
00005 //#
00006 //# This library is free software; you can redistribute it and/or modify it
00007 //# under the terms of the GNU Library General Public License as published by
00008 //# the Free Software Foundation; either version 2 of the License, or (at your
00009 //# option) any later version.
00010 //#
00011 //# This library is distributed in the hope that it will be useful, but WITHOUT
00012 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00014 //# License for more details.
00015 //#
00016 //# You should have received a copy of the GNU Library General Public License
00017 //# along with this library; if not, write to the Free Software Foundation,
00018 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00019 //#
00020 //# Correspondence concerning AIPS++ should be addressed as follows:
00021 //#        Internet email: aips2-request@nrao.edu.
00022 //#        Postal address: AIPS++ Project Office
00023 //#                        National Radio Astronomy Observatory
00024 //#                        520 Edgemont Road
00025 //#                        Charlottesville, VA 22903-2475 USA
00026 //#
00027 //# $Id$
00028 #ifndef FLAGGING_RFAFLAGEXAMINER_H
00029 #define FLAGGING_RFAFLAGEXAMINER_H
00030 
00031 #include <flagging/Flagging/RFAFlagCubeBase.h> 
00032 #include <flagging/Flagging/RFASelector.h> 
00033 #include <flagging/Flagging/RFDataMapper.h>
00034 #include <casa/Arrays/LogiVector.h>
00035     
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 // <summary>
00039 // RFAFlagExaminer: Examine the flags and get statistics. perform extensions too.
00040 // </summary>
00041 
00042 // <use visibility=local>
00043 
00044 // <reviewed reviewer="" date="" tests="" demos="">
00045 // </reviewed>
00046 
00047 // <prerequisite>
00048 //   <li> RFASelector
00049 // </prerequisite>
00050 //
00051 // <etymology>
00052 // RedFlaggerAgent Selector
00053 // </etymology>
00054 //
00055 // <synopsis>
00056 // RFAFlagExaminer accepts a whole bunch of options to select a subset of the
00057 // MS (by time, antenna, baseline, channel/frequency, etc.), and to flag/unflag 
00058 // the whole selection, or specific parts of it (autocorrelations, specific 
00059 // time slots, VLA quacks, etc.)
00060 // </synopsis>
00061 //
00062 // <todo asof="2001/04/16">
00063 //   <li> add this feature
00064 //   <li> fix this bug
00065 //   <li> start discussion of this possible extension
00066 // </todo>
00067 
00068 class RFAFlagExaminer : public RFASelector
00069 {
00070 public:
00071 // constructor. 
00072   RFAFlagExaminer ( RFChunkStats &ch,const RecordInterface &parm ); 
00073   virtual ~RFAFlagExaminer ();
00074   
00075   /*
00076   virtual uInt estimateMemoryUse () { return RFAFlagCubeBase::estimateMemoryUse()+2; }
00077   virtual Bool newChunk ( Int &maxmem );
00078 //  virtual IterMode iterTime ( uInt it );
00079 //  virtual IterMode iterRow  ( uInt ir );
00080 */
00081   virtual void iterFlag ( uInt it );
00082 
00083   virtual void startData(){RFAFlagCubeBase::startData();return;};
00084   virtual void startFlag();
00085     //virtual void iterFlag( uInt it , Bool resetFlags=True);
00086   virtual void endFlag();
00087   virtual void finalize();
00088   virtual void initialize();
00089   virtual void initializeIter(uInt it);
00090   virtual void finalizeIter(uInt it);
00091   virtual String getID() {return String("FlagExaminer");};
00092 
00093   virtual Record getResult();
00094 
00095 //  virtual String getDesc ();
00096 //  static const RecordInterface & getDefaults ();
00097 
00098 protected:
00099     void processRow  ( uInt ifr,uInt it ) ;
00100     Int totalflags,totalcount;
00101     Int totalrowflags,totalrowcount;
00102 
00103     // accumulated over all chunks
00104     Int 
00105       accumTotalFlags, accumTotalCount, accumRowFlags, 
00106       accumTotalRowCount, accumTotalRowFlags;
00107 
00108     Int inTotalFlags, inTotalCount, inTotalRowFlags, inTotalRowCount;
00109     Int outTotalFlags, outTotalCount, outTotalRowFlags, outTotalRowCount;
00110 };
00111 
00112     
00113     
00114 
00115 } //# NAMESPACE CASA - END
00116 
00117 #ifndef AIPS_NO_TEMPLATE_SRC
00118 #include <flagging/Flagging/RFAFlagExaminer.tcc>
00119 #endif //# AIPS_NO_TEMPLATE_SRC
00120 #endif

Generated on Thu Aug 27 21:08:45 2009 for NRAOCASA by  doxygen 1.5.1