casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MultiTermAWProjectWBFT.h
Go to the documentation of this file.
00001 //# MultiTermAWProjectWBFT.h: Definition for MultiTermAWProjectWBFT
00002 //# Copyright (C) 1996,1997,1998,1999,2000,2002
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_MULTITERMAWPROJECTWBFT_H
00030 #define SYNTHESIS_MULTITERMAWPROJECTWBFT_H
00031 #define DELTAPA 1.0
00032 #define MAGICPAVALUE -999.0
00033 
00034 #include <synthesis/MeasurementComponents/AWProjectWBFT.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037   
00038   class MultiTermAWProjectWBFT : public AWProjectWBFT {
00039 
00040   public:
00041     //
00042     // Constructor: cachesize is the size of the cache in words
00043     // (e.g. a few million is a good number), tilesize is the size of
00044     // the tile used in gridding (cannot be less than 12, 16 works in
00045     // most cases).  
00046     // <group>
00047     //
00048     MultiTermAWProjectWBFT(Int nFacets, Long cachesize,
00049                            CountedPtr<CFCache>& cfcache,
00050                            CountedPtr<ConvolutionFunction>& cf,
00051                            Bool applyPointingOffset=True,
00052                            Bool doPBCorr=True,
00053                            Int tilesize=16, 
00054                            Float paSteps=5.0, 
00055                            Float pbLimit=5e-2,
00056                            Bool usezero=False) 
00057     {};
00058     // </group>
00059     
00060     // Construct from a Record containing the AWProjectWBFT state
00061     MultiTermAWProjectWBFT(const RecordInterface& stateRec) 
00062     {};
00063     
00064     // Assignment operator
00065     MultiTermAWProjectWBFT &operator=(const MultiTermAWProjectWBFT &other) 
00066     {};
00067     
00068     ~MultiTermAWProjectWBFT() 
00069     {};
00070 
00071     //
00072     // Given the sky image (Fourier transform of the visibilities),
00073     // sum of weights and the sensitivity image, this method replaces
00074     // the skyImage with the normalized image of the sky.
00075     //
00076     virtual void normalizeImage(Lattice<Complex>& skyImage,
00077                                 const Matrix<Double>& sumOfWts,
00078                                 Lattice<Float>& sensitivityImage,
00079                                 Bool fftNorm=True) 
00080     {};
00081     //
00082     // In AWProjectWBFT and its derivatives, sensitivity image is
00083     // computed by accumulating weight functions (images) during the
00084     // first gridding cycle.  AWProjectFT::makeSensitivityImage() is
00085     // overloaded in AWProjectWBFT and only issues a log message.
00086     //
00087     // The following method is used to Fourier transform normalize the
00088     // accumulated weight images.  doFFTNorm when True, the FFT
00089     // normalization (by pixel volume) is also done.
00090     //
00091     virtual void makeSensitivityImage(Lattice<Complex>& wtImage,
00092                                       ImageInterface<Float>& sensitivityImage,
00093                                       const Matrix<Float>& sumWt=Matrix<Float>(),
00094                                       const Bool& doFFTNorm=True)
00095     {};
00096     //
00097     // Method used to make normalized image from gridded visibilites.
00098     // This calls makeSensitivityImage() to make the sensitivity image
00099     // and AWProjectFT::getImage() to make the image from gridded
00100     // visibilites.  AWProjectFT::getImage() internally calls
00101     // normalizeImage() which uses the sensitivty image computed by
00102     // makeSensitivtyImage().
00103     //
00104     virtual ImageInterface<Complex>& getImage(Matrix<Float>&, Bool normalize=True)
00105     {};
00106 
00107     //
00108     // Returns True if accumulation during gridding to compute the
00109     // average PB must be done.
00110     //
00111     virtual Bool computeAvgPB(const Double& actualPA, const Double& lastPAUsedForWtImg) 
00112     {return (avgPBReady_p==False);};
00113 
00114     virtual String name() const {return "MultiTermAWProjectWBFT";};
00115 
00116     void normalizeAvgPB(ImageInterface<Complex>& inImage, ImageInterface<Float>& outImage) 
00117     {throw(AipsError("MTAWPWBFT::normalizeAvgPB(Complex,Float)"));}
00118   };
00119 } //# NAMESPACE CASA - END
00120 
00121 #endif