PSTerm.h

Go to the documentation of this file.
00001 //# PSTerm.h: Definition for PSTerm
00002 //# Copyright (C) 2007
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_PSTERM_H
00030 #define SYNTHESIS_TRANSFORM2_PSTERM_H
00031 
00032 
00033 #include <casa/Arrays/Vector.h>
00034 #include <msvis/MSVis/VisBuffer2.h>
00035 #include <images/Images/ImageInterface.h>
00036 #include <images/Images/PagedImage.h>
00037 #include <images/Images/TempImage.h>
00038 #include <scimath/Mathematics/ConvolveGridder.h>
00039 #include <synthesis/TransformMachines2/CFStore.h>
00040 #include <synthesis/TransformMachines2/CFTerms.h>
00041 
00042 namespace casa{
00043   namespace refim{
00044   // <summary>  A class to apply the W-Term to the given image </summary>
00045   
00046   // <use visibility=export>
00047   // <prerequisite>
00048   // </prerequisite>
00049   // <etymology>
00050   // W-Term to account for non co-planar baselines
00051   // </etymology>
00052   //
00053   // <synopsis> 
00054   // 
00055   //</synopsis>
00056   class PSTerm: public CFTerms
00057   {
00058   public:
00059     PSTerm(): CFTerms() {};
00060     PSTerm (const IPosition shape, 
00061             const Vector<Double>& uvScale,
00062             const Vector<Double>& uvOffset,
00063             const Double& psScale):psCtor_p() 
00064     {init(shape,uvScale,uvOffset,psScale);};
00065 
00066     virtual ~PSTerm () {};
00067 
00068     void init(const IPosition shape, 
00069               const Vector<Double>& uvScale,
00070               const Vector<Double>& uvOffset,
00071               const Double& psScale);
00072     Matrix<Complex>& operator=(Matrix<Complex>&);
00073     Matrix<Complex>& operator*=(Matrix<Complex>&);
00074 
00075     void applySky(Matrix<Complex>& screen,Bool multiply=False);
00076     void applySky(Matrix<Complex>& screen, 
00077                   const Vector<Double>& sampling,
00078                   const Int inner);
00079     void normalizeImage(Lattice<Complex>& skyImage,
00080                         const Matrix<Float>& weights);
00081     virtual String name() {return String("PS Term");};
00082 
00083     //----------------------------------------------------------
00084     // Implementation of pure-virtual methods of CFTerms parent class.
00085     // CFTerms (and its derived classes) ned clean-up so that this
00086     // kind of code is not required everywhere).
00087     int getVisParams(const VisBuffer2& vb,const CoordinateSystem& skyCoord=CoordinateSystem()) 
00088     {(void)vb;(void)skyCoord;return 0;};
00089 
00090     void setPolMap(const Vector<Int>& polMap) {(void)polMap;};
00091 
00092     virtual Float getSupportThreshold() {return 1e-3;};
00093 
00094     void applySky(ImageInterface<Float>&,// outputImages,
00095                   const VisBuffer2&,// vb, 
00096                   const Bool,// doSquint=True,
00097                   const Int&,// cfKey=0,
00098                   const Int&,// muellerTerm=0,
00099                   const Double /*freqVal=-1*/) 
00100     {};
00101 
00102     void applySky(ImageInterface<Complex>&,// outputImages,
00103                   const VisBuffer2&,// vb, 
00104                   const Bool,// doSquint=True,
00105                   const Int&,// cfKey=0,
00106                   const Int&,// muellerTerm=0,
00107                   const Double /*freqVal= -1*/ ) 
00108     {};
00109 
00110     Vector<Int> vbRow2CFKeyMap(const VisBuffer2& /*vb*/, Int& /*nUnique*/) 
00111     {Vector<Int> tt;return tt;};
00112 
00113     Int makePBPolnCoords(const VisBuffer2&,// vb,
00114                          const Int&,// convSize,
00115                          const Int&,// convSampling,
00116                          const CoordinateSystem&,// skyCoord,
00117                          const Int&,// skyNx, 
00118                          const Int&,// skyNy,
00119                          CoordinateSystem&// feedCoord
00120                          ) 
00121     {return 0;};
00122 
00123     Int getConvSize() {return 0;};
00124     Int getOversampling() {return 20;};
00125     void setConvSize(const Int) {};
00126     void setOversampling(const Int) {};
00127     Float getConvWeightSizeFactor() {return 1.0;};
00128 
00129     Bool rotationallySymmetric() {return True;};
00130 
00131   private:
00132     // spheroidal function
00133     CountedPtr<ConvolveGridder<Double, Complex> > psCtor_p;
00134     Vector<Double>  support_p;
00135     Vector<Int> sampling_p;
00136     Double psScale_p;
00137   };
00138   };
00139 };
00140 
00141 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1