CFTerms.h

Go to the documentation of this file.
00001 //# CFTerms.h: Definition for CFTerms
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_CFTERMS_H
00030 #define SYNTHESIS_TRANSFORM2_CFTERMS_H
00031 
00032 
00033 #include <casa/Arrays/Vector.h>
00034 #include <images/Images/ImageInterface.h>
00035 #include <images/Images/PagedImage.h>
00036 #include <images/Images/TempImage.h>
00037 #include <msvis/MSVis/VisBuffer2.h>
00038 #include <casa/Containers/Block.h>
00039 
00040 namespace casa{
00041   namespace refim{
00042   using namespace vi;
00043   // <summary>  
00044   //  The base class to represent the Aperture-Term of the Measurement Equation. 
00045   // </summary>
00046   
00047   // <use visibility=export>
00048   // <prerequisite>
00049   // </prerequisite>
00050   // <etymology>
00051   //   A-Term to account for the effects of the antenna primary beam(s).
00052   // </etymology>
00053   //
00054   // <synopsis> 
00055   // 
00056   //</synopsis>
00057   class CFTerms
00058   {
00059   public:
00060     enum OpCodes {NOOP=0,NORMAL};
00061     CFTerms ():opCode_p(NORMAL) {};
00062     virtual ~CFTerms () {};
00063 
00064     virtual void setOpCode(OpCodes code) {opCode_p = code;}
00065     virtual Bool isNoOp() {return opCode_p==NOOP;};
00066 
00067     virtual String name() = 0;
00068 
00069     virtual void applySky(ImageInterface<Float>& outputImages,
00070                           const VisBuffer2& vb, 
00071                           const Bool doSquint=True,
00072                           const Int& cfKey=0,
00073                           const Int& muellerTerms=0,
00074                           const Double freqVal=-1) = 0;
00075     virtual void applySky(ImageInterface<Complex>& outputImages,
00076                           const VisBuffer2& vb, 
00077                           const Bool doSquint=True,
00078                           const Int& cfKey=0,
00079                           const Int& muellerTerms=0,
00080                           const Double freqVal=-1) = 0;
00081     //
00082     // Not sure if the following method is requried.  Leaving it in
00083     // the code for now with an implementation that does nothing.
00084     //
00085     // virtual void applySky(Matrix<Complex>& screen, const Int wPixel, 
00086     //                    const Vector<Double>& sampling,
00087     //                    const Int wConvSize, const Double wScale,
00088     //                    const Int inner) 
00089     // {(void)screen; (void)wPixel; (void)sampling; (void)wConvSize; (void)wScale; (void)inner;};
00090 
00091     //
00092     // Returns a vector of integers that map each row in the given
00093     // VisBuffer to an index that is used to pick the appropriate
00094     // convolution function plane.  It also returns the number of
00095     // unique baselines in the nUnique parameter (unique baselines are
00096     // defined as the number of baselines each requiring a unique
00097     // convolution function).
00098     //
00099     // This is required for Heterogeneous antenna arrays (like ALMA)
00100     // and for all arrays where not all antenna aperture illuminations
00101     // can be treated as identical.
00102     //
00103     virtual Vector<Int> vbRow2CFKeyMap(const VisBuffer2& vb, Int& nUnique) = 0;
00104     virtual Int makePBPolnCoords(const VisBuffer2& vb,
00105                                  const Int& convSize,
00106                                  const Int& convSampling,
00107                                  const CoordinateSystem& skyCoord,
00108                                  const Int& skyNx, const Int& skyNy,
00109                                  CoordinateSystem& feedCoord) = 0;
00110 
00111     virtual Int getConvSize() = 0;
00112     virtual void setConvSize(const Int val) = 0;
00113     virtual Int getOversampling() = 0;
00114     virtual void setOversampling(const Int val) = 0;
00115 
00116     virtual Float getConvWeightSizeFactor() = 0;
00117     virtual Float getSupportThreshold() = 0;
00118     
00119     virtual void normalizeImage(Lattice<Complex>& skyImage,
00120                                 const Matrix<Float>& weights) = 0;
00121 
00122     virtual int getVisParams(const VisBuffer2& vb, const CoordinateSystem& skyCoord=CoordinateSystem()) = 0;
00123     //
00124     // The mapping from VisBuffer polarizations map to the Image plane
00125     // polarization.  The latter is determined by the user input,
00126     // which is passed to the FTMachine in Imager.cc
00127     //
00128     // The map is available in the FTMachine which uses this method to
00129     // set the map for the CFTerms object.
00130     //
00131     virtual void setPolMap(const Vector<Int>& polMap) {polMap_p_base.resize(0);polMap_p_base=polMap;}
00132     virtual void getPolMap(Vector<Int>& polMap) {polMap.resize(0); polMap = polMap_p_base;};
00133 
00134     virtual Bool rotationallySymmetric() = 0;
00135 
00136   protected:
00137     LogIO& logIO() {return logIO_p;}
00138     LogIO logIO_p;
00139     Vector<Int> polMap_p_base;
00140     OpCodes opCode_p;
00141   };
00142 
00143   }
00144 }//casa
00145 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1