casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CSCleanImageSkyModel.h
Go to the documentation of this file.
00001 //# CSCleanImageSkyModel.h: Definition for CSCleanImageSkyModel
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_CSCLEANIMAGESKYMODEL_H
00030 #define SYNTHESIS_CSCLEANIMAGESKYMODEL_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 
00040 // <summary> 
00041 // CS Image Sky Model: Image Sky Model implementing the CS Clean algorithm
00042 // </summary>
00043 
00044 // <use visibility=export>
00045 
00046 // <reviewed reviewer="" date="" tests="" demos="">
00047 
00048 // <prerequisite>
00049 //   <li> <linkto class=ImageSkyModel>ImageSkyModel</linkto> module
00050 // </prerequisite>
00051 //
00052 // <etymology>
00053 // CSCleanImageSkyModel implements the Cotton-Schwab Clean algorithm.
00054 // It is derived from <linkto class=SkyModel>SkyModel</linkto>.
00055 // </etymology>
00056 //
00057 // <synopsis> 
00058 // The CS Clean is an FFT-based clean algorithm. Cleaning is
00059 // split into major and minor cycles. In a minor cycle, the
00060 // brightest pixels are cleaned using only the strongest sidelobes
00061 // (and main lobe) of the PSF. In the major cycle, a fully correct
00062 // subtraction of the PSF is done for all points accumulated in the
00063 // minor cycle by degridding and degridding.
00064 //
00065 // The CS Clean is implemented using the <linkto class=ClarkCleanModel</linkto>
00066 // class.
00067 //
00068 // Masking is optionally performed using a mask image: only points
00069 // where the mask is non-zero are cleaned. If no mask is specified
00070 // all points in the inner quarter of the image are cleaned.
00071 // </synopsis> 
00072 //
00073 // <example>
00074 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
00075 // </example>
00076 //
00077 // <motivation>
00078 // </motivation>
00079 //
00080 // <todo asof="97/10/01">
00081 // <ul> Allow specification of more control parameters
00082 // </todo>
00083 
00084 class CSCleanImageSkyModel : public CleanImageSkyModel {
00085 public:
00086 
00087   virtual Int add(ImageInterface<Float>& image, const Int maxNumXfr=100);
00088 
00089   virtual Bool addResidual(Int image, ImageInterface<Float>& residual);
00090 
00091   virtual Bool addMask(Int image, ImageInterface<Float>& mask);
00092 
00093   // Solve for this SkyModel
00094   virtual Bool solve (SkyEquation& me);
00095 
00096 protected:
00097   // Return the maximum absolute value per field
00098   Float maxField(Block<Vector<Float> >& imagemax, Block<Vector<Float> >& imagemin);
00099   // Return maximum abs outer sidelobe, more than nCenter pixels from the center
00100   Vector<Float> outerMinMax(Lattice<Float> & lat, const uInt nCenter );
00101   // Pointer to the progress display object
00102   ClarkCleanProgress *progress_p;
00103 
00104 };
00105 
00106 
00107 } //# NAMESPACE CASA - END
00108 
00109 #endif
00110 
00111