LCOV - code coverage report
Current view: top level - synthesis/ImagerObjects - SIMapper.h (source / functions) Hit Total Coverage
Test: casa_coverage.info Lines: 3 5 60.0 %
Date: 2023-10-25 08:47:59 Functions: 3 5 60.0 %

          Line data    Source code
       1             : //# SIMapper.h: Imager functionality sits here; 
       2             : //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
       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 addressed 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             : //#
      25             : //# $Id$
      26             : 
      27             : #ifndef SYNTHESIS_SIMAPPER_H
      28             : #define SYNTHESIS_SIMAPPER_H
      29             : 
      30             : #include <casacore/casa/aips.h>
      31             : #include <casacore/casa/OS/Timer.h>
      32             : #include <casacore/casa/Containers/Record.h>
      33             : #include <casacore/ms/MeasurementSets/MeasurementSet.h>
      34             : #include <casacore/casa/Arrays/IPosition.h>
      35             : #include <casacore/casa/Quanta/Quantum.h>
      36             : #include <casacore/measures/Measures/MDirection.h>
      37             : 
      38             : #include <msvis/MSVis/VisBuffer.h>
      39             : #include <msvis/MSVis/VisBuffer2.h>
      40             : #include <synthesis/TransformMachines/FTMachine.h>
      41             : #include <synthesis/TransformMachines2/FTMachine.h>
      42             : 
      43             : namespace casacore{
      44             : 
      45             : template<class T> class ImageInterface;
      46             : }
      47             : 
      48             : namespace casa { //# NAMESPACE CASA - BEGIN
      49             : 
      50             : // Forward declarations
      51             :   class ComponentFTMachine;
      52             :   namespace refim{class ComponentFTMachine;}
      53             :   class SkyJones;
      54             : 
      55             : // <summary> Class that contains functions needed for imager </summary>
      56             : 
      57             :   class SIMapper// : public SIMapperBase
      58             : {
      59             :  public:
      60             :   // Default constructor
      61             : 
      62             :   SIMapper( casacore::CountedPtr<SIImageStore>& imagestore,
      63             :             casacore::CountedPtr<FTMachine>& ftm, 
      64             :             casacore::CountedPtr<FTMachine>& iftm);
      65             : 
      66             :   ///Vi2/VisBuffer2 constructor
      67             :    SIMapper( casacore::CountedPtr<SIImageStore>& imagestore,
      68             :              casacore::CountedPtr<refim::FTMachine>& ftm, 
      69             :              casacore::CountedPtr<refim::FTMachine>& iftm);
      70             : 
      71             :   SIMapper(const ComponentList& cl, 
      72             :            casacore::String& whichMachine);
      73             :   virtual ~SIMapper();
      74             : 
      75             :   ///// Major Cycle Functions
      76             :   virtual void initializeGrid(vi::VisBuffer2& vb, casacore::Bool dopsf, casacore::Bool firstaccess=false);
      77             :   virtual void grid(vi::VisBuffer2& vb, casacore::Bool dopsf, refim::FTMachine::Type col, const casacore::Int whichFTM=-1);
      78             :   virtual void finalizeGrid(vi::VisBuffer2& vb, casacore::Bool dopsf);
      79             :   virtual void initializeDegrid(vi::VisBuffer2& vb, casacore::Int row=-1);
      80             :   virtual void degrid(vi::VisBuffer2& vb);
      81             :   virtual void addPB(vi::VisBuffer2& vb, PBMath& pbMath, const casacore::MDirection& altDir=MDirection(), const casacore::Bool useAltDir=False);
      82             :   /////////////////////// OLD VI/VB versions
      83             :   virtual void initializeGrid(VisBuffer& vb, casacore::Bool dopsf, casacore::Bool firstaccess=false);
      84             :   virtual void grid(VisBuffer& vb, casacore::Bool dopsf, FTMachine::Type col, const casacore::Int whichFTM=-1);
      85             :   virtual void finalizeGrid(VisBuffer& vb, casacore::Bool dopsf);
      86             :   virtual void initializeDegrid(VisBuffer& vb, casacore::Int row=-1);
      87             :   virtual void degrid(VisBuffer& vb);
      88             :   virtual void addPB(VisBuffer& vb, PBMath& pbMath);
      89             : 
      90             :   virtual void finalizeDegrid();
      91             : 
      92             :   //////////////the return value is false if no valid record is being returned
      93             :   casacore::Bool getCLRecord(casacore::Record& rec);
      94             :   casacore::Bool getFTMRecord(casacore::Record& rec, const casacore::String diskimage="");
      95             : 
      96           0 :   virtual casacore::String getImageName(){return itsImages->getName();};
      97       22333 :   virtual casacore::CountedPtr<SIImageStore> imageStore(){return itsImages;};
      98        3643 :   virtual casacore::Bool releaseImageLocks(){return itsImages->releaseLocks();};
      99             : 
     100           0 :   const casacore::CountedPtr<FTMachine>& getFTM(const casacore::Bool ift=true) {if (ift) return ift_p; else return ft_p;};
     101       16991 :   const casacore::CountedPtr<refim::FTMachine>& getFTM2(const casacore::Bool ift=true) {if (ift) return ift2_p; else return ft2_p;};
     102             : 
     103             :   
     104             :   virtual void initPB();
     105             :   
     106             : 
     107             : protected:
     108             : 
     109             :   casacore::CountedPtr<FTMachine> ft_p, ift_p; 
     110             :   casacore::CountedPtr<refim::FTMachine> ft2_p, ift2_p; 
     111             :   casacore::CountedPtr<ComponentFTMachine> cft_p;
     112             :   casacore::CountedPtr<refim::ComponentFTMachine> cft2_p;
     113             :   ComponentList cl_p;
     114             :   casacore::Bool useViVb2_p;
     115             :   casacore::CountedPtr<SIImageStore> itsImages;
     116             : 
     117             : };
     118             : 
     119             : 
     120             : } //# NAMESPACE CASA - END
     121             : 
     122             : #endif

Generated by: LCOV version 1.16