casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MFCleanImageSkyModel.h
Go to the documentation of this file.
1 //# MFCleanImageSkyModel.h: Definition for MFCleanImageSkyModel
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_MFCLEANIMAGESKYMODEL_H
30 #define SYNTHESIS_MFCLEANIMAGESKYMODEL_H
31 
34 namespace casacore{
35 
36 template<class T> class Lattice;
37 template <class T> class RO_LatticeIterator;
38 }
39 
40 namespace casa { //# NAMESPACE CASA - BEGIN
41 
42 //forward
43 class SkyEquation;
44 
45 // <summary>
46 // MF Image Sky Model: Image Sky Model implementing the MF Clean algorithm
47 // </summary>
48 
49 // <use visibility=export>
50 
51 // <reviewed reviewer="" date="" tests="" demos="">
52 
53 // <prerequisite>
54 // <li> <linkto class=ImageSkyModel>ImageSkyModel</linkto> module
55 // </prerequisite>
56 //
57 // <etymology>
58 // MFCleanImageSkyModel implements the MF Clean algorithm.
59 // It is derived from <linkto class=SkyModel>SkyModel</linkto>.
60 // </etymology>
61 //
62 // <synopsis>
63 // The MF 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 MF Clean is implemented using the <linkto class=ClarkCleanModel</linkto>
71 // class.
72 //
73 // Masking is optionally performed using a mask image: only points
74 // where the mask is non-zero are cleaned. If no mask is specified
75 // all points in the inner quarter of the image are cleaned.
76 // </synopsis>
77 //
78 // <example>
79 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
80 // </example>
81 //
82 // <motivation>
83 // </motivation>
84 //
85 // <todo asof="97/10/01">
86 // <ul> Allow specification of more control parameters
87 // </todo>
88 
90 public:
91 
93 
95 
97 
98  // Solve for this SkyModel
99  virtual casacore::Bool solve (SkyEquation& me);
100 
101 
102  // Make mask and locate bounding boxes
103 
105  const casacore::Int& ny,
107  casacore::Int& xbeg,
108  casacore::Int& xend,
109  casacore::Int& ybeg,
110  casacore::Int& yend);
111 
112 protected:
113  // Return maximum abs outer sidelobe, more than nCenter pixels from the center
115  // Pointer to the progress display object
117  //Allow only one model to be valid in overlapping regions
118  void blankOverlappingModels();
119  //restore clean components in overlapping regions
121  //merge (OR) the mask in overlapping regions
122  void mergeOverlappingMasks();
123 };
124 
125 
126 } //# NAMESPACE CASA - END
127 
128 #endif
129 
130 
int Int
Definition: aipstype.h:50
MF Image Sky Model: Image Sky Model implementing the MF Clean algorithm.
virtual casacore::Int add(casacore::ImageInterface< casacore::Float > &image, const casacore::Int maxNumXfr=100)
Add an image.
virtual casacore::Bool addMask(casacore::Int image, casacore::ImageInterface< casacore::Float > &mask)
Add an mask.
casacore::Float maxOuter(casacore::Lattice< casacore::Float > &lat, const casacore::uInt nCenter)
casacore::ImageInterface< casacore::Float > & residual(casacore::Int model=0)
A readonly iterator for Lattices.
casacore::Matrix< casacore::Float > * makeMaskMatrix(const casacore::Int &nx, const casacore::Int &ny, casacore::RO_LatticeIterator< casacore::Float > &maskIter, casacore::Int &xbeg, casacore::Int &xend, casacore::Int &ybeg, casacore::Int &yend)
casacore::ImageInterface< casacore::Float > & mask(casacore::Int model=0)
Return masks.
virtual casacore::Bool solve(SkyEquation &me)
Solve for this SkyModel: This replaces the image with the residual image.
Abstract base class to monitor progress in lattice operations.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
float Float
Definition: aipstype.h:54
Image Sky Model: Image-based Model for the Sky Brightness.
virtual casacore::Bool addResidual(casacore::Int image, casacore::ImageInterface< casacore::Float > &residual)
Add a residual image.
casacore::ImageInterface< casacore::Float > & image(casacore::Int model=0)
Return actual images to be used by SkyEquation.
ClarkCleanProgress * progress_p
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42