LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - CFTerms.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 6 0.0 %
Date: 2024-10-29 13:38:20 Functions: 0 7 0.0 %

          Line data    Source code
       1             : //# CFTerms.h: Definition for CFTerms
       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: 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_CFTERMS_H
      30             : #define SYNTHESIS_CFTERMS_H
      31             : 
      32             : 
      33             : #include <casacore/casa/Arrays/Vector.h>
      34             : #include <casacore/images/Images/ImageInterface.h>
      35             : #include <casacore/images/Images/PagedImage.h>
      36             : #include <casacore/images/Images/TempImage.h>
      37             : #include <msvis/MSVis/VisBuffer.h>
      38             : #include <casacore/casa/Containers/Block.h>
      39             : 
      40             : namespace casa{
      41             :   // <summary>  
      42             :   //  The base class to represent the Aperture-Term of the Measurement Equation. 
      43             :   // </summary>
      44             :   
      45             :   // <use visibility=export>
      46             :   // <prerequisite>
      47             :   // </prerequisite>
      48             :   // <etymology>
      49             :   //   A-Term to account for the effects of the antenna primary beam(s).
      50             :   // </etymology>
      51             :   //
      52             :   // <synopsis> 
      53             :   // 
      54             :   //</synopsis>
      55             :   class CFTerms
      56             :   {
      57             :   public:
      58             :     enum OpCodes {NOOP=0,NORMAL};
      59           0 :     CFTerms ():opCode_p(NORMAL) {};
      60           0 :     virtual ~CFTerms () {};
      61             : 
      62           0 :     virtual void setOpCode(OpCodes code) {opCode_p = code;}
      63           0 :     virtual casacore::Bool isNoOp() {return opCode_p==NOOP;};
      64             : 
      65             :     virtual casacore::String name() = 0;
      66             : 
      67             :     virtual void applySky(casacore::ImageInterface<casacore::Float>& outputImages,
      68             :                           const VisBuffer& vb, 
      69             :                           const casacore::Bool doSquint=true,
      70             :                           const casacore::Int& cfKey=0,
      71             :                           const casacore::Int& muellerTerms=0,
      72             :                           const casacore::Double freqVal=-1) = 0;
      73             :     virtual void applySky(casacore::ImageInterface<casacore::Complex>& outputImages,
      74             :                           const VisBuffer& vb, 
      75             :                           const casacore::Bool doSquint=true,
      76             :                           const casacore::Int& cfKey=0,
      77             :                           const casacore::Int& muellerTerms=0,
      78             :                           const casacore::Double freqVal=-1) = 0;
      79             :     //
      80             :     // Not sure if the following method is requried.  Leaving it in
      81             :     // the code for now with an implementation that does nothing.
      82             :     //
      83             :     // virtual void applySky(casacore::Matrix<casacore::Complex>& screen, const casacore::Int wPixel, 
      84             :     //                    const casacore::Vector<casacore::Double>& sampling,
      85             :     //                    const casacore::Int wConvSize, const casacore::Double wScale,
      86             :     //                    const casacore::Int inner) 
      87             :     // {(void)screen; (void)wPixel; (void)sampling; (void)wConvSize; (void)wScale; (void)inner;};
      88             : 
      89             :     //
      90             :     // Returns a vector of integers that map each row in the given
      91             :     // VisBuffer to an index that is used to pick the appropriate
      92             :     // convolution function plane.  It also returns the number of
      93             :     // unique baselines in the nUnique parameter (unique baselines are
      94             :     // defined as the number of baselines each requiring a unique
      95             :     // convolution function).
      96             :     //
      97             :     // This is required for Heterogeneous antenna arrays (like ALMA)
      98             :     // and for all arrays where not all antenna aperture illuminations
      99             :     // can be treated as identical.
     100             :     //
     101             :     virtual casacore::Vector<casacore::Int> vbRow2CFKeyMap(const VisBuffer& vb, casacore::Int& nUnique) = 0;
     102             :     virtual casacore::Int makePBPolnCoords(const VisBuffer& vb,
     103             :                                  const casacore::Int& convSize,
     104             :                                  const casacore::Int& convSampling,
     105             :                                  const casacore::CoordinateSystem& skyCoord,
     106             :                                  const casacore::Int& skyNx, const casacore::Int& skyNy,
     107             :                                  casacore::CoordinateSystem& feedCoord) = 0;
     108             : 
     109             :     virtual casacore::Int getConvSize() = 0;
     110             :     virtual casacore::Int getOversampling() = 0;
     111             :     virtual casacore::Float getConvWeightSizeFactor() = 0;
     112             :     virtual casacore::Float getSupportThreshold() = 0;
     113             :     
     114             :     virtual void normalizeImage(casacore::Lattice<casacore::Complex>& skyImage,
     115             :                                 const casacore::Matrix<casacore::Float>& weights) = 0;
     116             : 
     117             :     virtual int getVisParams(const VisBuffer& vb, const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem()) = 0;
     118             :     //
     119             :     // The mapping from VisBuffer polarizations map to the Image plane
     120             :     // polarization.  The latter is determined by the user input,
     121             :     // which is passed to the FTMachine in Imager.cc
     122             :     //
     123             :     // The map is available in the FTMachine which uses this method to
     124             :     // set the map for the CFTerms object.
     125             :     //
     126           0 :     virtual void setPolMap(const casacore::Vector<casacore::Int>& polMap) {polMap_p_base.resize(0);polMap_p_base=polMap;}
     127           0 :     virtual void getPolMap(casacore::Vector<casacore::Int>& polMap) {polMap.resize(0); polMap = polMap_p_base;};
     128             : 
     129             :     virtual casacore::Bool rotationallySymmetric() = 0;
     130             : 
     131             :   protected:
     132             :     casacore::LogIO& logIO() {return logIO_p;}
     133             :     casacore::LogIO logIO_p;
     134             :     casacore::Vector<casacore::Int> polMap_p_base;
     135             :     OpCodes opCode_p;
     136             :   };
     137             : 
     138             : };
     139             : 
     140             : #endif

Generated by: LCOV version 1.16