casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFAMedianClip.h
Go to the documentation of this file.
1 //# RFAMedianClip.h: this defines RFATimeMedian and RFAFreqMedian
2 //# Copyright (C) 2000,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 #ifndef FLAGGING_RFAMEDIANCLIP_H
28 #define FLAGGING_RFAMEDIANCLIP_H
29 
32 
33 namespace casa { //# NAMESPACE CASA - BEGIN
34 
35 // <summary>
36 // RFATimeMedian: RedFlagger Agent for clipping relative to median over time
37 // </summary>
38 
39 // <use visibility=local>
40 
41 // <reviewed reviewer="" date="" tests="" demos="">
42 // </reviewed>
43 
44 // <prerequisite>
45 // <li> MedianSlider
46 // <li> RFADiffMapBase
47 // </prerequisite>
48 //
49 // <synopsis>
50 // RFATimeMedian computes a sliding median of some quantity (as established
51 // in RFADiffMapbase) over time, per each channel. Deviation w/respect to
52 // the median is passed to RFADiffBase for the actual flagging.
53 // </synopsis>
54 //
55 // <todo asof="2001/04/16">
56 // <li> add this feature
57 // <li> fix this bug
58 // <li> start discussion of this possible extension
59 // </todo>
60 
62 {
63 public:
65  virtual ~RFATimeMedian ();
66 
67  virtual casacore::Bool newChunk (casacore::Int &maxmem);
68  virtual void endChunk ();
69  virtual void startData (bool verbose);
71  virtual IterMode iterRow (casacore::uInt irow);
72  virtual IterMode endData ();
73  virtual casacore::String getDesc ();
74  static const casacore::RecordInterface & getDefaults ();
75 
76 protected:
79 
81 
84 
85 };
86 
88 {
89  return msl[ ifr*num(CHAN) + ich ];
90 }
91 
92 
93 // <summary>
94 // RFAFreqMedian: RedFlagger Agent for clipping relative to median over frequency
95 // </summary>
96 
97 // <use visibility=local>
98 
99 // <reviewed reviewer="" date="" tests="" demos="">
100 // </reviewed>
101 
102 // <prerequisite>
103 // <li> MedianSlider
104 // <li> RFADiffMapBase
105 // </prerequisite>
106 //
107 // <synopsis>
108 // RFAFreqMedian computes a sliding median of some quantity (as established
109 // in RFADiffMapbase) over frequency, per each row. Deviation w/respect to
110 // the median is passed to RFADiffBase for the actual flagging.
111 // </synopsis>
112 //
113 // <todo asof="2001/04/16">
114 // <li> add this feature
115 // <li> fix this bug
116 // <li> start discussion of this possible extension
117 // </todo>
118 
120 {
121 public:
123  virtual ~RFAFreqMedian () {};
124 
125  virtual casacore::Bool newChunk (casacore::Int &maxmem);
126  virtual RFA::IterMode iterRow (casacore::uInt irow);
127  virtual casacore::String getDesc ();
128  static const casacore::RecordInterface & getDefaults ();
129 
130 protected:
132 
133 };
134 
135 
136 } //# NAMESPACE CASA - END
137 
138 #endif
int Int
Definition: aipstype.h:50
virtual ~RFAFreqMedian()
virtual casacore::String getDesc()
called to obtain a short description of this RFA
virtual void endChunk()
Called once finished with a chunk.
virtual casacore::String getDesc()
called to obtain a short description of this RFA
virtual casacore::Bool newChunk(casacore::Int &maxmem)
Called before iterating over a chunk.
casacore::uInt halfwin
virtual IterMode endData()
Called after a pass is completed successfully (i.e., not stopped by start or iter methods)...
static const casacore::RecordInterface & getDefaults()
IterMode
iteration modes
Definition: RFABase.h:63
virtual void startData(bool verbose)
Called before starting a data pass on a chunk.
virtual RFA::IterMode iterRow(casacore::uInt irow)
iterRow() is called once per each row in the VisBuffer.
casacore::MedianSlider & slider(casacore::uInt ich, casacore::uInt ifr)
Definition: RFAMedianClip.h:87
casacore::MedianSlider * msl
Definition: RFAMedianClip.h:83
RFATimeMedian: RedFlagger Agent for clipping relative to median over time.
Definition: RFAMedianClip.h:61
virtual ~RFATimeMedian()
RFAFreqMedian(RFChunkStats &ch, const casacore::RecordInterface &parm)
casacore::uInt itime
Definition: RFAMedianClip.h:77
virtual IterMode iterRow(casacore::uInt irow)
iterRow() is called once per each row in the VisBuffer.
Class to compute sliding median.
Definition: MedianSlider.h:64
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::uInt halfwin
Definition: RFAMedianClip.h:82
virtual IterMode iterTime(casacore::uInt itime)
Iteration methods for a data pass.
static const casacore::RecordInterface & getDefaults()
Abstract base class for deviation-based flagging with a data mapper.
Definition: RFADiffBase.h:157
String: the storage and methods of handling collections of characters.
Definition: String.h:223
RFChunkStats: vital information and flagging stats for a visibility chunk.
Definition: RFChunkStats.h:89
Abstract base class for Record classes.
RFAFreqMedian: RedFlagger Agent for clipping relative to median over frequency.
casacore::uInt num(StatEnums which)
Definition: RFABase.h:182
RFATimeMedian(RFChunkStats &ch, const casacore::RecordInterface &parm)
FlagCubeIterator flag_iter
Definition: RFAMedianClip.h:80
unsigned int uInt
Definition: aipstype.h:51
virtual casacore::Bool newChunk(casacore::Int &maxmem)
Called before iterating over a chunk.