casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
EVLAAperture.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //# EVLAAperture.h: Definition of the EVLAAperture class
00003 //# Copyright (C) 1997,1998,1999,2000,2001,2002,2003
00004 //# Associated Universities, Inc. Washington DC, USA.
00005 //#
00006 //# This library is free software; you can redistribute it and/or modify it
00007 //# under the terms of the GNU Library General Public License as published by
00008 //# the Free Software Foundation; either version 2 of the License, or (at your
00009 //# option) any later version.
00010 //#
00011 //# This library is distributed in the hope that it will be useful, but WITHOUT
00012 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00014 //# License for more details.
00015 //#
00016 //# You should have received a copy of the GNU Library General Public License
00017 //# along with this library; if not, write to the Free Software Foundation,
00018 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00019 //#
00020 //# Correspondence concerning AIPS++ should be addressed as follows:
00021 //#        Internet email: aips2-request@nrao.edu.
00022 //#        Postal address: AIPS++ Project Office
00023 //#                        National Radio Astronomy Observatory
00024 //#                        520 Edgemont Road
00025 //#                        Charlottesville, VA 22903-2475 USA
00026 //#
00027 //# $Id$
00028 //
00029 #ifndef SYNTHESIS_EVLAAPERTURE_H
00030 #define SYNTHESIS_EVLAAPERTURE_H
00031 
00032 #include <images/Images/ImageInterface.h>
00033 //#include <synthesis/MeasurementComponents/ATerm.h>
00034 #include <synthesis/TransformMachines/AzElAperture.h>
00035 #include <coordinates/Coordinates/CoordinateSystem.h>
00036 //
00037 //---------------------------------------------------------------------
00038 //
00039 namespace casa { //# NAMESPACE CASA - BEGIN
00040   template<class T> class ImageInterface;
00041   template<class T> class Matrix;
00042   class VisBuffer;
00043   //  class EVLAAperture : public ATerm
00044   class EVLAAperture : public AzElAperture
00045   {
00046   public:
00047     //    EVLAAperture(): ATerm(), polMap_p(), feedStokes_p() {};
00048     EVLAAperture(): AzElAperture(), polMap_p(), feedStokes_p() {};
00049     ~EVLAAperture() {};
00050     EVLAAperture& operator=(const EVLAAperture& other);
00051     //
00052     // Overload these functions.  They are pure virtual in the base class (ATerm).
00053     //
00054     virtual String name() {return String("EVLA Aperture");};
00055 
00056     virtual void applySky(ImageInterface<Float>& outputImages,
00057                           const VisBuffer& vb, 
00058                           const Bool doSquint=True,
00059                           const Int& cfKey=0,
00060                           const Double freqVal=-1);
00061     virtual void applySky(ImageInterface<Complex>& outputImages,
00062                           const VisBuffer& vb, 
00063                           const Bool doSquint=True,
00064                           const Int& cfKey=0,
00065                           const Double freqVal=-1);
00066 
00067     virtual Vector<Int> vbRow2CFKeyMap(const VisBuffer& vb, Int& nUnique)
00068     {Vector<Int> tmp; tmp.resize(vb.nRow()); tmp=0; nUnique=1; return tmp;}
00069 
00070     virtual void getPolMap(Vector<Int>& polMap) {polMap.resize(0);polMap=polMap_p;};
00071 
00072     // For this class, these will be served from the base classs (ATerm.h)
00073     // virtual Int getConvSize() {return CONVSIZE;};
00074     // virtual Int getOversampling() {return OVERSAMPLING;}
00075     // virtual Float getConvWeightSizeFactor() {return CONVWTSIZEFACTOR;};
00076     // virtual Float getSupportThreshold() {return THRESHOLD;};
00077 
00078   protected:
00079     int getVisParams(const VisBuffer& vb,const CoordinateSystem& skyCoord=CoordinateSystem());
00080     Bool findSupport(Array<Complex>& func, Float& threshold,Int& origin, Int& R);
00081     Int getVLABandID(Double& freq,String&telescopeName, const CoordinateSystem& skyCoord=CoordinateSystem());
00082     Int makePBPolnCoords(const VisBuffer&vb,
00083                          const Int& convSize,
00084                          const Int& convSampling,
00085                          const CoordinateSystem& skyCoord,
00086                          const Int& skyNx, const Int& skyNy,
00087                          CoordinateSystem& feedCoord);
00088 
00089   private:
00090     Float Diameter_p, Nant_p, HPBW, sigma;
00091     Vector<Int> polMap_p;
00092     Vector<Int> feedStokes_p;
00093   };
00094 };
00095 #endif