LCOV - code coverage report
Current view: top level - synthesis/ImagerObjects - SIMapper.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 3 5 60.0 %
Date: 2024-12-11 20:54:31 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: casa-feedback@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 handleNewMs(const casacore::MeasurementSet &ms);
      78             :   virtual void grid(vi::VisBuffer2& vb, casacore::Bool dopsf, refim::FTMachine::Type col, const casacore::Int whichFTM=-1);
      79             :   virtual void finalizeGrid(vi::VisBuffer2& vb, casacore::Bool dopsf);
      80             :   virtual void initializeDegrid(vi::VisBuffer2& vb, casacore::Int row=-1);
      81             :   virtual void degrid(vi::VisBuffer2& vb);
      82             :   virtual void addPB(vi::VisBuffer2& vb, PBMath& pbMath, const casacore::MDirection& altDir=MDirection(), const casacore::Bool useAltDir=False);
      83             :   /////////////////////// OLD VI/VB versions
      84             :   virtual void initializeGrid(VisBuffer& vb, casacore::Bool dopsf, casacore::Bool firstaccess=false);
      85             :   virtual void grid(VisBuffer& vb, casacore::Bool dopsf, FTMachine::Type col, const casacore::Int whichFTM=-1);
      86             :   virtual void finalizeGrid(VisBuffer& vb, casacore::Bool dopsf);
      87             :   virtual void initializeDegrid(VisBuffer& vb, casacore::Int row=-1);
      88             :   virtual void degrid(VisBuffer& vb);
      89             :   virtual void addPB(VisBuffer& vb, PBMath& pbMath);
      90             : 
      91             :   virtual void finalizeDegrid();
      92             : 
      93             :   //////////////the return value is false if no valid record is being returned
      94             :   casacore::Bool getCLRecord(casacore::Record& rec);
      95             :   casacore::Bool getFTMRecord(casacore::Record& rec, const casacore::String diskimage="");
      96             : 
      97           0 :   virtual casacore::String getImageName(){return itsImages->getName();};
      98       23241 :   virtual casacore::CountedPtr<SIImageStore> imageStore(){return itsImages;};
      99        3740 :   virtual casacore::Bool releaseImageLocks(){return itsImages->releaseLocks();};
     100             : 
     101           0 :   const casacore::CountedPtr<FTMachine>& getFTM(const casacore::Bool ift=true) {if (ift) return ift_p; else return ft_p;};
     102       17529 :   const casacore::CountedPtr<refim::FTMachine>& getFTM2(const casacore::Bool ift=true) {if (ift) return ift2_p; else return ft2_p;};
     103             : 
     104             :   
     105             :   virtual void initPB();
     106             :   
     107             : 
     108             : protected:
     109             : 
     110             :   casacore::CountedPtr<FTMachine> ft_p, ift_p; 
     111             :   casacore::CountedPtr<refim::FTMachine> ft2_p, ift2_p; 
     112             :   casacore::CountedPtr<ComponentFTMachine> cft_p;
     113             :   casacore::CountedPtr<refim::ComponentFTMachine> cft2_p;
     114             :   ComponentList cl_p;
     115             :   casacore::Bool useViVb2_p;
     116             :   casacore::CountedPtr<SIImageStore> itsImages;
     117             : 
     118             : };
     119             : 
     120             : 
     121             : } //# NAMESPACE CASA - END
     122             : 
     123             : #endif

Generated by: LCOV version 1.16