casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PredictAlgorithm.h
Go to the documentation of this file.
00001 //# Predict.h: Parallel model visibility prediction
00002 //# Copyright (C) 1996,1997,1998,1999,2000,2002
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 addressed 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 //# $Id$
00027 
00028 #ifndef SYNTHESIS_PREDICTALGORITHM_H
00029 #define SYNTHESIS_PREDICTALGORITHM_H
00030 
00031 #include <casa/BasicSL/String.h>
00032 #include <synthesis/Parallel/Algorithm.h>
00033 #include <synthesis/Parallel/Applicator.h>
00034 #include <synthesis/MSVis/VisSet.h>
00035 #include <synthesis/MSVis/VisSetUtil.h>
00036 #include <images/Images/ImageInterface.h>
00037 #include <images/Images/PagedImage.h>
00038 #include <images/Images/TempImage.h>
00039 #include <synthesis/TransformMachines/GridFT.h>
00040 #include <synthesis/TransformMachines/FTMachine.h>
00041 
00042 namespace casa { //# NAMESPACE CASA - BEGIN
00043 
00044 // <summary> Parallel model visibility prediction </summary>
00045 
00046 // <use visibility=export>
00047 
00048 // <reviewed reviewer="" date="" tests="" demos="">
00049 
00050 // <prerequisite>
00051 //   <li> <linkto module="FTMachine">FTMachine</linkto> module
00052 //    <li> <linkto module="Applicator">Algorithm</linkto> module
00053 // </prerequisite>
00054 //
00055 // <etymology>
00056 // From "parallel model visibility prediction" and "algorithm"
00057 // </etymology>
00058 //
00059 // <synopsis> 
00060 // Used by PSkyEquation to predict model visibility in parallel.
00061 // Fits within the Applicator/Algorithm framework
00062 // </synopsis> 
00063 //
00064 // <example>
00065 // <srcblock>
00066 
00067 // </srcblock>
00068 // </example>
00069 //
00070 // <motivation>
00071 // Encapsulates the parallel model visibility prediction
00072 // </motivation>
00073 //
00074 // <todo asof="01/7/20">
00075 // <li> Implement changing SkyJones so that mosaicing can be parallelized
00076 // </todo>
00077 
00078 class PredictAlgorithm : public Algorithm {
00079  public:
00080   // Default constructor and destructor
00081   PredictAlgorithm();
00082   ~PredictAlgorithm();
00083 
00084   // Get the input data and parameters from the controller
00085   void get();
00086 
00087   // Return the results to the controller
00088   void put();
00089 
00090   // Return the name of the algorithm
00091   String &name();
00092 
00093 private:
00094   // Private data
00095   Int model_p;
00096 
00097   TempImage<Complex> *cImage_p;
00098   String myName_p;
00099   String msName_p;
00100   Bool incremental_p;
00101   TempImage<Float> psf_p;
00102   FTMachine* ft_p;
00103   MeasurementSet *ms_p ; 
00104 
00105   // The work that a child processor is to do 
00106   void task();
00107 
00108   // Initialize the visibility grid 
00109   void initializeGet(const VisBuffer& vb, Int row, Int model, 
00110                      Bool incremental);
00111 
00112   // FT and put the result into the model visibility column of the visbuffer 
00113   VisBuffer& getModelVis(VisBuffer& vb, Int model,
00114                          Bool incremental);
00115 
00116 };
00117 
00118 
00119 } //# NAMESPACE CASA - END
00120 
00121 #endif
00122 
00123 
00124 
00125 
00126