casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SimpleComponentFTMachine.h
Go to the documentation of this file.
00001 //# SimpleComponentFTMachine.h: Definition for SimpleComponentFTMachine
00002 //# Copyright (C) 1996,1997,1998,2000,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be adressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
00028 
00029 #ifndef SYNTHESIS_SIMPLECOMPONENTFTMACHINE_H
00030 #define SYNTHESIS_SIMPLECOMPONENTFTMACHINE_H
00031 
00032 #include <synthesis/MSVis/VisBuffer.h>
00033 #include <synthesis/TransformMachines/ComponentFTMachine.h>
00034 #include <measures/Measures/MDirection.h>
00035 #include <measures/Measures/MPosition.h>
00036 #include <casa/Arrays/Array.h>
00037 #include <casa/Arrays/Vector.h>
00038 #include <casa/Arrays/Matrix.h>
00039 #include <casa/Logging/LogIO.h>
00040 #include <casa/Logging/LogSink.h>
00041 #include <casa/Logging/LogMessage.h>
00042 
00043 
00044 namespace casa { //# NAMESPACE CASA - BEGIN
00045 
00046 // <summary>  does the simplest Fourier transform on SkyComponents </summary>
00047 
00048 // <use visibility=export>
00049 
00050 // <reviewed reviewer="" date="" tests="" demos="">
00051 
00052 // <prerequisite>
00053 //   <li> <linkto class=ComponentFTMachine>ComponentFTMachine</linkto> class
00054 //   <li> <linkto class=SkyEquation>SkyEquation</linkto> class
00055 //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
00056 // </prerequisite>
00057 //
00058 // <etymology>
00059 // ComponentFTMachine is a Machine for Fourier Transforms of
00060 // SkyComponents
00061 // </etymology>
00062 //
00063 // <synopsis> 
00064 // Does a simple transform of a sky component. The phase term
00065 // is fully accurate but no smearing is included.
00066 // </synopsis> 
00067 //
00068 // <example>
00069 // </example>
00070 //
00071 // <motivation>
00072 // Allow transformation of sky components.
00073 //
00074 // </motivation>
00075 //
00076 // <todo asof="97/10/01">
00077 // </todo>
00078 
00079 
00080 // Forward declarations
00081 class ComponentList;
00082 
00083 
00084 class SimpleComponentFTMachine : public ComponentFTMachine {
00085 public:
00086 
00087   // Get actual coherence 
00088   virtual void get(VisBuffer& vb, const ComponentList& compList, Int row=-1);
00089   // Get actual coherence 
00090   virtual void get(VisBuffer& vb, SkyComponent& skycomponent, Int row=-1);
00091 
00092 protected:
00093   void applyPhasor(const Int part, const Block<Int>& startrow, 
00094                    const Vector<uInt>& nRowp,  
00095                    const Vector<Double>& dphase,  const Vector<Double>& invLambda, 
00096                    const Int npol, const Int nchan, 
00097                    const Vector<Int>& corrType, 
00098                    const Cube<DComplex>& dVis, Complex*& modData);
00099   
00100   void predictVis(Complex*& modData, const Vector<Double>& invLambda, 
00101                   const Vector<Double>& frequency, 
00102                   const ComponentList& compList, 
00103                   ComponentType::Polarisation poltype, const Vector<Int>& corrType, 
00104                   const uInt startrow, const uInt nrows, 
00105                   const uInt nchan, const uInt npol, 
00106                   const Block<Matrix<Double> > & uvwcomp, 
00107                   const Block<Vector<Double> > & dphasecomp);
00108 
00109 };
00110 
00111 } //# NAMESPACE CASA - END
00112 
00113 #endif