casa
$Rev:20696$
|
00001 //# PixelatedConvFunc.h: Definition for PixelatedConvFunc 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_PIXELATEDCONVFUNC_H 00030 #define SYNTHESIS_PIXELATEDCONVFUNC_H 00031 00032 #include <casa/Arrays/Vector.h> 00033 //#include <synthesis/MeasurementComponents/Exp.h> 00034 #include <synthesis/MeasurementComponents/CExp.h> 00035 #include <synthesis/TransformMachines/ConvolutionFunction.h> 00036 00037 namespace casa{ 00038 00039 template <class T> class PixelatedConvFunc: public ConvolutionFunction 00040 { 00041 public: 00042 PixelatedConvFunc():ConvolutionFunction() {}; 00043 PixelatedConvFunc(IPosition& shape):ConvolutionFunction(shape.nelements()) 00044 {setSize(shape);} 00045 ~PixelatedConvFunc() {}; 00046 00047 virtual void setSize(IPosition& size) 00048 { 00049 nDim=size.nelements(); 00050 shape=size; 00051 cache.resize(shape); 00052 }; 00053 00054 virtual T getValue(Vector<T>& coord, Vector<T>& offset) { return (T)(1.0);}; 00055 virtual int getVisParams(const VisBuffer& vb,const CoordinateSystem& skyCoord=CoordinateSystem()) {return 0;}; 00056 virtual void makeConvFunction(const ImageInterface<Complex>& image, 00057 const VisBuffer& vb, 00058 const Int wConvSize, 00059 const Float pa, 00060 const Float dpa, 00061 CFStore& cfs, 00062 CFStore& cfwts) {}; 00063 virtual void setPolMap(const Vector<Int>& polMap) {(void)polMap;}; 00064 virtual void setFeedStokes(const Vector<Int>& feedStokes){(void)feedStokes;}; 00065 PixelatedConvFunc& operator=(const PixelatedConvFunc& other) 00066 { 00067 cerr << "******* PixelatedConvFunc& operator=(PixelatedConvFunc&) called!" << endl; 00068 return *this; 00069 } 00070 PixelatedConvFunc& operator=(const ConvolutionFunction& other) 00071 { 00072 cerr << "******* PixelatedConvFunc& operator=(ConvolutionFunction&) called!" << endl; 00073 return *this; 00074 } 00075 virtual Bool makeAverageResponse(const VisBuffer& vb, 00076 const ImageInterface<Complex>& image, 00077 ImageInterface<Complex>& theavgPB, 00078 Bool reset=True) 00079 {throw(AipsError("PixelatedConvFunc::makeAverageRes(Complex) called"));}; 00080 virtual void prepareConvFunction(const VisBuffer& vb, CFStore& cfs) {}; 00081 00082 private: 00083 Int nDim; 00084 IPosition shape; 00085 Array<T> cache; 00086 }; 00087 00088 }; 00089 00090 #endif