casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MSCleanImageSkyModel.h
Go to the documentation of this file.
00001 //# MSCleanImageSkyModel.h: Definition for MSCleanImageSkyModel
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_MSCLEANIMAGESKYMODEL_H
00030 #define SYNTHESIS_MSCLEANIMAGESKYMODEL_H
00031 
00032 #include <synthesis/MeasurementComponents/CleanImageSkyModel.h>
00033 #include <lattices/Lattices/LatticeCleanProgress.h>
00034 
00035 namespace casa { //# NAMESPACE CASA - BEGIN
00036 
00037 //forward
00038 class SkyEquation;
00039 
00040 // <summary> 
00041 // MS Clean Image Sky Model: Image Sky Model implementing the MS Clean algorithm
00042 // </summary>
00043 
00044 // <use visibility=export>
00045 
00046 // <reviewed reviewer="" date="" tests="" demos="">
00047 
00048 // <prerequisite>
00049 //   <li> <linkto class=LatticeCleaner>LatticeCleaner</linkto> module
00050 //   <li> <linkto class=ImageSkyModel>ImageSkyModel</linkto> module
00051 //   <li> <linkto class=LinearModel>LinearModel</linkto> module
00052 // </prerequisite>
00053 //
00054 // <etymology>
00055 // MSCleanImageSkyModel implements the MS Clean algorithm.
00056 // It is derived from <linkto class=SkyModel>SkyModel</linkto>.
00057 // </etymology>
00058 //
00059 // <synopsis> 
00060 // The MS Clean is the Multi-Scale clean, collecting flux
00061 // in several different scale size Gaussian components.
00062 // It is highly effective in imaging extended structure
00063 // and results in residuals with excellent statistics.
00064 //
00065 // The MS Clean is implemented using the 
00066 // <linkto class=LatticeCleaner>LatticeCleaner</linkto>
00067 // class.
00068 //
00069 // Masking is optionally performed using a mask image: only points
00070 // where the mask is non-zero are searched for Gaussian components. 
00071 // This can cause some difficulty, as the different Gaussian scale
00072 // sizes will extend beyond the mask by different amounts.
00073 // If no mask is specified
00074 // all points in the inner quarter of the image are cleaned.
00075 // </synopsis> 
00076 //
00077 // <example>
00078 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
00079 // </example>
00080 //
00081 // <motivation>
00082 // </motivation>
00083 //
00084 // <todo asof="99/04/07">
00085 // <ul> Improve the masking.
00086 // </todo>
00087 
00088 class MSCleanImageSkyModel : public CleanImageSkyModel {
00089 public:
00090 
00091   // Create a MSCleanImageSkyModel with nScales, we figure out what they are
00092   MSCleanImageSkyModel(const Int nscales, const Int stoplargenegatives=2,
00093                          const Int stoppointmode=-1, const Float smallScaleBias=0.6);
00094 
00095   // Create a MSCleanImageSkyModel, you provide the scale sizes, IN PIXELS
00096   // for example:  Vector<Float> scales(4); scales(0) = 0.0;  scales(1) = 3.0;  
00097   // scales(2) = 10.0;  scales(3) = 30.0; 
00098   MSCleanImageSkyModel(const Vector<Float>& useScaleSize, const Int stoplargenegatives=2,
00099                          const Int stoppointmode=-1, const Float smallScaleBias=0.6);
00100  
00101   // destructor
00102   ~MSCleanImageSkyModel();
00103 
00104   // Solve for this SkyModel
00105   virtual Bool solve (SkyEquation& me);
00106 
00107 private:
00108   enum Scale_Method{NSCALES, USERVECTOR};
00109   Scale_Method method_p;
00110 
00111   Int nscales_p;
00112   Vector<Float> userScaleSizes_p;
00113   // parameter to stop the cycle (for the first N cycles) if you get a 
00114   // negative on the largest scale;
00115   // To disable, use < 0
00116   Int stopLargeNegatives_p;
00117 
00118   // parameter which stops the cycle if you hit the smallest scale this many
00119   // consecutive times; if < 0, don't stop for this
00120   Int stopPointMode_p;
00121   Float smallScaleBias_p; 
00122 
00123   //LatticeCleanProgress  *progress_p;
00124 
00125 };
00126 
00127 
00128 } //# NAMESPACE CASA - END
00129 
00130 #endif
00131 
00132