casa
$Rev:20696$
|
00001 //# WPConvFunc.h: Definition for PixelatedConvFunc 00002 //# Copyright (C) 2007 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_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(); 00063 WPConvFunc(const RecordInterface& rec); 00064 virtual ~WPConvFunc(); 00065 00066 // Inputs are the image, visbuffer, wConvsize 00067 // findconv return a cached convolution function appropriate for this 00068 // visbuffer and number of w conv plane 00069 void findConvFunction(const ImageInterface<Complex>& iimage, 00070 const VisBuffer& vb, 00071 const Int& wConvSize, 00072 const Vector<Double>& uvScale, 00073 const Vector<Double>& uvOffset, 00074 const Float& padding, 00075 Int& convSampling, 00076 Cube<Complex>& convFunc, 00077 Int& convsize, 00078 Vector<Int>& convSupport, 00079 Double& wScale); 00080 00081 Bool findSupport(Array<Complex>& /*func*/, Float& /*threshold*/,Int& /*origin*/, Int& /*R*/) 00082 {throw(AipsError("IlluminationConvFunc::findSupport() not implemented"));}; 00083 virtual Bool makeAverageResponse(const VisBuffer& /*vb*/, 00084 const ImageInterface<Complex>& /*image*/, 00085 // TempImage<Float>& theavgPB, 00086 ImageInterface<Float>& /*theavgPB*/, 00087 Bool /*reset=True*/) 00088 {throw(AipsError("WPConvFunc::makeAverageRes() called"));}; 00089 //Serialization 00090 Bool toRecord(RecordInterface& rec); 00091 Bool fromRecord(String& err, const RecordInterface& rec); 00092 private: 00093 Bool checkCenterPix(const ImageInterface<Complex>& image); 00094 Block <CountedPtr<Cube<Complex> > > convFunctions_p; 00095 Block <CountedPtr<Vector<Int> > > convSupportBlock_p; 00096 SimpleOrderedMap <String, Int> convFunctionMap_p; 00097 Vector<Int> convSizes_p; 00098 00099 Int actualConvIndex_p; 00100 Int convSize_p; 00101 Vector<Int> convSupport_p; 00102 Cube<Complex> convFunc_p; 00103 Double wScale_p; 00104 Int convSampling_p; 00105 Int nx_p, ny_p; 00106 00107 00108 }; 00109 };// end of namespace 00110 #endif