casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClarkCleanImageSkyModel.h
Go to the documentation of this file.
1 //# ClarkCleanImageSkyModel.h: Definition for ClarkCleanImageSkyModel
2 //# Copyright (C) 1996,1997,1998,1999,2000,2003
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 adressed 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 //#
27 //# $Id$
28 
29 #ifndef SYNTHESIS_CLARKCLEANIMAGESKYMODEL_H
30 #define SYNTHESIS_CLARKCLEANIMAGESKYMODEL_H
31 
33 namespace casacore{
34 
35 template <class T> class SubLattice;
36 template <class T> class RO_LatticeIterator;
37 }
38 
39 namespace casa { //# NAMESPACE CASA - BEGIN
40 
41 //forward
42 class SkyEquation;
43 class ClarkCleanProgress;
44 // <summary>
45 // Clark Image Sky Model: Image Sky Model implementing the Clark Clean algorithm
46 // </summary>
47 
48 // <use visibility=export>
49 
50 // <reviewed reviewer="" date="" tests="" demos="">
51 
52 // <prerequisite>
53 // <li> <linkto class=ImageSkyModel>ImageSkyModel</linkto> module
54 // <li> <linkto class=ClarkCleanLatModel>ClarkCleanLatModel</linkto> module
55 // </prerequisite>
56 //
57 // <etymology>
58 // ClarkCleanImageSkyModel implements the Clark Clean algorithm.
59 // It is derived from <linkto class=SkyModel>SkyModel</linkto>.
60 // </etymology>
61 //
62 // <synopsis>
63 // The Clark Clean is an FFT-based clean algorithm. Cleaning is
64 // split into major and minor cycles. In a minor cycle, the
65 // brightest pixels are cleaned using only the strongest sidelobes
66 // (and main lobe) of the PSF. In the major cycle, a fully correct
67 // subtraction of the PSF is done for all points accumulated in the
68 // minor cycle using an FFT-based convolution for speed.
69 //
70 // The Clark Clean is implemented using the
71 // <linkto class=ClarkCleanLatModel>ClarkCleanLatModel</linkto>
72 // class.
73 //
74 // Masking is optionally performed using a mask image: only points
75 // where the mask is non-zero are cleaned. If no mask is specified
76 // all points in the inner quarter of the image are cleaned.
77 // </synopsis>
78 //
79 // <example>
80 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
81 // </example>
82 //
83 // <motivation>
84 // </motivation>
85 //
86 // <todo asof="97/10/01">
87 // <ul> Allow specification of more control parameters
88 // </todo>
89 
91 public:
92 
93  // constructor
95 
96  // destructor
98 
99  // Solve for this SkyModel
100  virtual casacore::Bool solve (SkyEquation& me);
101 
102  //Do the image-based clean
103  //iterused and maxresidual are return values
106 
107 private:
108  //make a mask sub-lattice
109 
111  const casacore::Int& ny, casacore::Int& newNx, casacore::Int& newNy,
113  casacore::Int& xbeg, casacore::Int& xend,
114  casacore::Int& ybeg, casacore::Int& yend);
115 
117 
118 };
119 
120 
121 } //# NAMESPACE CASA - END
122 
123 #endif
124 
125 
126 
127 
128 
129 
130 
static casacore::Bool clean(casacore::ImageInterface< casacore::Float > &image, casacore::ImageInterface< casacore::Float > &residual, casacore::ImageInterface< casacore::Float > &psf, casacore::ImageInterface< casacore::Float > &mask, casacore::Float &maxresidual, casacore::Int &iterused, casacore::Float gain, casacore::Int numIter, casacore::Float thresh, casacore::Float cycleFactor, casacore::Bool useMask=false, casacore::Bool doPolJoint=true)
Do the image-based clean iterused and maxresidual are return values.
A subset of a Lattice or MaskedLattice.
int Int
Definition: aipstype.h:50
ClarkCleanImageSkyModel()
constructor
casacore::Float gain()
Definition: Iterate.h:63
casacore::ImageInterface< casacore::Float > & residual(casacore::Int model=0)
A readonly iterator for Lattices.
casacore::ImageInterface< casacore::Float > & mask(casacore::Int model=0)
Return masks.
Abstract base class to monitor progress in lattice operations.
virtual casacore::Bool solve(SkyEquation &me)
Solve for this SkyModel.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
float Float
Definition: aipstype.h:54
Clark Image Sky Model: Image Sky Model implementing the Clark Clean algorithm.
~ClarkCleanImageSkyModel()
destructor
Image Sky Model: Image-based Model for the Sky Brightness.
casacore::ImageInterface< casacore::Float > & image(casacore::Int model=0)
Return actual images to be used by SkyEquation.
static casacore::Lattice< casacore::Float > * makeMaskSubLat(const casacore::Int &nx, const casacore::Int &ny, casacore::Int &newNx, casacore::Int &newNy, casacore::RO_LatticeIterator< casacore::Float > &maskIter, casacore::Int &xbeg, casacore::Int &xend, casacore::Int &ybeg, casacore::Int &yend)
make a mask sub-lattice
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42