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

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1