VLACalcIlluminationConvFunc.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_VLACALCILLUMINATIONCONVFUNC_H
00030 #define SYNTHESIS_VLACALCILLUMINATIONCONVFUNC_H
00031 
00032 #include <synthesis/TransformMachines/IlluminationConvFunc.h>
00033 //#include <synthesis/MeasurementComponents/BeamCalcConstants.h>
00034 #include <synthesis/TransformMachines/BeamCalc.h>
00035 //#include <synthesis/MeasurementComponents/BeamCalcAntenna.h>
00036 #include <synthesis/MeasurementComponents/CExp.new3.h>
00037 #include <synthesis/MeasurementComponents/ExpCache.h>
00038 #include <images/Images/TempImage.h>
00039 #include <casa/Exceptions.h>
00040 #include <msvis/MSVis/VisBuffer.h>
00041 #include <casa/sstream.h>
00042 #include <synthesis/TransformMachines/Utils.h>
00043 namespace casa{
00044 
00045   //  Int getVLABandID(Double& freq,String&telescopeName);
00046   class VLACalcIlluminationConvFunc: public IlluminationConvFunc
00047   {
00048   public:
00049 
00050     VLACalcIlluminationConvFunc();
00051     VLACalcIlluminationConvFunc(Int n):
00052       IlluminationConvFunc(n),
00053       convFunc_p(),resolution(),pbRead_p(False),freq_p(0),lastPA(0),ap()
00054     {pbRead_p=False;};
00055     ~VLACalcIlluminationConvFunc() {delete ap.aperture;};
00056 
00057     void setBandID(Int bandID) {ap.band=bandID;}
00058     // void storeImg(String &fileName,ImageInterface<Complex>& img);
00059     // void storeImg(String &fileName,ImageInterface<Float>& img);
00060     // void store(String &fileName);
00061     void loadFromImage(String &fileName);
00062     void getIdealConvFunc(Array<Complex>& buf);
00063     //void ftAperture(TempImage<Complex>& uvgrid);
00064     void ftAperture(TempImage<Complex>& uvgrid, Bool makeMueller);
00065     void ftAperture(TempImage<Complex>& uvgrid, Int makeMuerller=0);
00066     void ftAperture() {ftAperture(convFunc_p); pbRead_p=True;};
00067     void storePB(String& fileName);
00068 
00069     Bool pbReady() {return pbRead_p;}
00070 
00071     CoordinateSystem makeUVCoords(CoordinateSystem& imageCoordSys,
00072                                   IPosition& shape, Double refFreq=-1.0);
00073     void regridAperture(CoordinateSystem& skyCS, 
00074                         IPosition& skyShape, 
00075                         TempImage<Complex>& uvGrid, 
00076                         //const VisBuffer& vb,
00077                         Double& pa,
00078                         Bool doSquint=True,Int bandID=-1,Int muellerTerm=0 ,Double freqVal=-1.0);
00079     void regridAperture(CoordinateSystem& skyCS,
00080                         IPosition& skyShape,
00081                         TempImage<Complex>& uvGrid,
00082                         const VisBuffer &vb,
00083                         const Vector<Float>& paList,
00084                         Bool doSquint, Int bandID);
00085     void regridApertureEngine(ApertureCalcParams& ap,
00086                               const Int& inStokes);
00087     void setApertureParams(ApertureCalcParams& ap,
00088                            const Float& Freq, const Float& pa, 
00089                            const Int& bandID,
00090                            const Int& inStokes,
00091                            const IPosition& skyShape,
00092                            const Vector<Double>& uvIncr);
00093 
00094 
00095     void applyPB(ImageInterface<Float>& pbImage, Double& pa,//const VisBuffer& vb, 
00096                  const Vector<Float>& paList, Int bandID, Bool doSquint=False);
00097     void applyPB(ImageInterface<Float>& pbImage, Double& pa,//const VisBuffer& vb, 
00098                  Int bandID=-1, Bool doSquint=False, Double freqVal=-1.0);
00099     void applyPB(ImageInterface<Complex>& pbImage, Double& pa,//const VisBuffer& vb, 
00100                  Bool doSquint=True,Int bandID=-1, Int muellerTerm=0, Double freqVal=-1.0);
00101     void applyPBSq(ImageInterface<Float>& pbImage, Double& pa,//const VisBuffer& vb, 
00102                    const Vector<Float>& paList, Int bandID, Bool doSquint=False);
00103     void applyPBSq(ImageInterface<Float>& pbImage, Double& pa,//const VisBuffer& vb, 
00104                    Int bandID=-1, Bool doSquint=False);
00105     void applyPBSq(ImageInterface<Complex>& pbImage, Double& pa,//const VisBuffer& vb, 
00106                    Int bandID=-1,  Bool doSquint=True);
00107     void makeFullJones(ImageInterface<Complex>& pbImage, const VisBuffer& vb, Bool doSquint, 
00108                Int bandID, Double freqVal=-1.0);
00109     void skyMuller(ImageInterface<Complex>& skyJones);
00110     void skyMuller(ImageInterface<Complex>& skyJones, Int muellerTerm=0);
00111     void skyMuller(Array<Complex>& skyJones, const IPosition& shape, const Int& inStokes);
00112 
00113     Bool findSupport(Array<Complex>& /*func*/, Float& /*threshold*/,Int& /*origin*/, Int& /*R*/)
00114     {throw(AipsError("VLACalcIlluminationConvFunc::findSupport() not implemented"));};
00115     virtual Bool makeAverageResponse(const VisBuffer& /*vb*/,
00116                                      const ImageInterface<Complex>& /*image*/,
00117                                      //                              TempImage<Float>& theavgPB,
00118                                      ImageInterface<Float>& /*theavgPB*/,
00119                                      Bool /*reset*/=True)
00120     {throw(AipsError("VLACalc::makeAverageRes() called"));};
00121 
00122 
00123   private:
00124     
00125     void fillPB(ImageInterface<Complex>& inImg, ImageInterface<Float>& outImg, Bool Square=False);
00126     void fillPB(ImageInterface<Complex>& inImg, ImageInterface<Complex>& outImg, Bool Square=False);
00127 
00128     TempImage<Complex> convFunc_p;
00129     //    TempImage<Float> reAperture_p, imAperture_p;
00130     Vector<Double> resolution;
00131     Bool pbRead_p;
00132     Float freq_p,lastPA;
00133     ApertureCalcParams ap;
00134   };
00135 
00136 };
00137 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1