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

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1