casa
$Rev:20696$
|
00001 //# PSTerm.h: Definition for PSTerm 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_PSTERM_H 00030 #define SYNTHESIS_PSTERM_H 00031 00032 00033 #include <casa/Arrays/Vector.h> 00034 #include <synthesis/MSVis/VisBuffer.h> 00035 #include <images/Images/ImageInterface.h> 00036 #include <images/Images/PagedImage.h> 00037 #include <images/Images/TempImage.h> 00038 #include <scimath/Mathematics/ConvolveGridder.h> 00039 #include <synthesis/TransformMachines/CFStore.h> 00040 #include <synthesis/TransformMachines/CFTerms.h> 00041 00042 namespace casa{ 00043 // <summary> A class to apply the W-Term to the given image </summary> 00044 00045 // <use visibility=export> 00046 // <prerequisite> 00047 // </prerequisite> 00048 // <etymology> 00049 // W-Term to account for non co-planar baselines 00050 // </etymology> 00051 // 00052 // <synopsis> 00053 // 00054 //</synopsis> 00055 class PSTerm: public CFTerms 00056 { 00057 public: 00058 PSTerm(): CFTerms() {}; 00059 PSTerm (const IPosition shape, 00060 const Vector<Double>& uvScale, 00061 const Vector<Double>& uvOffset, 00062 const Double& psScale):psCtor_p() 00063 {init(shape,uvScale,uvOffset,psScale);}; 00064 00065 virtual ~PSTerm () {}; 00066 00067 void init(const IPosition shape, 00068 const Vector<Double>& uvScale, 00069 const Vector<Double>& uvOffset, 00070 const Double& psScale); 00071 Matrix<Complex>& operator=(Matrix<Complex>&); 00072 Matrix<Complex>& operator*=(Matrix<Complex>&); 00073 00074 void applySky(Matrix<Complex>& screen,Bool multiply=False); 00075 void applySky(Matrix<Complex>& screen, 00076 const Vector<Double>& sampling, 00077 const Int inner); 00078 void normalizeImage(Lattice<Complex>& skyImage, 00079 const Matrix<Float>& weights); 00080 virtual String name() {return String("PS Term");}; 00081 00082 //---------------------------------------------------------- 00083 // Implementation of pure-virtual methods of CFTerms parent class. 00084 // CFTerms (and its derived classes) ned clean-up so that this 00085 // kind of code is not required everywhere). 00086 int getVisParams(const VisBuffer& vb,const CoordinateSystem& skyCoord=CoordinateSystem()) 00087 {(void)vb;(void)skyCoord;return 0;}; 00088 00089 void setPolMap(const Vector<Int>& polMap) {(void)polMap;}; 00090 00091 virtual Float getSupportThreshold() {return 1e-3;}; 00092 00093 void applySky(ImageInterface<Float>& outputImages, 00094 const VisBuffer& vb, 00095 const Bool doSquint=True, 00096 const Int& cfKey=0, 00097 const Double /*freqVal*/ =-1) 00098 {(void)outputImages;(void)vb;(void)doSquint;(void)cfKey;} 00099 00100 void applySky(ImageInterface<Complex>& outputImages, 00101 const VisBuffer& vb, 00102 const Bool doSquint=True, 00103 const Int& cfKey=0, 00104 const Double /*freqVal*/ = -1) 00105 {(void)outputImages;(void)vb;(void)doSquint;(void)cfKey;}; 00106 00107 Vector<Int> vbRow2CFKeyMap(const VisBuffer& vb, Int& nUnique) 00108 {(void)vb;(void)nUnique;return Vector<Int>();}; 00109 00110 Int makePBPolnCoords(const VisBuffer& vb, 00111 const Int& convSize, 00112 const Int& convSampling, 00113 const CoordinateSystem& skyCoord, 00114 const Int& skyNx, const Int& skyNy, 00115 CoordinateSystem& feedCoord) 00116 { 00117 (void)vb;(void)convSize;(void)convSampling;(void)skyCoord;(void)skyNx;(void)skyNy;(void)feedCoord; 00118 return 0; 00119 }; 00120 00121 Int getConvSize() {return 0;}; 00122 Int getOversampling() {return 1;}; 00123 Float getConvWeightSizeFactor() {return 1.0;}; 00124 00125 private: 00126 // spheroidal function 00127 CountedPtr<ConvolveGridder<Double, Complex> > psCtor_p; 00128 Vector<Double> support_p; 00129 Vector<Int> sampling_p; 00130 Double psScale_p; 00131 }; 00132 00133 }; 00134 00135 #endif