casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
DataSampling.h
Go to the documentation of this file.
00001 //# DataSampling.h: Definition for DataSampling
00002 //# Copyright (C) 1996,1997,1998,1999,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_DATASAMPLING_H
00030 #define SYNTHESIS_DATASAMPLING_H
00031 
00032 #include <images/Images/ImageInterface.h>
00033 #include <casa/Arrays/Matrix.h>
00034 #include <casa/Arrays/Array.h>
00035 #include <casa/Arrays/Vector.h>
00036 #include <casa/Arrays/Matrix.h>
00037 
00038 namespace casa { //# NAMESPACE CASA - BEGIN
00039 
00040 // <summary> Provides sampling of data for esimation algorithms
00041 // </summary>
00042 
00043 // <use visibility=export>
00044 
00045 // <reviewed reviewer="" date="" tests="" demos="">
00046 
00047 // <prerequisite>
00048 // </prerequisite>
00049 //
00050 // <etymology>
00051 // Samples Data as needed for various estimation algorithms
00052 // </etymology>
00053 //
00054 // <synopsis> 
00055 // Esimation algorithms such as the Pixon method need sampled
00056 // and unitless versions of the data. This class is a base class
00057 // for such sampling classes. Derived examples are for single
00058 // dish imaging (SDDataSampling) and image deconvolution 
00059 // (ImageDataSampling).
00060 //
00061 // THe calculated quantities are
00062 // <ul>
00063 // <li> The Data Sampling Function: the coordinates of the sampled
00064 // points in some space
00065 // <li> The Data: the actual data points corresponding to the 
00066 // Data Sampling Function
00067 // <li> The Error: the error per data point.
00068 // <li> The Point Response Function in that space
00069 //
00070 // The DataSampling object is constructed with the data sources
00071 // as arguments, and then the calculate method is used to find the
00072 // above quantities. The estimation method may then retrieve the
00073 // data quantities as needed.
00074 // </synopsis> 
00075 //
00076 // <example>
00077 // // Define an estimator
00078 // PixonProcessor pp;
00079 // 
00080 // // Get the model image
00081 // PagedImage<Float> modelImage(modelName);
00082 //
00083 // // Set up the data sampling
00084 // VPSkyJones vp(ms, True, parAngleInc, squintType);
00085 // SDDataSampling ds(ms, vp);
00086 //
00087 // // Calculating data sampling, etc.
00088 //
00089 // ds.calculate(modelImage);
00090 //
00091 // // Finding pixon solution
00092 // pp.calculate(ds);
00093 // </example>
00094 //
00095 // <motivation>
00096 // Define an interface to allow efficient processing of chunks of 
00097 // data
00098 // </motivation>
00099 //
00100 // <todo asof="01/03/03">
00101 // <ul> Derive more examples
00102 // </todo>
00103 
00104 class DataSampling  {
00105 public:
00106 
00107   DataSampling();
00108 
00109   // Copy constructor
00110   DataSampling(const DataSampling &other);
00111 
00112   // Assignment operator
00113   DataSampling &operator=(const DataSampling &other);
00114 
00115   virtual ~DataSampling();
00116 
00117   const Array<Float>& getDX() const;
00118 
00119   const Array<Float>& getData() const;
00120 
00121   const Array<Float>& getSigma() const;
00122 
00123   const Array<Float>& getPRF() const;
00124 
00125   String getIDLScript() const {return IDLScript_p;};
00126 
00127 protected:
00128 
00129   Array<Float> dx_p;
00130   Array<Float> data_p;
00131   Array<Float> sigma_p;
00132   Array<Float> prf_p;
00133 
00134   Int lastRow;
00135 
00136   String IDLScript_p;
00137 
00138   void ok();
00139 
00140 };
00141 
00142 } //# NAMESPACE CASA - END
00143 
00144 #endif