casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
IlluminationConvFunc.h
Go to the documentation of this file.
00001 //# IlluminationConvFunc.h: Definition for IlluminationConvFunc
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_ILLUMINATIONCONVFUNC_H
00030 #define SYNTHESIS_ILLUMINATIONCONVFUNC_H
00031 
00032 #include <casa/Exceptions.h>
00033 #include <synthesis/MeasurementComponents/TabulatedConvFunc.h>
00034 #include <synthesis/MeasurementComponents/ExpCache.h>
00035 #include <synthesis/MeasurementComponents/CExp.new3.h>
00036 #include <synthesis/TransformMachines/PolOuterProduct.h>
00037 
00038 namespace casa{
00039 
00040   class IlluminationConvFunc: public TabulatedConvFunc
00041   {
00042   public:
00043     IlluminationConvFunc(): TabulatedConvFunc() 
00044     {expTableReady=cexpTableReady=sigmaReady=False;pa_p=1000.0;};
00045     IlluminationConvFunc(Int n): TabulatedConvFunc(n)
00046     {expTableReady=cexpTableReady=sigmaReady=False;pa_p=1000.0;};
00047     ~IlluminationConvFunc() {};
00048 
00049     IlluminationConvFunc& operator=(const IlluminationConvFunc& /*other*/)
00050     {
00051       return *this;
00052     }
00053     IlluminationConvFunc& operator=(const ConvolutionFunction& /*other*/)
00054     {
00055       return *this;
00056     }
00057     void initExpTable(Int n, CF_TYPE step)  {ExpTable.build(n,step);expTableReady=True;};
00058     void initCExpTable(Int n)               {CExpTable.build(n);cexpTableReady=True;};
00059     void setSigma(Double s)                 {sigma = s;sigmaReady=True;}
00060 
00061     Bool isReady() {return (expTableReady & cexpTableReady & sigmaReady);}
00062 
00063     CF_TYPE area(Vector<Int>& convSupport, Vector<Double>& uvScale);
00064     Vector<Int> supportSize(Vector<Double>& uvScale);
00065 
00066     CF_TYPE getValue(Vector<CF_TYPE>& coord, Vector<CF_TYPE>& offset) 
00067     {
00068       (void)coord;(void)offset;
00069       throw(AipsError("This version of IlluminationConvFunc::getValue() is not useful."));
00070       return 0;
00071     };
00072     virtual CF_TYPE getValue(Double *coord,
00073                              Double *raoff1,  Double *raoff2, 
00074                              Double *decoff1, Double *decoff2,
00075                              Double *area,
00076                              Int *doGrad,
00077                              Complex& weight,
00078                              Complex& dweight1,
00079                              Complex& dweight2,
00080                              Double& currentCFPA
00081                              //           ,Double lsigma
00082                              );
00083     int getVisParams(const casa::VisBuffer& vb, const CoordinateSystem& skyCoord=CoordinateSystem()) 
00084     {(void)vb;(void)skyCoord;return 0;};
00085     void makeConvFunction(const casa::ImageInterface<std::complex<float> >&, 
00086                           const casa::VisBuffer&, casa::Int, 
00087                           const CountedPtr<PolOuterProduct>& ,//pop,
00088                           casa::Float, casa::Float,
00089                           const Vector<Double>& /*uvScale*/, const Vector<Double>& /*uvOffset*/,
00090                           const Matrix<Double>& /*freqSelection*/,
00091                           casa::CFStore2&, casa::CFStore2&) {};
00092     void setPolMap(const casa::Vector<int>&polMap) {(void)polMap;};
00093     void setFeedStokes(const casa::Vector<int>&feedStokes) {(void)feedStokes;};
00094     void setParams(const casa::Vector<int>& polMap, const casa::Vector<int>& feedStokes)
00095     {(void)polMap;(void)feedStokes;};
00096 
00097     Bool findSupport(Array<Complex>&, Float& ,Int&, Int&) 
00098     {throw(AipsError("IlluminationConvFunc::findSupport() not implemented"));};
00099     virtual Vector<Double> findPointingOffset(const ImageInterface<Complex>& /*image*/,
00100                                               const VisBuffer& /*vb*/)
00101     {throw(AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
00102     virtual void prepareConvFunction(const VisBuffer& /*vb*/, VBRow2CFBMapType& /*theMap*/)
00103     {throw(AipsError("IlluminationConvFunc::prepareConvFunction() not implemented"));};
00104 
00105     virtual Bool makeAverageResponse(const VisBuffer&,
00106                                      const ImageInterface<Complex>&,
00107                                      ImageInterface<Float>&,
00108                                      Bool)
00109       {throw(AipsError("IlluminationConvFunc::makeAverageRes() called"));};
00110 
00111     virtual Bool makeAverageResponse(const VisBuffer&,
00112                                      const ImageInterface<Complex>&,
00113                                      ImageInterface<Complex>&,
00114                                      Bool)
00115       {throw(AipsError("IlluminationConvFunc::makeAverageRes() called"));};
00116 
00117                   
00118   private:
00119     ExpCache<CF_TYPE> ExpTable;
00120     CExp3<CF_TYPE> CExpTable;
00121     Double sigma, pa_p;
00122     Bool expTableReady,cexpTableReady,sigmaReady;
00123   };
00124 
00125 };
00126 #endif