Line data Source code
1 : //# HanningSmoothTVI.h: This file contains the implementation of the HanningSmoothTVI class. 2 : //# 3 : //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/) 4 : //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved. 5 : //# Copyright (C) European Southern Observatory, 2011, All rights reserved. 6 : //# 7 : //# This library is free software; you can redistribute it and/or 8 : //# modify it under the terms of the GNU Lesser General Public 9 : //# License as published by the Free software Foundation; either 10 : //# version 2.1 of the License, or (at your option) any later version. 11 : //# 12 : //# This library is distributed in the hope that it will be useful, 13 : //# but WITHOUT ANY WARRANTY, without even the implied warranty of 14 : //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 : //# Lesser General Public License for more details. 16 : //# 17 : //# You should have received a copy of the GNU Lesser General Public 18 : //# License along with this library; if not, write to the Free Software 19 : //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 : //# MA 02111-1307 USA 21 : //# $Id: $ 22 : 23 : #include <mstransform/TVI/HanningSmoothTVI.h> 24 : 25 : using namespace casacore; 26 : namespace casa { //# NAMESPACE CASA - BEGIN 27 : 28 : namespace vi { //# NAMESPACE VI - BEGIN 29 : 30 : ////////////////////////////////////////////////////////////////////////// 31 : // HanningSmoothTVI class 32 : ////////////////////////////////////////////////////////////////////////// 33 : 34 : // ----------------------------------------------------------------------- 35 : // 36 : // ----------------------------------------------------------------------- 37 0 : HanningSmoothTVI::HanningSmoothTVI( ViImplementation2 * inputVii): 38 0 : ConvolutionTVI (inputVii) 39 : { 40 0 : initialize(); 41 : 42 0 : return; 43 : } 44 : 45 : // ----------------------------------------------------------------------- 46 : // 47 : // ----------------------------------------------------------------------- 48 0 : void HanningSmoothTVI::initialize() 49 : { 50 0 : convCoeff_p.resize(3,false); 51 0 : convCoeff_p(0) = 0.25; 52 0 : convCoeff_p(1) = 0.5; 53 0 : convCoeff_p(2) = 0.25; 54 : 55 0 : return; 56 : } 57 : 58 : ////////////////////////////////////////////////////////////////////////// 59 : // ConvolutionTVIFactory class 60 : ////////////////////////////////////////////////////////////////////////// 61 : 62 : // ----------------------------------------------------------------------- 63 : // 64 : // ----------------------------------------------------------------------- 65 0 : HanningSmoothTVIFactory::HanningSmoothTVIFactory (ViImplementation2 *inputVii) 66 : { 67 0 : inputVii_p = inputVii; 68 0 : } 69 : 70 : // ----------------------------------------------------------------------- 71 : // 72 : // ----------------------------------------------------------------------- 73 0 : vi::ViImplementation2 * HanningSmoothTVIFactory::createVi(VisibilityIterator2 *) const 74 : { 75 0 : return new HanningSmoothTVI(inputVii_p); 76 : } 77 : 78 : // ----------------------------------------------------------------------- 79 : // 80 : // ----------------------------------------------------------------------- 81 0 : vi::ViImplementation2 * HanningSmoothTVIFactory::createVi() const 82 : { 83 0 : return new HanningSmoothTVI(inputVii_p); 84 : } 85 : 86 : ////////////////////////////////////////////////////////////////////////// 87 : // HanningSmoothTVILayerFactory class 88 : ////////////////////////////////////////////////////////////////////////// 89 : 90 0 : HanningSmoothTVILayerFactory::HanningSmoothTVILayerFactory() : 91 0 : ViiLayerFactory() 92 0 : {} 93 : 94 : ViImplementation2* 95 0 : HanningSmoothTVILayerFactory::createInstance(ViImplementation2* vii0) const 96 : { 97 : // Make the HanningSmoothTVi2, using supplied ViImplementation2, and return it 98 0 : ViImplementation2 *vii = new HanningSmoothTVI(vii0); 99 0 : return vii; 100 : } 101 : 102 : } //# NAMESPACE VI - END 103 : 104 : } //# NAMESPACE CASA - END 105 : 106 :