WPConvFunc.h

Go to the documentation of this file.
00001 //# WPConvFunc.h: Definition for WPConvFunc
00002 //# Copyright (C) 2007-2016
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 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_WPCONVFUNC_H
00030 #define SYNTHESIS_WPCONVFUNC_H
00031 
00032 
00033 #include <casa/Arrays/Vector.h>
00034 #include <casa/Containers/Block.h>
00035 #include <casa/Utilities/CountedPtr.h>
00036 
00037 namespace casa{
00038 
00039   // <summary>  A class to support FTMachines get their convolution Function </summary>
00040   
00041   // <use visibility=export>
00042   // <prerequisite>
00043   //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
00044 // </prerequisite>
00045   // <etymology>
00046   // WP for W-Projection 
00047   // ConvFunc => returns the convolution functions
00048   // </etymology>
00049   //
00050   // <synopsis> 
00051   // FTMachines like WProjection and MosaicFT need convolution functions to 
00052   // deal with directional dependent issues...
00053   // this class and related ones provide and cache  such functions for re-use 
00054   //</synopsis>
00055   template<class T> class ImageInterface;
00056   template<class T> class Matrix;
00057   class VisBuffer;
00058 
00059   class WPConvFunc 
00060     {
00061     public:
00062       WPConvFunc(const Double minW=-1.0, const Double maxW=-1.0, const Double rmsW=-1.0);
00063       WPConvFunc(const RecordInterface& rec);
00064       //Copy constructor
00065       WPConvFunc(const WPConvFunc& other);
00066       //
00067       WPConvFunc& operator=(const WPConvFunc&other);
00068 
00069       virtual ~WPConvFunc();
00070 
00071       // Inputs are the image, visbuffer,  wConvsize
00072       // findconv return a cached convolution function appropriate for this 
00073       // visbuffer and number of w conv plane
00074       void findConvFunction(const ImageInterface<Complex>& iimage, 
00075                             const VisBuffer& vb,
00076                             const Int& wConvSize,
00077                             const Vector<Double>& uvScale,
00078                             const Vector<Double>& uvOffset,
00079                             const Float& padding, 
00080                             Int& convSampling,
00081                             Cube<Complex>& convFunc, 
00082                             Int& convsize,
00083                             Vector<Int>& convSupport,
00084                             Double& wScale);
00085 
00086       Bool findSupport(Array<Complex>& /*func*/, Float& /*threshold*/,Int& /*origin*/, Int& /*R*/) 
00087     {throw(AipsError("IlluminationConvFunc::findSupport() not implemented"));};
00088       virtual Bool makeAverageResponse(const VisBuffer& /*vb*/, 
00089                                        const ImageInterface<Complex>& /*image*/,
00090                                      //                              TempImage<Float>& theavgPB,
00091                                        ImageInterface<Float>& /*theavgPB*/,
00092                                        Bool /*reset=True*/)
00093     {throw(AipsError("WPConvFunc::makeAverageRes() called"));};
00094       //Serialization
00095       Bool toRecord(RecordInterface& rec);
00096       Bool fromRecord(String& err, const RecordInterface& rec);
00097       
00098       
00099     private:
00100       Bool checkCenterPix(const ImageInterface<Complex>& image);
00101       Block <CountedPtr<Cube<Complex> > > convFunctions_p;
00102       Block <CountedPtr<Vector<Int> > > convSupportBlock_p;
00103       SimpleOrderedMap <String, Int> convFunctionMap_p;
00104       Vector<Int> convSizes_p;
00105 
00106       Int actualConvIndex_p;
00107       Int convSize_p;
00108       Vector<Int> convSupport_p;
00109       Cube<Complex> convFunc_p;
00110       Double wScaler_p;
00111       Int convSampling_p;
00112       Int nx_p, ny_p;
00113       Double minW_p, maxW_p, rmsW_p;
00114       
00115 
00116     };
00117 };// end of namespace
00118 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1