Line data Source code
1 : //# WTerm.h: Definition for WTerm 2 : //# Copyright (C) 2007 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_WTERM_H 30 : #define SYNTHESIS_TRANSFORM2_WTERM_H 31 : 32 : 33 : #include <casacore/casa/Arrays/Vector.h> 34 : #include <msvis/MSVis/VisBuffer2.h> 35 : #include <casacore/images/Images/ImageInterface.h> 36 : #include <casacore/images/Images/PagedImage.h> 37 : #include <casacore/images/Images/TempImage.h> 38 : #include <synthesis/TransformMachines2/CFTerms.h> 39 : 40 : 41 : namespace casa{ 42 : namespace refim{ 43 : // <summary> A class to apply the W-Term to the given image </summary> 44 : 45 : // <use visibility=export> 46 : // <prerequisite> 47 : // </prerequisite> 48 : // <etymology> 49 : // W-Term to account for non co-planar baselines 50 : // </etymology> 51 : // 52 : // <synopsis> 53 : // 54 : //</synopsis> 55 : class WTerm: public CFTerms 56 : { 57 : public: 58 0 : WTerm () : CFTerms() {}; 59 0 : ~WTerm () {}; 60 : 61 : virtual void applySky(casacore::Matrix<casacore::Complex>& screen, 62 : const casacore::Int wPixel, 63 : const casacore::Vector<casacore::Double>& sampling, 64 : const casacore::Double wScale, 65 : const casacore::Int inner); 66 : virtual void applySky(casacore::Matrix<casacore::Complex>& screen, 67 : const casacore::Vector<casacore::Double>& sampling, 68 : const casacore::Double wValue, 69 : const casacore::Int inner); 70 0 : int getVisParams(const VisBuffer2& vb,const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem()) 71 0 : {(void)vb;(void)skyCoord;return 0;}; 72 0 : void setPolMap(const casacore::Vector<casacore::Int>& polMap) {(void)polMap;}; 73 0 : virtual casacore::Float getSupportThreshold() {return 1e-3;}; 74 : 75 : // WTerm normalizes the image be unity 76 0 : virtual void normalizeImage(casacore::Lattice<casacore::Complex>& skyImage, 77 : const casacore::Matrix<casacore::Float>& weights) 78 0 : {(void)skyImage;(void)weights;}; 79 0 : virtual casacore::String name() {return casacore::String("W Term");}; 80 : // 81 : // The following functions are not required for W-Term but need to 82 : // be implemented here since they are pure virtuals in CFTerms 83 : // base class. 84 0 : void applySky(casacore::ImageInterface<casacore::Float>&,// outputImages, 85 : const VisBuffer2&,// vb, 86 : const casacore::Bool,/* doSquint=true,*/ 87 : const casacore::Int&,/* cfKey=0,*/ 88 : const casacore::Int&,/* muellerTerm=0,*/ 89 : const casacore::Double /*freqVal*=-1*/) 90 0 : {}; 91 0 : void applySky(casacore::ImageInterface<casacore::Complex>&,// outputImages, 92 : const VisBuffer2&,// vb, 93 : const casacore::Bool,/* doSquint=true,*/ 94 : const casacore::Int&,/* cfKey=0,*/ 95 : const casacore::Int&,/* muellerTerm=0,*/ 96 : const casacore::Double /*freqVal=-1*/) 97 0 : {}; 98 0 : casacore::Vector<casacore::Int> vbRow2CFKeyMap(const VisBuffer2& vb, casacore::Int& nUnique) 99 0 : {(void)vb;(void)nUnique;return casacore::Vector<casacore::Int>();}; 100 0 : casacore::Int makePBPolnCoords(const VisBuffer2& vb, 101 : const casacore::Int& convSize, 102 : const casacore::Int& convSampling, 103 : const casacore::CoordinateSystem& skyCoord, 104 : const casacore::Int& skyNx, const casacore::Int& skyNy, 105 : casacore::CoordinateSystem& feedCoord) 106 : { 107 : (void)vb;(void)convSize;(void)convSampling;(void)skyCoord;(void)skyNx;(void)skyNy;(void)feedCoord; 108 0 : return 0; 109 : }; 110 : 111 0 : casacore::Bool rotationallySymmetric() {return true;}; 112 : 113 : 114 0 : casacore::Int getConvSize() {return 0;}; 115 0 : casacore::Int getOversampling() {return 4;}; 116 0 : void setConvSize(const casacore::Int) {}; 117 0 : casacore::Float getConvWeightSizeFactor() {return 1.0;}; 118 : }; 119 : }; 120 : }; 121 : 122 : #endif