LCOV - code coverage report
Current view: top level - synthesis/TransformMachines2 - SetJyGridFT.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 1 1 100.0 %
Date: 2024-10-10 15:00:01 Functions: 0 0 -

          Line data    Source code
       1             : //# SetJyGridFT.h: Definition for GridFT
       2             : //# Copyright (C) 2012-2014
       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  General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU  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_TRANSFORM2_SETJYGRIDFT_H
      30             : #define SYNTHESIS_TRANSFORM2_SETJYGRIDFT_H
      31             : 
      32             : #include <synthesis/TransformMachines2/GridFT.h>
      33             : 
      34             : 
      35             : namespace casa { //# NAMESPACE CASA - BEGIN
      36             : namespace vi { class VisBuffer2;}
      37             : 
      38             : namespace refim { //#namespace for imaging refactor
      39             : // <summary>  An FTMachine for Gridded Fourier transforms specializing in setjy frequency scaling </summary>
      40             : 
      41             : // <use visibility=export>
      42             : 
      43             : // <reviewed reviewer="" date="" tests="" demos="">
      44             : 
      45             : // <prerequisite>
      46             : //   <li> <linkto class=FTMachine>GridFT</linkto> module
      47             : //   <li> <linkto class=SkyEquation>SkyEquation</linkto> module
      48             : //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
      49             : // </prerequisite>
      50             : //
      51             : // <etymology>
      52             : // Inheriting from GridFT which does
      53             : // Grid-based Fourier transforms.
      54             : // special case for setjy style frequency scaling
      55             : // </etymology>
      56             : //
      57             : // <synopsis> 
      58             : 
      59             : // </synopsis> 
      60             : //
      61             : // <example>
      62             : // </example>
      63             : //
      64             : // <motivation>
      65             : // Define an interface to allow efficient processing of chunks of 
      66             : // visibility data
      67             : // </motivation>
      68             : //
      69             : // <todo asof="2012/05/08">
      70             : //
      71             : // </todo>
      72             : 
      73             : class SetJyGridFT : public GridFT {
      74             : public:
      75             : 
      76             :   // Constructor: cachesize is the size of the cache in words
      77             :   // (e.g. a few million is a good number), tilesize is the
      78             :   // size of the tile used in gridding (cannot be less than
      79             :   // 12, 16 works in most cases), and convType is the type of
      80             :   // gridding used (SF is prolate spheriodal wavefunction,
      81             :   // and BOX is plain box-car summation). mLocation is
      82             :   // the position to be used in some phase rotations. If
      83             :   // mTangent is specified then the uvw rotation is done for
      84             :   // that location iso the image center.
      85             :   // <group>
      86             : 
      87             :   SetJyGridFT(casacore::Long cachesize, casacore::Int tilesize, casacore::String convType,
      88             :          casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0,
      89             :          casacore::Bool usezero=true, casacore::Bool useDoublePrec=false,
      90           1 :               const casacore::Vector<casacore::Double>& freqscale=casacore::Vector<casacore::Double>(1, 0.0), const casacore::Vector<casacore::Double>& scale=casacore::Vector<casacore::Double>(1, 1.0));
      91             :   // </group>
      92             : 
      93             :   // Construct from a casacore::Record containing the GridFT state
      94             :   SetJyGridFT(const casacore::RecordInterface& stateRec);
      95             : 
      96             :   // Copy constructor
      97             :   SetJyGridFT(const SetJyGridFT &other);
      98             : 
      99             :   // Assignment operator
     100             :   SetJyGridFT &operator=(const SetJyGridFT &other);
     101             : 
     102             :   virtual ~SetJyGridFT();
     103             : 
     104             :   //clone FTM
     105             :   virtual FTMachine* cloneFTM();
     106             :   // Initialize transform to Visibility plane using the image
     107             :   // as a template. The image is loaded and Fourier transformed.
     108             :   virtual void initializeToVis(casacore::ImageInterface<casacore::Complex>& image,
     109             :                                const vi::VisBuffer2& vb);
     110             :   
     111             :   // Finalize transform to Visibility plane: flushes the image
     112             :   // cache and shows statistics if it is being used.
     113             :   //void finalizeToVis();
     114             : 
     115             :   // Get actual coherence from grid by degridding
     116             :   void get(vi::VisBuffer2& vb, casacore::Int row=-1);
     117             : 
     118             :   
     119             :   // Save and restore the GridFT to and from a record
     120             :   virtual casacore::Bool toRecord(casacore::String& error, casacore::RecordInterface& outRec, 
     121             :                         casacore::Bool withImage=false, const casacore::String diskimage="");
     122             :   virtual casacore::Bool fromRecord(casacore::String& error, const casacore::RecordInterface& inRec);
     123             : 
     124             :   virtual void setScale(const casacore::Vector<casacore::Double>& freq, const casacore::Vector<casacore::Double>& scale);
     125             : 
     126             :   virtual casacore::String name() const;
     127             : 
     128             : 
     129             : protected:
     130             : 
     131             : 
     132             : 
     133             : 
     134             :   //Prepare the grid for degridding
     135             :   //void prepGridForDegrid();
     136             : 
     137             :   casacore::Vector<casacore::Double> freqscale_p;
     138             :   casacore::Vector<casacore::Double> scale_p;
     139             :   casacore::Vector<casacore::Double> interpscale_p;
     140             : 
     141             : 
     142             : 
     143             : };
     144             : } //# end of namespace refim
     145             : } //# NAMESPACE CASA - END
     146             : 
     147             : #endif

Generated by: LCOV version 1.16