casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFASpectralRej.h
Go to the documentation of this file.
1 //# RFASpectralRej.h: this defines RFASpectralRej
2 //# Copyright (C) 2000,2001,2002
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_RFASPECTRALREJ_H
28 #define FLAGGING_RFASPECTRALREJ_H
29 
36 #include <casa/Arrays/LogiVector.h>
37 
38 namespace casa { //# NAMESPACE CASA - BEGIN
39 
40 // <summary>
41 // RFASpectralRej: Spectral rejection agent
42 // </summary>
43 
44 // <use visibility=local>
45 
46 // <reviewed reviewer="" date="" tests="" demos="">
47 // </reviewed>
48 
49 // <prerequisite>
50 // <li> RFDataMapper
51 // <li> RFFlagCubeBase
52 // <li> RFRowClipper
53 // </prerequisite>
54 //
55 // <synopsis>
56 // RFASpectralRej fits a polynomial to a specified segment of the spectrum
57 // (presumably, spectral line-free). The fit produces a noise estimate for
58 // each row. Rows with excessive noise levels are flagged using RFRowClipper.
59 // </synopsis>
60 //
61 // <todo asof="2001/04/16">
62 // <li> add this feature
63 // <li> fix this bug
64 // <li> start discussion of this possible extension
65 // </todo>
66 
68 {
69 public:
71  virtual ~RFASpectralRej () {};
72 
74  virtual casacore::Bool newChunk (casacore::Int &maxmem);
75  virtual void endChunk ();
76  virtual void startData (bool verbose);
77  virtual IterMode iterTime (casacore::uInt it);
78  virtual IterMode iterRow (casacore::uInt ir);
79  virtual IterMode endData ();
80 
81  virtual casacore::String getDesc ();
82  static const casacore::RecordInterface & getDefaults ();
83 
84 protected:
86  void parseRegion ( const casacore::RecordInterface &parm );
87 
88  // spectral region specifications
90 
92  casacore::LogicalVector fitchan;
94 
97 
98  RFRowClipper rowclipper; // row clipper object
99 
102 
104 };
105 
106 
107 } //# NAMESPACE CASA - END
108 
109 #endif
void parseRegion(const casacore::RecordInterface &parm)
Abstract RedFlagger Agent class with a flag cube.
virtual void endChunk()
Called once finished with a chunk.
virtual casacore::Bool newChunk(casacore::Int &maxmem)
Called before iterating over a chunk.
int Int
Definition: aipstype.h:50
RFASpectralRej(RFChunkStats &ch, const casacore::RecordInterface &parm)
RFRowClipper: flags rows based on their noise level.
Definition: RFRowClipper.h:65
virtual casacore::String getDesc()
called to obtain a short description of this RFA
casacore::uInt ndeg
virtual IterMode iterRow(casacore::uInt ir)
iterRow() is called once per each row in the VisBuffer.
casacore::uInt halfwin
A one dimensional polynomial class.
Definition: Polynomial.h:90
casacore::Polynomial< casacore::AutoDiff< casacore::Float > > poly
IterMode
iteration modes
Definition: RFABase.h:63
void addSegment(casacore::Int spwid, casacore::Double fq0, casacore::Double fq1, casacore::Int ch0, casacore::Int ch1)
virtual casacore::uInt estimateMemoryUse()
This method is called before iterating over a chunk, to inquire the expected memory use...
casacore::LogicalVector fitchan
struct casa::RFASpectralRej::Segment Segment
spectral region specifications
double Double
Definition: aipstype.h:55
RFRowClipper rowclipper
virtual IterMode iterTime(casacore::uInt it)
Iteration methods for a data pass.
casacore::Double xnorm
virtual casacore::uInt estimateMemoryUse()
This method is called before iterating over a chunk, to inquire the expected memory use...
casacore::Block< Segment > segments
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Double threshold
spectral region specifications
RFASpectralRej: Spectral rejection agent.
virtual void startData(bool verbose)
Called before starting a data pass on a chunk.
simple 1-D array
static const casacore::RecordInterface & getDefaults()
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual IterMode endData()
Called after a pass is completed successfully (i.e., not stopped by start or iter methods)...
RFChunkStats: vital information and flagging stats for a visibility chunk.
Definition: RFChunkStats.h:89
Abstract base class for Record classes.
casacore::LinearFit< casacore::Float > fitter
unsigned int uInt
Definition: aipstype.h:51
casacore::uInt num_fitchan
RFDataMapper: maps complex visibilities to a single real value.
Definition: RFDataMapper.h:73