casa
$Rev:20696$
|
00001 //# MFCleanImageSkyModel.h: Definition for MFCleanImageSkyModel 00002 //# Copyright (C) 1996,1997,1998,1999,2000,2003 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be adressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id$ 00028 00029 #ifndef SYNTHESIS_MFCLEANIMAGESKYMODEL_H 00030 #define SYNTHESIS_MFCLEANIMAGESKYMODEL_H 00031 00032 #include <synthesis/MeasurementComponents/CleanImageSkyModel.h> 00033 #include <synthesis/MeasurementEquations/ClarkCleanProgress.h> 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 //forward 00037 class SkyEquation; 00038 template<class T> class Lattice; 00039 template <class T> class RO_LatticeIterator; 00040 00041 // <summary> 00042 // MF Image Sky Model: Image Sky Model implementing the MF Clean algorithm 00043 // </summary> 00044 00045 // <use visibility=export> 00046 00047 // <reviewed reviewer="" date="" tests="" demos=""> 00048 00049 // <prerequisite> 00050 // <li> <linkto class=ImageSkyModel>ImageSkyModel</linkto> module 00051 // </prerequisite> 00052 // 00053 // <etymology> 00054 // MFCleanImageSkyModel implements the MF Clean algorithm. 00055 // It is derived from <linkto class=SkyModel>SkyModel</linkto>. 00056 // </etymology> 00057 // 00058 // <synopsis> 00059 // The MF Clean is an FFT-based clean algorithm. Cleaning is 00060 // split into major and minor cycles. In a minor cycle, the 00061 // brightest pixels are cleaned using only the strongest sidelobes 00062 // (and main lobe) of the PSF. In the major cycle, a fully correct 00063 // subtraction of the PSF is done for all points accumulated in the 00064 // minor cycle using an FFT-based convolution for speed. 00065 // 00066 // The MF Clean is implemented using the <linkto class=ClarkCleanModel</linkto> 00067 // class. 00068 // 00069 // Masking is optionally performed using a mask image: only points 00070 // where the mask is non-zero are cleaned. If no mask is specified 00071 // all points in the inner quarter of the image are cleaned. 00072 // </synopsis> 00073 // 00074 // <example> 00075 // See the example for <linkto class=SkyModel>SkyModel</linkto>. 00076 // </example> 00077 // 00078 // <motivation> 00079 // </motivation> 00080 // 00081 // <todo asof="97/10/01"> 00082 // <ul> Allow specification of more control parameters 00083 // </todo> 00084 00085 class MFCleanImageSkyModel : public CleanImageSkyModel { 00086 public: 00087 00088 virtual Int add(ImageInterface<Float>& image, const Int maxNumXfr=100); 00089 00090 virtual Bool addResidual(Int image, ImageInterface<Float>& residual); 00091 00092 virtual Bool addMask(Int image, ImageInterface<Float>& mask); 00093 00094 // Solve for this SkyModel 00095 virtual Bool solve (SkyEquation& me); 00096 00097 00098 // Make mask and locate bounding boxes 00099 00100 Matrix<Float>* makeMaskMatrix(const Int& nx, 00101 const Int& ny, 00102 RO_LatticeIterator<Float>& maskIter, 00103 Int& xbeg, 00104 Int& xend, 00105 Int& ybeg, 00106 Int& yend); 00107 00108 protected: 00109 // Return maximum abs outer sidelobe, more than nCenter pixels from the center 00110 Float maxOuter(Lattice<Float> & lat, const uInt nCenter ); 00111 // Pointer to the progress display object 00112 ClarkCleanProgress *progress_p; 00113 //Allow only one model to be valid in overlapping regions 00114 void blankOverlappingModels(); 00115 //restore clean components in overlapping regions 00116 void restoreOverlappingModels(); 00117 //merge (OR) the mask in overlapping regions 00118 void mergeOverlappingMasks(); 00119 }; 00120 00121 00122 } //# NAMESPACE CASA - END 00123 00124 #endif 00125 00126