casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
VLAIlluminationConvFunc.h
Go to the documentation of this file.
00001 //# VLAIlluminationConvFunc.h: Definition for VLAIlluminationConvFunc
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_VLAILLUMINATIONCONVFUNC_H
00030 #define SYNTHESIS_VLAILLUMINATIONCONVFUNC_H
00031 
00032 #include <synthesis/TransformMachines/IlluminationConvFunc.h>
00033 #include <synthesis/MeasurementComponents/CExp.new3.h>
00034 #include <synthesis/MeasurementComponents/ExpCache.h>
00035 #include <images/Images/TempImage.h>
00036 #include <casa/Exceptions.h>
00037 #include <synthesis/MSVis/VisBuffer.h>
00038 namespace casa
00039 {
00040   class VLAIlluminationConvFunc: public IlluminationConvFunc
00041   {
00042   public:
00043     VLAIlluminationConvFunc(String fileName);
00044     VLAIlluminationConvFunc()
00045       :IlluminationConvFunc(),convFunc_p(),resolution()
00046     {pbRead_p=False;};
00047     VLAIlluminationConvFunc(Int n):IlluminationConvFunc(n)    {pbRead_p=False;};
00048     ~VLAIlluminationConvFunc() {};
00049 
00050     void load(String &fileName,Vector<Int>& whichStokes, 
00051               Float overSampling=20,Bool putCoords=True);
00052     void storeImg(String &fileName,ImageInterface<Complex>& img);
00053     void storeImg(String &fileName,ImageInterface<Float>& img);
00054     void store(String &fileName);
00055     void loadFromImage(String &fileName);
00056     void getIdealConvFunc(Array<Complex>& buf);
00057     void ftAperture(TempImage<Complex>& uvgrid);
00058     void ftAperture() {ftAperture(convFunc_p); pbRead_p=True;};
00059     void storePB(String& fileName);
00060 
00061     Bool pbReady() {return pbRead_p;}
00062 
00063     CoordinateSystem makeUVCoords(CoordinateSystem& imageCoordSys,
00064                                    IPosition& shape);
00065     void regridApeture(CoordinateSystem& skyCS, IPosition& skyShape, TempImage<Complex>& uvGrid, 
00066                        const VisBuffer& vb,Bool doSquint=True);
00067     void applyPB(ImageInterface<Float>& pbImage, const VisBuffer& vb);
00068     void applyPB(ImageInterface<Complex>& pbImage, const VisBuffer& vb);
00069     void ftAperture(String& fileName, Vector<Int>& whichStokes,
00070                    Float& overSampling, const CoordinateSystem& coordSys);
00071 
00072     /*
00073     virtual CF_TYPE getValue(Double *coord,
00074                              Double *raoff1,  Double *raoff2, 
00075                              Double *decoff1, Double *decoff2,
00076                              Double *area,
00077                              Int *doGrad,
00078                              Complex& weight,
00079                              Complex& dweight1,
00080                              Complex& dweight2
00081                              //           ,Double lsigma
00082                              );
00083     */    
00084   private:
00085     
00086     void fillPB(ImageInterface<Complex>& inImg, ImageInterface<Float>& outImg);
00087     void fillPB(ImageInterface<Complex>& inImg, ImageInterface<Complex>& outImg);
00088 
00089     TempImage<Complex> convFunc_p;
00090     //    TempImage<Float> reAperture_p, imAperture_p;
00091     Vector<Double> resolution;
00092     Bool pbRead_p;
00093     Float freq_p;
00094   };
00095 
00096 };
00097 #endif