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

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1