SetJyGridFT.h

Go to the documentation of this file.
00001 //# SetJyGridFT.h: Definition for GridFT
00002 //# Copyright (C) 2012-2014
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 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  General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU  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_TRANSFORM2_SETJYGRIDFT_H
00030 #define SYNTHESIS_TRANSFORM2_SETJYGRIDFT_H
00031 
00032 #include <synthesis/TransformMachines2/GridFT.h>
00033 
00034 
00035 namespace casa { //# NAMESPACE CASA - BEGIN
00036 namespace vi { class VisBuffer2;}
00037 
00038 namespace refim { //#namespace for imaging refactor
00039 // <summary>  An FTMachine for Gridded Fourier transforms specializing in setjy frequency scaling </summary>
00040 
00041 // <use visibility=export>
00042 
00043 // <reviewed reviewer="" date="" tests="" demos="">
00044 
00045 // <prerequisite>
00046 //   <li> <linkto class=FTMachine>GridFT</linkto> module
00047 //   <li> <linkto class=SkyEquation>SkyEquation</linkto> module
00048 //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
00049 // </prerequisite>
00050 //
00051 // <etymology>
00052 // Inheriting from GridFT which does
00053 // Grid-based Fourier transforms.
00054 // special case for setjy style frequency scaling
00055 // </etymology>
00056 //
00057 // <synopsis> 
00058 
00059 // </synopsis> 
00060 //
00061 // <example>
00062 // </example>
00063 //
00064 // <motivation>
00065 // Define an interface to allow efficient processing of chunks of 
00066 // visibility data
00067 // </motivation>
00068 //
00069 // <todo asof="2012/05/08">
00070 //
00071 // </todo>
00072 
00073 class SetJyGridFT : public GridFT {
00074 public:
00075 
00076   // Constructor: cachesize is the size of the cache in words
00077   // (e.g. a few million is a good number), tilesize is the
00078   // size of the tile used in gridding (cannot be less than
00079   // 12, 16 works in most cases), and convType is the type of
00080   // gridding used (SF is prolate spheriodal wavefunction,
00081   // and BOX is plain box-car summation). mLocation is
00082   // the position to be used in some phase rotations. If
00083   // mTangent is specified then the uvw rotation is done for
00084   // that location iso the image center.
00085   // <group>
00086 
00087   SetJyGridFT(Long cachesize, Int tilesize, String convType,
00088          MPosition mLocation, MDirection mTangent, Float passing=1.0,
00089          Bool usezero=True, Bool useDoublePrec=False,
00090               const Vector<Double>& freqscale=Vector<Double>(1, 0.0), const Vector<Double>& scale=Vector<Double>(1, 1.0));
00091   // </group>
00092 
00093   // Construct from a Record containing the GridFT state
00094   SetJyGridFT(const RecordInterface& stateRec);
00095 
00096   // Copy constructor
00097   SetJyGridFT(const SetJyGridFT &other);
00098 
00099   // Assignment operator
00100   SetJyGridFT &operator=(const SetJyGridFT &other);
00101 
00102   virtual ~SetJyGridFT();
00103 
00104   //clone FTM
00105   virtual FTMachine* cloneFTM();
00106   // Initialize transform to Visibility plane using the image
00107   // as a template. The image is loaded and Fourier transformed.
00108   virtual void initializeToVis(ImageInterface<Complex>& image,
00109                                const vi::VisBuffer2& vb);
00110   
00111   // Finalize transform to Visibility plane: flushes the image
00112   // cache and shows statistics if it is being used.
00113   //void finalizeToVis();
00114 
00115   // Get actual coherence from grid by degridding
00116   void get(vi::VisBuffer2& vb, Int row=-1);
00117 
00118   
00119   // Save and restore the GridFT to and from a record
00120   virtual Bool toRecord(String& error, RecordInterface& outRec, 
00121                         Bool withImage=False, const String diskimage="");
00122   virtual Bool fromRecord(String& error, const RecordInterface& inRec);
00123 
00124   virtual void setScale(const Vector<Double>& freq, const Vector<Double>& scale);
00125 
00126   virtual String name() const;
00127 
00128 
00129 protected:
00130 
00131 
00132 
00133 
00134   //Prepare the grid for degridding
00135   //void prepGridForDegrid();
00136 
00137   Vector<Double> freqscale_p;
00138   Vector<Double> scale_p;
00139   Vector<Double> interpscale_p;
00140 
00141 
00142 
00143 };
00144 } //# end of namespace refim
00145 } //# NAMESPACE CASA - END
00146 
00147 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1