casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VLACalcIlluminationConvFunc.h
Go to the documentation of this file.
1 //# VLAIlluminationConvFunc.h: Definition for VLAIlluminationConvFunc
2 //# Copyright (C) 1996,1997,1998,1999,2000,2002
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be adressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef SYNTHESIS_TRANSFORM2_VLACALCILLUMINATIONCONVFUNC_H
30 #define SYNTHESIS_TRANSFORM2_VLACALCILLUMINATIONCONVFUNC_H
31 
33 //#include <synthesis/MeasurementComponents/BeamCalcConstants.h>
35 //#include <synthesis/MeasurementComponents/BeamCalcAntenna.h>
39 #include <casa/Exceptions.h>
40 #include <msvis/MSVis/VisBuffer2.h>
41 #include <casa/sstream.h>
43 namespace casa{
44  namespace refim{
45  using namespace vi;
46  // casacore::Int getVLABandID(casacore::Double& freq,casacore::String&telescopeName);
48  {
49  public:
50 
54  convFunc_p(),resolution(),pbRead_p(false),freq_p(0),lastPA(0),ap()
55  {pbRead_p=false;};
56  ~VLACalcIlluminationConvFunc() {delete ap.aperture;};
57 
58  void setBandID(casacore::Int bandID) {ap.band=bandID;}
59  // void storeImg(casacore::String &fileName,casacore::ImageInterface<casacore::Complex>& img);
60  // void storeImg(casacore::String &fileName,casacore::ImageInterface<casacore::Float>& img);
61  // void store(casacore::String &fileName);
62  void loadFromImage(casacore::String &fileName);
63  void getIdealConvFunc(casacore::Array<casacore::Complex>& buf);
64  //void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid);
65  void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid, casacore::Bool makeMueller);
66  void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid, casacore::Int makeMuerller=0);
67  void ftAperture() {ftAperture(convFunc_p); pbRead_p=true;};
68  void storePB(casacore::String& fileName);
69 
70  casacore::Bool pbReady() {return pbRead_p;}
71 
74  void regridAperture(casacore::CoordinateSystem& skyCS,
75  casacore::IPosition& skyShape,
77  //const VisBuffer2& vb,
79  casacore::Bool doSquint=true,casacore::Int bandID=-1,casacore::Int muellerTerm=0 ,casacore::Double freqVal=-1.0);
80  void regridAperture(casacore::CoordinateSystem& skyCS,
81  casacore::IPosition& skyShape,
83  const VisBuffer2 &vb,
85  casacore::Bool doSquint, casacore::Int bandID);
86  void regridApertureEngine(ApertureCalcParams& ap,
87  const casacore::Int& inStokes);
88  void setApertureParams(ApertureCalcParams& ap,
89  const casacore::Float& Freq, const casacore::Float& pa,
90  const casacore::Int& bandID,
91  const casacore::Int& inStokes,
92  const casacore::IPosition& skyShape,
94 
95 
96  void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb,
97  const casacore::Vector<casacore::Float>& paList, casacore::Int bandID, casacore::Bool doSquint=false);
98  void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb,
99  casacore::Int bandID=-1, casacore::Bool doSquint=false, casacore::Double freqVal=-1.0);
100  void applyPB(casacore::ImageInterface<casacore::Complex>& pbImage, casacore::Double& pa,//const VisBuffer2& vb,
101  casacore::Bool doSquint=true,casacore::Int bandID=-1, casacore::Int muellerTerm=0, casacore::Double freqVal=-1.0);
102  void applyPBSq(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb,
103  const casacore::Vector<casacore::Float>& paList, casacore::Int bandID, casacore::Bool doSquint=false);
104  void applyPBSq(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb,
105  casacore::Int bandID=-1, casacore::Bool doSquint=false);
106  void applyPBSq(casacore::ImageInterface<casacore::Complex>& pbImage, casacore::Double& pa,//const VisBuffer2& vb,
107  casacore::Int bandID=-1, casacore::Bool doSquint=true);
108  void makeFullJones(casacore::ImageInterface<casacore::Complex>& pbImage, const VisBuffer2& vb, casacore::Bool doSquint,
109  casacore::Int bandID, casacore::Double freqVal=-1.0);
110  void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones);
111  void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones, casacore::Int muellerTerm=0);
112  void skyMuller(casacore::Array<casacore::Complex>& skyJones, const casacore::IPosition& shape, const casacore::Int& inStokes);
113 
115  {throw(casacore::AipsError("VLACalcIlluminationConvFunc::findSupport() not implemented"));};
118  // casacore::TempImage<casacore::Float>& theavgPB,
120  casacore::Bool /*reset*/=true)
121  {throw(casacore::AipsError("VLACalc::makeAverageRes() called"));};
122 
123 
124  private:
125 
128 
130  // casacore::TempImage<casacore::Float> reAperture_p, imAperture_p;
135  };
136  };
137 };
138 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
casacore::Vector< casacore::Double > resolution
casacore::TempImage&lt;casacore::Float&gt; reAperture_p, imAperture_p;
int Int
Definition: aipstype.h:50
casacore::Int getVLABandID(casacore::Double&amp; freq,casacore::String&amp;telescopeName); ...
virtual casacore::Bool makeAverageResponse(const VisBuffer2 &, const casacore::ImageInterface< casacore::Complex > &, casacore::ImageInterface< casacore::Float > &, casacore::Bool=true)
This method computes the average response function.
casacore::CoordinateSystem makeUVCoords(casacore::CoordinateSystem &imageCoordSys, casacore::IPosition &shape)
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
casacore::Bool findSupport(casacore::Array< casacore::Complex > &, casacore::Float &, casacore::Int &, casacore::Int &)
virtual void setFeedStokes(const casacore::Vector&lt;casacore::Int&gt;&amp; feedStokes) = 0; ...
double Double
Definition: aipstype.h:55
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
float Float
Definition: aipstype.h:54
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1944
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
Base class for all Casacore library errors.
Definition: Error.h:134
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::TempImage< casacore::Complex > convFunc_p
Interconvert pixel and world coordinates.