casa
$Rev:20696$
|
00001 //# MFMSCleanImageSkyModel.h: Definition for MFMSCleanImageSkyModel 00002 //# Copyright (C) 1996,1997,1998,1999,2000 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_MFMSCLEANIMAGESKYMODEL_H 00030 #define SYNTHESIS_MFMSCLEANIMAGESKYMODEL_H 00031 00032 #include <synthesis/MeasurementComponents/MFCleanImageSkyModel.h> 00033 #include <lattices/Lattices/LatticeCleanProgress.h> 00034 00035 namespace casa { //# NAMESPACE CASA - BEGIN 00036 00037 //forward 00038 class SkyEquation; 00039 00040 // <summary> Image Sky Model implementing the MultiScale, MultiField Clean algorithm </summary> 00041 00042 // <use visibility=export> 00043 00044 // <reviewed reviewer="" date="" tests="" demos=""> 00045 00046 // <prerequisite> 00047 // <li> <linkto class=ImageSkyModel>ImageSkyModel</linkto> class 00048 // <li> <linkto class=MFCleanImageSkyModel>MFCleanImageSkyModel</linkto> class 00049 // <li> <linkto class=LatticeCleaner>LatticeCleaner</linkto> class 00050 // </prerequisite> 00051 // 00052 // <etymology> 00053 // MFMSCleanImageSkyModel implements the MultiScale, MultiField Clean algorithm. 00054 // It is derived from <linkto class=SkyModel>MFCleanImageSkyModel</linkto>. 00055 // </etymology> 00056 // 00057 // <synopsis> 00058 // The MF Clean is an FFT-based clean algorithm. Cleaning is 00059 // split into major and minor cycles. In a minor cycle, the 00060 // image is cleaned using an approximate PSF and the MultiScale 00061 // clean algorithm. In the major cycle, a fully correct 00062 // subtraction the of cleanned emission from the visibilities 00063 // on a pointing-by-pointing bassis is performed. 00064 // 00065 // Masking is optionally performed using a mask image: only points 00066 // where the mask is non-zero are cleaned. If no mask is specified 00067 // all points in the inner quarter of the image are cleaned. 00068 // </synopsis> 00069 // 00070 // <example> 00071 // See the example for <linkto class=SkyModel>SkyModel</linkto>. 00072 // </example> 00073 // 00074 // <motivation> 00075 // </motivation> 00076 // 00077 // <todo asof="97/10/01"> 00078 // <ul> Allow specification of more control parameters 00079 // </todo> 00080 00081 class MFMSCleanImageSkyModel : public MFCleanImageSkyModel { 00082 public: 00083 00084 // Create a MFMSCleanImageSkyModel with 4 scales, 00085 // stoplargenegatives == 2, stoppointmode==-1 00086 MFMSCleanImageSkyModel(); 00087 00088 // Create a MFMSCleanImageSkyModel with nScales, we figure out what they are 00089 // Also: stoplargenegatives controls if we stop the cycle when the largest 00090 // component goes negative; 00091 // stoppointmode controls how many of the smallest component must be 00092 // hit consecutively before we stop that cycle (-1 ==> don't stop) 00093 MFMSCleanImageSkyModel(const Int nscales, 00094 const Int stoplargenegatives=2, 00095 const Int stoppointmode=-1, 00096 const Float smallScaleBias=0.6); 00097 00098 // Create a MFMSCleanImageSkyModel, you provide the scale sizes, IN PIXELS 00099 // for example: Vector<Float> scales(4); scales(0) = 0.0; scales(1) = 3.0; 00100 // scales(2) = 10.0; scales(3) = 30.0; 00101 MFMSCleanImageSkyModel(const Vector<Float>& useScaleSize, 00102 const Int stoplargenegatives=2, 00103 const Int stoppointmode=-1, 00104 const Float smallScaleBias=0.6); 00105 00106 // destructor 00107 ~MFMSCleanImageSkyModel(); 00108 00109 // Solve for this SkyModel 00110 virtual Bool solve (SkyEquation& me); 00111 00112 private: 00113 // Chattily get the scales into userScaleSizes_p, doing some calculation if necessary. 00114 void getScales(); 00115 00116 // set the scales 00117 // void setScales(LatticeCleaner<Float>& cleaner); 00118 00119 enum Scale_Method{NSCALES, USERVECTOR}; 00120 Scale_Method method_p; 00121 00122 uInt nscales_p; 00123 Vector<Float> userScaleSizes_p; 00124 00125 LatticeCleanProgress *progress_p; 00126 00127 // parameter to stop the cycle (for the first N cycles) if you get a 00128 // negative on the largest scale; 00129 // To disable, use < 0 00130 Int stopLargeNegatives_p; 00131 00132 // parameter which stops the cycle if you hit the smallest scale this many 00133 // consecutive times; if < 0, don't stop for this 00134 Int stopPointMode_p; 00135 00136 Float smallScaleBias_p; 00137 00138 }; 00139 00140 00141 } //# NAMESPACE CASA - END 00142 00143 #endif 00144 00145