LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - ComponentFTMachine.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 1 2 50.0 %
Date: 2024-12-11 20:54:31 Functions: 1 2 50.0 %

          Line data    Source code
       1             : //# ComponentFTMachine.h: Definition for ComponentFTMachine
       2             : //# Copyright (C) 1996,1997,1998,1999,2000,2001
       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_COMPONENTFTMACHINE_H
      30             : #define SYNTHESIS_COMPONENTFTMACHINE_H
      31             : 
      32             : #include <components/ComponentModels/SkyComponent.h>
      33             : #include <casacore/measures/Measures/MDirection.h>
      34             : #include <casacore/measures/Measures/MPosition.h>
      35             : #include <casacore/casa/Arrays/Array.h>
      36             : #include <casacore/casa/Arrays/Vector.h>
      37             : #include <casacore/casa/Arrays/Matrix.h>
      38             : #include <casacore/casa/Logging/LogIO.h>
      39             : #include <casacore/casa/Logging/LogSink.h>
      40             : #include <casacore/casa/Logging/LogMessage.h>
      41             : 
      42             : namespace casa { //# NAMESPACE CASA - BEGIN
      43             : 
      44             : 
      45             : 
      46             : // <summary> 
      47             : // ComponentFTMachine: a abstract base class defining the interface
      48             : // for a Fourier Transform Machine to be used in the 
      49             : // <linkto class=SkyEquation>SkyEquation</linkto> for the
      50             : // transformation of SkyComponents
      51             : // </summary>
      52             : 
      53             : // <use visibility=export>
      54             : 
      55             : // <reviewed reviewer="" date="" tests="" demos="">
      56             : 
      57             : // <prerequisite>
      58             : //   <li> <linkto class=SkyModel>SkyModel</linkto> module
      59             : //   <li> <linkto class=SkyEquation>SkyEquation</linkto> module
      60             : //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
      61             : //   <li> <linkto class=SkyComponent>SkyComponent</linkto> class
      62             : // </prerequisite>
      63             : //
      64             : // <etymology>
      65             : // FTMachine is a Machine for Fourier Transforms
      66             : // </etymology>
      67             : //
      68             : // <synopsis> 
      69             : // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be able
      70             : // to perform Fourier transforms on visibility data. FTMachine
      71             : // allows efficient Fourier Transform processing using a 
      72             : // <linkto class=VisBuffer>VisBuffer</linkto> which encapsulates
      73             : // a chunk of visibility (typically all baselines for one time)
      74             : // together with all the information needed for processing
      75             : // (e.g. UVW coordinates).
      76             : // </synopsis> 
      77             : //
      78             : // <example>
      79             : // A simple example of an ComponentFTMachine is found in 
      80             : // <linkto class=GridFT>SimpleComponentFTMachine</linkto>.
      81             : // See the example for <linkto class=SkyModel>SkyModel</linkto>.
      82             : // </example>
      83             : //
      84             : // <motivation>
      85             : // Define an interface to allow efficient processing of chunks of 
      86             : // visibility data
      87             : //
      88             : // </motivation>
      89             : //
      90             : // <todo asof="98/01/25">
      91             : // </li> SmearedComponentFTMachine to take into account
      92             : // time and bandwidth smearing
      93             : // </todo>
      94             : 
      95             : 
      96             : 
      97             : // Forward declarations
      98             : class ComponentList;
      99             : class VisBuffer;
     100             : 
     101             : 
     102             : class ComponentFTMachine {
     103             : public:
     104             : 
     105             :   ComponentFTMachine();
     106             : 
     107             :   ComponentFTMachine(const ComponentFTMachine& other);
     108             : 
     109             :   ComponentFTMachine& operator=(const ComponentFTMachine& other);
     110             : 
     111             :   virtual ~ComponentFTMachine();
     112             : 
     113             :   // Get actual coherence : this is the only virtual method
     114             :   virtual void get(VisBuffer& vb, SkyComponent& component, casacore::Int row=-1) = 0;
     115             :   // Get actual coherence : this is the other only virtual method
     116             :   virtual void get(VisBuffer& vb, const ComponentList& componentList, casacore::Int row=-1) = 0;
     117             : 
     118             :   // Rotate the uvw from the observed phase center to the
     119             :   // desired phase center.
     120             :   void rotateUVW(casacore::Matrix<casacore::Double>& uvw, casacore::Vector<casacore::Double>& dphase,
     121             :                  const VisBuffer& vb, const casacore::MDirection& mDesired);
     122             :   // A version that use pointers to contigous matrix and vector 
     123             :   void rotateUVW(casacore::Double*& uvw, casacore::Double*& dphase, const casacore::Int nrows,
     124             :                  const VisBuffer& vb, const casacore::MDirection& mDesired);
     125             :   // Set number of threads to use when predicting. Setting it to -1 
     126             :   // basically tell openmp to use the number it can get
     127             :   void setnumthreads(const casacore::Int numthreads);
     128             :   //set and get Time to calculate phasecenter  -1.0 means using the time available at 
     129             :   //each iteration..this is used when the phasecenter in the field table is either 
     130             :   //a polynomial or has a ephemerides tables associated with it
     131             :   //Using double in the units and epoch-frame of the ms(s) ..caller is responsible for conversion
     132         110 :   void setPhaseCenterTime(const casacore::Double time){phaseCenterTime_p=time;};
     133           0 :   casacore::Double getPhaseCenterTime(){return phaseCenterTime_p;};
     134             : protected:
     135             : 
     136             :   casacore::LogIO logIO_p;
     137             : 
     138             :   casacore::LogIO& logIO();
     139             : 
     140             :   // Default Position used for phase rotations
     141             :   casacore::MPosition mLocation_p;
     142             :   
     143             :   virtual void ok();
     144             :   casacore::Int numthreads_p;
     145             :   casacore::Double phaseCenterTime_p;
     146             : 
     147             : };
     148             : 
     149             : } //# NAMESPACE CASA - END
     150             : 
     151             : #endif

Generated by: LCOV version 1.16