LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - WPConvFunc.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 2 0.0 %
Date: 2024-10-28 15:53:10 Functions: 0 1 0.0 %

          Line data    Source code
       1             : //# WPConvFunc.h: Definition for WPConvFunc
       2             : //# Copyright (C) 2007-2016
       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 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: casa-feedback@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_WPCONVFUNC_H
      30             : #define SYNTHESIS_WPCONVFUNC_H
      31             : 
      32             : 
      33             : #include <casacore/casa/Arrays/Vector.h>
      34             : #include <casacore/casa/Containers/Block.h>
      35             : #include <casacore/casa/Utilities/CountedPtr.h>
      36             : #include <casacore/casa/Arrays/ArrayFwd.h>
      37             : 
      38             : namespace casacore{
      39             : 
      40             :   template<class T> class ImageInterface;
      41             : 
      42             : }
      43             : 
      44             : namespace casa{
      45             : 
      46             :   // <summary>  A class to support FTMachines get their convolution casacore::Function </summary>
      47             :   
      48             :   // <use visibility=export>
      49             :   // <prerequisite>
      50             :   //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
      51             : // </prerequisite>
      52             :   // <etymology>
      53             :   // WP for W-casacore::Projection 
      54             :   // ConvFunc => returns the convolution functions
      55             :   // </etymology>
      56             :   //
      57             :   // <synopsis> 
      58             :   // FTMachines like WProjection and MosaicFT need convolution functions to 
      59             :   // deal with directional dependent issues...
      60             :   // this class and related ones provide and cache  such functions for re-use 
      61             :   //</synopsis>
      62             :   class VisBuffer;
      63             : 
      64             :   class WPConvFunc 
      65             :     {
      66             :     public:
      67             :       WPConvFunc(const casacore::Double minW=-1.0, const casacore::Double maxW=-1.0, const casacore::Double rmsW=-1.0);
      68             :       WPConvFunc(const casacore::RecordInterface& rec);
      69             :       //Copy constructor
      70             :       WPConvFunc(const WPConvFunc& other);
      71             :       //
      72             :       WPConvFunc& operator=(const WPConvFunc&other);
      73             : 
      74             :       virtual ~WPConvFunc();
      75             : 
      76             :       // Inputs are the image, visbuffer,  wConvsize
      77             :       // findconv return a cached convolution function appropriate for this 
      78             :       // visbuffer and number of w conv plane
      79             :       void findConvFunction(const casacore::ImageInterface<casacore::Complex>& iimage, 
      80             :                             const VisBuffer& vb,
      81             :                             const casacore::Int& wConvSize,
      82             :                             const casacore::Vector<casacore::Double>& uvScale,
      83             :                             const casacore::Vector<casacore::Double>& uvOffset,
      84             :                             const casacore::Float& padding, 
      85             :                             casacore::Int& convSampling,
      86             :                             casacore::Cube<casacore::Complex>& convFunc, 
      87             :                             casacore::Int& convsize,
      88             :                             casacore::Vector<casacore::Int>& convSupport,
      89             :                             casacore::Double& wScale);
      90             :        void findConvFunction2(const casacore::ImageInterface<casacore::Complex>& iimage, 
      91             :                             const VisBuffer& vb,
      92             :                             const casacore::Int& wConvSize,
      93             :                             const casacore::Vector<casacore::Double>& uvScale,
      94             :                             const casacore::Vector<casacore::Double>& uvOffset,
      95             :                             const casacore::Float& padding, 
      96             :                             casacore::Int& convSampling,
      97             :                             casacore::Cube<casacore::Complex>& convFunc, 
      98             :                             casacore::Int& convsize,
      99             :                             casacore::Vector<casacore::Int>& convSupport,
     100             :                             casacore::Double& wScale);
     101             : 
     102             :       casacore::Bool findSupport(casacore::Array<casacore::Complex>& /*func*/, casacore::Float& /*threshold*/,casacore::Int& /*origin*/, casacore::Int& /*R*/) 
     103             :     {throw(casacore::AipsError("IlluminationConvFunc::findSupport() not implemented"));};
     104           0 :       virtual casacore::Bool makeAverageResponse(const VisBuffer& /*vb*/, 
     105             :                                        const casacore::ImageInterface<casacore::Complex>& /*image*/,
     106             :                                      //                              casacore::TempImage<casacore::Float>& theavgPB,
     107             :                                        casacore::ImageInterface<casacore::Float>& /*theavgPB*/,
     108             :                                        casacore::Bool /*reset=true*/)
     109           0 :     {throw(casacore::AipsError("WPConvFunc::makeAverageRes() called"));};
     110             :       //Serialization
     111             :       casacore::Bool toRecord(casacore::RecordInterface& rec);
     112             :       casacore::Bool fromRecord(casacore::String& err, const casacore::RecordInterface& rec);
     113             :       
     114             :       
     115             :     private:
     116             :       casacore::Bool checkCenterPix(const casacore::ImageInterface<casacore::Complex>& image);
     117             :       void makeGWplane(casacore::Matrix<casacore::Complex>& screen, const casacore::Int iw, casacore::Double s0, casacore::Double s1, casacore::Float *& wsaveptr, casacore::Int& lsav, casacore::Int& inner, casacore::Complex*& cor, casacore::Double&cpWscale);
     118             :       casacore::Block <casacore::CountedPtr<casacore::Cube<casacore::Complex> > > convFunctions_p;
     119             :       casacore::Block <casacore::CountedPtr<casacore::Vector<casacore::Int> > > convSupportBlock_p;
     120             :       std::map <casacore::String, casacore::Int> convFunctionMap_p;
     121             : 
     122             :       casacore::Vector<casacore::Int> convSizes_p;
     123             : 
     124             :       casacore::Int actualConvIndex_p;
     125             :       casacore::Int convSize_p;
     126             :       casacore::Vector<casacore::Int> convSupport_p;
     127             :       casacore::Cube<casacore::Complex> convFunc_p;
     128             :       casacore::Double wScaler_p;
     129             :       casacore::Int convSampling_p;
     130             :       casacore::Int nx_p, ny_p;
     131             :       casacore::Double minW_p, maxW_p, rmsW_p;
     132             :       
     133             : 
     134             :     };
     135             : };// end of namespace
     136             : #endif

Generated by: LCOV version 1.16