LCOV - code coverage report
Current view: top level - synthesis/MeasurementComponents - PBMosaicFT.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 6 0.0 %
Date: 2024-12-11 20:54:31 Functions: 0 6 0.0 %

          Line data    Source code
       1             : //# nPBWProjectFT.h: Definition for nPBWProjectFT
       2             : //# Copyright (C) 1996,1997,1998,1999,2000,2002
       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_PBMOSAICFT_H
      30             : #define SYNTHESIS_PBMOSAICFT_H
      31             : 
      32             : // #include <synthesis/TransformMachines/FTMachine.h>
      33             : // #include <casa/Arrays/Matrix.h>
      34             : // #include <scimath/Mathematics/FFTServer.h>
      35             : // #include <msvis/MSVis/VisBuffer.h>
      36             : // #include <images/Images/ImageInterface.h>
      37             : // #include <images/Images/ImageInterface.h>
      38             : // #include <casa/Containers/Block.h>
      39             : // #include <casa/Arrays/Array.h>
      40             : // #include <casa/Arrays/Vector.h>
      41             : // #include <casa/Arrays/Matrix.h>
      42             : // #include <scimath/Mathematics/ConvolveGridder.h>
      43             : #include <synthesis/MeasurementComponents/nPBWProjectFT.h>
      44             : 
      45             : namespace casa { //# NAMESPACE CASA - BEGIN
      46             :   
      47             :   class EPJones;
      48             :   //  class nPBWProjectFT;
      49             :   class PBMosaicFT : public nPBWProjectFT {
      50             : 
      51             :   public:
      52             :     // Constructor: cachesize is the size of the cache in words
      53             :     // (e.g. a few million is a good number), tilesize is the
      54             :     // size of the tile used in gridding (cannot be less than
      55             :     // 12, 16 works in most cases). 
      56             :     // <group>
      57             :     PBMosaicFT(casacore::MeasurementSet& ms, 
      58             :                casacore::Int nFacets, casacore::Long cachesize, casacore::String& cfCacheDirName,
      59             :                casacore::Bool applyPointingOffset=true,
      60             :                casacore::Bool doPBCorr=true,
      61             :                casacore::Int tilesize=16, 
      62             :                casacore::Float paSteps=5.0, casacore::Float pbLimit=5e-2,
      63             :                casacore::Bool usezero=false);
      64             :     // </group>
      65             :     
      66             :     // Construct from a casacore::Record containing the PBMosaicFT state
      67             :     PBMosaicFT(const casacore::RecordInterface& stateRec);
      68             :     
      69             :     // Copy constructor
      70             :     //    PBMosaicFT(const PBMosaicFT &other);
      71             :     
      72             :     // Assignment operator
      73             :     PBMosaicFT &operator=(const PBMosaicFT &othher);
      74             :     
      75           0 :     ~PBMosaicFT() {};
      76             : 
      77             :     casacore::Bool makeAveragePB0(const VisBuffer& vb, 
      78             :                         const casacore::ImageInterface<casacore::Complex>& image,
      79             :                         casacore::Int& polInUse,
      80             :                         casacore::TempImage<casacore::Float>& avgPB);
      81             :     casacore::Int findPointingOffsets(const VisBuffer& vb, 
      82             :                             casacore::Array<casacore::Float> &l_off,
      83             :                             casacore::Array<casacore::Float> &m_off,
      84             :                             casacore::Bool Evaluate);
      85             :     void normalizeAvgPB();
      86             :     void normalizePB(casacore::ImageInterface<casacore::Float> &pb,const casacore::Float& nSamp=1);
      87             :     virtual casacore::ImageInterface<casacore::Complex>& getImage(casacore::Matrix<casacore::Float>&, casacore::Bool normalize=true);
      88           0 :     inline virtual casacore::Float pbFunc(casacore::Float& a) {return (a);};
      89           0 :     void setObservatoryLocation(const casacore::MPosition& mLocation) {mLocation_p=mLocation;};
      90             :     virtual void finalizeToSky();
      91             :     virtual void initializeToSky(casacore::ImageInterface<casacore::Complex>& image,  casacore::Matrix<casacore::Float>& weight,
      92             :                                  const VisBuffer& vb);
      93           0 :     virtual casacore::String name() {return "PBMosaicFT";};
      94           0 :     virtual casacore::Bool verifyShapes(casacore::IPosition , casacore::IPosition )
      95           0 :     {return true;};
      96             : 
      97             :   private:
      98             :     casacore::Complex nApertures;
      99             :     casacore::Vector<casacore::Int> fieldIds_p;
     100             :     casacore::TempImage<casacore::Complex> griddedWeights;
     101             :     //casacore::Float pbNorm;
     102             :     virtual void runFortranGet(casacore::Matrix<casacore::Double>& uvw,casacore::Vector<casacore::Double>& dphase,
     103             :                        casacore::Cube<casacore::Complex>& visdata,
     104             :                        casacore::IPosition& s,
     105             :                        //casacore::Cube<casacore::Complex>& gradVisAzData,
     106             :                        //casacore::Cube<casacore::Complex>& gradVisElData,
     107             :                        //casacore::IPosition& gradS,
     108             :                        casacore::Int& Conj,
     109             :                        casacore::Cube<casacore::Int>& flags,casacore::Vector<casacore::Int>& rowFlags,
     110             :                        casacore::Int& rownr,casacore::Vector<casacore::Double>& actualOffset,
     111             :                        casacore::Array<casacore::Complex>* dataPtr,
     112             :                        casacore::Int& aNx, casacore::Int& aNy, casacore::Int& npol, casacore::Int& nchan,
     113             :                        VisBuffer& vb,casacore::Int& Nant_p, casacore::Int& scanNo,
     114             :                        casacore::Double& sigma,
     115             :                        casacore::Array<casacore::Float>& raoffsets,
     116             :                        casacore::Array<casacore::Float>& decoffsets,
     117             :                        casacore::Double area,
     118             :                        casacore::Int& doGrad,casacore::Int paIndex);
     119             :     virtual void runFortranPut(casacore::Matrix<casacore::Double>& uvw,casacore::Vector<casacore::Double>& dphase,
     120             :                        const casacore::Complex& visdata_p,
     121             :                        casacore::IPosition& s,
     122             :                        //casacore::Cube<casacore::Complex>& gradVisAzData,
     123             :                        //casacore::Cube<casacore::Complex>& gradVisElData,
     124             :                        //casacore::IPosition& gradS,
     125             :                        casacore::Int& Conj,
     126             :                        casacore::Cube<casacore::Int>& flags,casacore::Vector<casacore::Int>& rowFlags,
     127             :                        const casacore::Matrix<casacore::Float>& weight,
     128             :                        casacore::Int& rownr,casacore::Vector<casacore::Double>& actualOffset,
     129             :                        casacore::Array<casacore::Complex>& dataPtr,
     130             :                        casacore::Int& aNx, casacore::Int& aNy, casacore::Int& npol, casacore::Int& nchan,
     131             :                        const VisBuffer& vb,casacore::Int& Nant_p, casacore::Int& scanNo,
     132             :                        casacore::Double& sigma,
     133             :                        casacore::Array<casacore::Float>& raoffsets,
     134             :                        casacore::Array<casacore::Float>& decoffsets,
     135             :                        casacore::Matrix<casacore::Double>& sumWeight,
     136             :                        casacore::Double& area,
     137             :                        casacore::Int& doGrad,
     138             :                        casacore::Int& doPSF,casacore::Int paIndex);
     139             :     virtual void runFortranGetGrad(casacore::Matrix<casacore::Double>& uvw,casacore::Vector<casacore::Double>& dphase,
     140             :                          casacore::Cube<casacore::Complex>& visdata,
     141             :                          casacore::IPosition& s,
     142             :                          casacore::Cube<casacore::Complex>& gradVisAzData,
     143             :                          casacore::Cube<casacore::Complex>& gradVisElData,
     144             :                          //                      casacore::IPosition& gradS,
     145             :                          casacore::Int& Conj,
     146             :                          casacore::Cube<casacore::Int>& flags,casacore::Vector<casacore::Int>& rowFlags,
     147             :                          casacore::Int& rownr,casacore::Vector<casacore::Double>& actualOffset,
     148             :                          casacore::Array<casacore::Complex>* dataPtr,
     149             :                          casacore::Int& aNx, casacore::Int& aNy, casacore::Int& npol, casacore::Int& nchan,
     150             :                          VisBuffer& vb,casacore::Int& Nant_p, casacore::Int& scanNo,
     151             :                          casacore::Double& sigma,
     152             :                          casacore::Array<casacore::Float>& l_off,
     153             :                          casacore::Array<casacore::Float>& m_off,
     154             :                          casacore::Double area,
     155             :                          casacore::Int& doGrad,
     156             :                          casacore::Int paIndex);
     157             : 
     158             :   };
     159             : 
     160             : } //# NAMESPACE CASA - END
     161             : 
     162             : #endif

Generated by: LCOV version 1.16