casa
$Rev:20696$
|
00001 //# ALMAIlluminationConvFunc.h: Definition for ALMAIlluminationConvFunc 00002 //# Copyright (C) 1996,1997,1998,1999,2000,2002 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# Copyright by ESO (in the framework of the ALMA collaboration) 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 adressed 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 //# 00028 //# $Id$ 00029 00030 #ifndef SYNTHESIS_ALMACALCILLUMINATIONCONVFUNC_H 00031 #define SYNTHESIS_ALMACALCILLUMINATIONCONVFUNC_H 00032 00033 #include <synthesis/TransformMachines/IlluminationConvFunc.h> 00034 #include <synthesis/TransformMachines/BeamCalc.h> 00035 #include <synthesis/TransformMachines/ALMAAperture.h> 00036 #include <synthesis/MeasurementComponents/CExp.new3.h> 00037 #include <synthesis/MeasurementComponents/ExpCache.h> 00038 #include <images/Images/TempImage.h> 00039 #include <casa/Exceptions.h> 00040 #include <synthesis/MSVis/VisBuffer.h> 00041 #include <casa/sstream.h> 00042 #include <synthesis/TransformMachines/Utils.h> 00043 namespace casa{ 00044 00045 class ALMACalcIlluminationConvFunc: public IlluminationConvFunc 00046 { 00047 public: 00048 00049 ALMACalcIlluminationConvFunc(); 00050 ALMACalcIlluminationConvFunc(Int n):IlluminationConvFunc(n) 00051 {pbRead_p=False;}; 00052 ~ALMACalcIlluminationConvFunc() 00053 {delete ap.aperture;}; 00054 00055 void setBandID(Int /*bandID*/) {/*ap.band=(ALMABeamCalcBandCode)bandID;*/} 00056 00057 void setAntRayPath(const String& antRayPath) {otherAntRayPath_p = antRayPath;} 00058 00059 void loadFromImage(String &fileName); 00060 void getIdealConvFunc(Array<Complex>& buf); 00061 void ftAperture(TempImage<Complex>& uvgrid); 00062 void ftAperture() {ftAperture(convFunc_p); pbRead_p=True;}; 00063 void storePB(String& fileName); 00064 00065 Bool pbReady() {return pbRead_p;} 00066 00067 CoordinateSystem makeUVCoords(CoordinateSystem& imageCoordSys, 00068 IPosition& shape, Double refFreq=-1.0); 00069 void regridAperture(CoordinateSystem& skyCS, 00070 IPosition& skyShape, 00071 TempImage<Complex>& uvGrid, 00072 const VisBuffer& vb, 00073 Bool doSquint=True,Int bandID=-1); 00074 void regridAperture(CoordinateSystem& skyCS, 00075 IPosition& skyShape, 00076 TempImage<Complex>& uvGrid, 00077 const VisBuffer &vb, 00078 const Vector<Float>& paList, 00079 Bool doSquint, Int bandID); 00080 00081 void regridAperture(CoordinateSystem& skyCS, 00082 IPosition& skyShape, 00083 TempImage<Complex>& uvGrid, 00084 const String& telescope, 00085 const MVFrequency& freqQ, 00086 Float pa = 0., 00087 Bool doSquint=True, 00088 Int bandID=-1); 00089 00090 void applyPB(ImageInterface<Float>& pbImage, 00091 const VisBuffer& vb, Bool doSquint=False, Int cfKey=0); 00092 00093 void applyPB(ImageInterface<Complex>& pbImage, 00094 const VisBuffer& vb, Bool doSquint=True, Int cfKey=0); 00095 00096 void applyPB(ImageInterface<Float>& pbImage, 00097 const String& telescope, const MEpoch& obsTime, 00098 const String& antType0, const String& antType1, 00099 const MVFrequency& freqQ, Double pa=0., 00100 Bool doSquint=False); 00101 00102 void applyPB(ImageInterface<Complex>& pbImage, 00103 const String& telescope, const MEpoch& obsTime, 00104 const String& antType0, const String& antType1, 00105 const MVFrequency& freqQ, Double pa=0., 00106 Bool doSquint=True); 00107 00108 void applyVP(ImageInterface<Complex>& pbImage, 00109 const String& telescope, const MEpoch& obsTime, 00110 const String& antType0, const String& antType1, 00111 const MVFrequency& freqQ, Double pa=0., 00112 Bool doSquint=True); 00113 00114 void skyMuller(ImageInterface<Complex>& skyJones); 00115 00116 // Int getALMABandId(const Double& freq); 00117 virtual void prepareConvFunction(const VisBuffer& /*vb*/, CFStore& /*cfs*/){}; 00118 00119 00120 00121 private: 00122 00123 void fillPB(ImageInterface<Complex>& inImg, ImageInterface<Float>& outImg, Bool Square=False); 00124 void fillPB(ImageInterface<Complex>& inImg, ImageInterface<Complex>& outImg, Bool Square=False); 00125 void fillVP(ImageInterface<Complex>& inImg, ImageInterface<Complex>& outImg, Bool Square=False); 00126 00127 TempImage<Complex> convFunc_p; 00128 Vector<Double> resolution; 00129 Bool pbRead_p; 00130 Float freq_p,lastPA; 00131 ApertureCalcParams ap; 00132 00133 Bool haveCannedResponses; 00134 00135 String otherAntRayPath_p; 00136 }; 00137 00138 }; 00139 #endif