Line data Source code
1 : // -*- C++ -*-
2 : //# EVLAAperture.h: Definition of the EVLAAperture class
3 : //# Copyright (C) 1997,1998,1999,2000,2001,2002,2003
4 : //# Associated Universities, Inc. Washington DC, USA.
5 : //#
6 : //# This library is free software; you can redistribute it and/or modify it
7 : //# under the terms of the GNU Library General Public License as published by
8 : //# the Free Software Foundation; either version 2 of the License, or (at your
9 : //# option) any later version.
10 : //#
11 : //# This library is distributed in the hope that it will be useful, but WITHOUT
12 : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 : //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 : //# License for more details.
15 : //#
16 : //# You should have received a copy of the GNU Library General Public License
17 : //# along with this library; if not, write to the Free Software Foundation,
18 : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 : //#
20 : //# Correspondence concerning AIPS++ should be addressed as follows:
21 : //# Internet email: aips2-request@nrao.edu.
22 : //# Postal address: AIPS++ Project Office
23 : //# National Radio Astronomy Observatory
24 : //# 520 Edgemont Road
25 : //# Charlottesville, VA 22903-2475 USA
26 : //#
27 : //# $Id$
28 : //
29 : #ifndef SYNTHESIS_TRANSFORM2_EVLAAPERTURE_H
30 : #define SYNTHESIS_TRANSFORM2_EVLAAPERTURE_H
31 :
32 : #include <synthesis/TransformMachines2/Utils.h>
33 : #include <casacore/images/Images/ImageInterface.h>
34 : //#include <synthesis/MeasurementComponents/ATerm.h>
35 : #include <synthesis/TransformMachines2/AzElAperture.h>
36 : #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
37 : #include <casacore/casa/Arrays/ArrayFwd.h>
38 : //
39 : //---------------------------------------------------------------------
40 : //
41 :
42 : namespace casa { //# NAMESPACE CASA - BEGIN
43 :
44 : class VisBuffer;
45 : // class EVLAAperture : public ATerm
46 : namespace refim{
47 : class EVLAAperture : public AzElAperture
48 : {
49 : public:
50 : // EVLAAperture(): ATerm(), polMap_p(), feedStokes_p() {};
51 0 : EVLAAperture(): AzElAperture(), polMap_p(), feedStokes_p() {};
52 0 : ~EVLAAperture() {};
53 : EVLAAperture& operator=(const EVLAAperture& other);
54 : //
55 : // Overload these functions. They are pure virtual in the base class (ATerm).
56 : //
57 0 : virtual casacore::String name() {return casacore::String("EVLA Aperture");};
58 :
59 : virtual void makeFullJones(casacore::ImageInterface<casacore::Complex>& pbImage,
60 : const VisBuffer2& vb,
61 : casacore::Bool doSquint, casacore::Int& bandID, casacore::Double freqVal);
62 :
63 : virtual void applySky(casacore::ImageInterface<casacore::Float>& outputImages,
64 : const VisBuffer2& vb,
65 : const casacore::Bool doSquint=true,
66 : const casacore::Int& cfKey=0,
67 : const casacore::Int& muellerTerm=0,
68 : const casacore::Double freqVal=-1.0);
69 : virtual void applySky(casacore::ImageInterface<casacore::Complex>& outputImages,
70 : const VisBuffer2& vb,
71 : const casacore::Bool doSquint=true,
72 : const casacore::Int& cfKey=0,
73 : const casacore::Int& muellerTerm=0,
74 : const casacore::Double freqVal=-1.0);
75 : virtual void applySky(casacore::ImageInterface<casacore::Complex>& outImages,
76 : const casacore::Double& pa,
77 : const casacore::Bool doSquint,
78 : const casacore::Int& cfKey,
79 : const casacore::Int& muellerTerm,
80 : const casacore::Double freqVal=-1.0);
81 :
82 : void cacheVBInfo(const casacore::String& telescopeName, const casacore::Float& diameter);
83 : void cacheVBInfo(const VisBuffer2& vb);
84 : casacore::Int getBandID(const casacore::Double& freq, const casacore::String& telescopeName, const casacore::String& bandName="");
85 :
86 0 : virtual casacore::Vector<casacore::Int> vbRow2CFKeyMap(const VisBuffer2& vb, casacore::Int& nUnique)
87 0 : {casacore::Vector<casacore::Int> tmp; tmp.resize(vb.nRows()); tmp=0; nUnique=1; return tmp;}
88 :
89 0 : virtual void getPolMap(casacore::Vector<casacore::Int>& polMap) {polMap.resize(0);polMap=polMap_p;};
90 :
91 : // For this class, these will be served from the base classs (ATerm.h)
92 : // virtual casacore::Int getConvSize() {return CONVSIZE;};
93 : // virtual casacore::Int getOversampling() {return OVERSAMPLING;}
94 : // virtual casacore::Float getConvWeightSizeFactor() {return CONVWTSIZEFACTOR;};
95 : // virtual casacore::Float getSupportThreshold() {return THRESHOLD;};
96 :
97 : protected:
98 : int getVisParams(const VisBuffer2& vb,const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem());
99 : casacore::Bool findSupport(casacore::Array<casacore::Complex>& func, casacore::Float& threshold,casacore::Int& origin, casacore::Int& R);
100 : casacore::Int getVLABandID(casacore::Double& freq,casacore::String&telescopeName, const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem());
101 : casacore::Int makePBPolnCoords(const VisBuffer2&vb,
102 : const casacore::Int& convSize,
103 : const casacore::Int& convSampling,
104 : const casacore::CoordinateSystem& skyCoord,
105 : const casacore::Int& skyNx, const casacore::Int& skyNy,
106 : casacore::CoordinateSystem& feedCoord);
107 :
108 : private:
109 : casacore::Vector<casacore::Int> polMap_p;
110 : casacore::Vector<casacore::Int> feedStokes_p;
111 : };
112 : };
113 : };
114 : #endif
|