casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
nPBWProjectFT.h
Go to the documentation of this file.
00001 //# nPBWProjectFT.h: Definition for nPBWProjectFT
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 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_PBWPROJECTFT_H
00030 #define SYNTHESIS_PBWPROJECTFT_H
00031 
00032 #include <synthesis/TransformMachines/FTMachine.h>
00033 #include <casa/Arrays/Matrix.h>
00034 #include <scimath/Mathematics/FFTServer.h>
00035 #include <synthesis/MSVis/VisBuffer.h>
00036 #include <images/Images/ImageInterface.h>
00037 #include <casa/Containers/Block.h>
00038 #include <casa/Arrays/Array.h>
00039 #include <casa/Arrays/Vector.h>
00040 #include <casa/Arrays/Matrix.h>
00041 #include <scimath/Mathematics/ConvolveGridder.h>
00042 #include <lattices/Lattices/LatticeCache.h>
00043 #include <lattices/Lattices/ArrayLattice.h>
00044 #include <ms/MeasurementSets/MSColumns.h>
00045 #include <measures/Measures/Measure.h>
00046 #include <measures/Measures/MDirection.h>
00047 #include <measures/Measures/MPosition.h>
00048 #include <coordinates/Coordinates/DirectionCoordinate.h>
00049 #include <synthesis/TransformMachines/VPSkyJones.h>
00050 #include <synthesis/TransformMachines/VLACalcIlluminationConvFunc.h>
00051 #include <synthesis/TransformMachines/VLAIlluminationConvFunc.h>
00052 #include <synthesis/TransformMachines/Utils.h>
00053 
00054 //#include <synthesis/MeasurementComponents/EPJones.h>
00055 #include <synthesis/MeasurementComponents/SolvableVisCal.h>
00056 #include <synthesis/MeasurementComponents/ConvFuncDiskCache.h>
00057 
00058 namespace casa { //# NAMESPACE CASA - BEGIN
00059   
00060   // <summary>  An FTMachine for Gridded Fourier transforms including effects of primary beam and pointing offsets and the w-term</summary>
00061   
00062   // <use visibility=export>
00063   
00064   // <reviewed reviewer="" date="" tests="" demos="">
00065   
00066   // <prerequisite>
00067   //   <li> <linkto class=FTMachine>FTMachine</linkto> module
00068   //   <li> <linkto class=SkyEquation>SkyEquation</linkto> module
00069   //   <li> <linkto class=VisBuffer>VisBuffer</linkto> module
00070   //   <li> <linto class=EPJones>EPJones</linkto> module
00071   // </prerequisite>
00072   //
00073   // <etymology> 
00074   // FTMachine is a Machine for Fourier Transforms. Like
00075   // WProjectFT, nPBWProjectFT does Grid-based Fourier transforms but
00076   // also includes the effects of primary beam and antenna pointing
00077   // offsets. 
00078   // </etymology>
00079   //
00080   // <synopsis> 
00081   //
00082   // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be
00083   // able to perform Fourier transforms on visibility
00084   // data. nPBWProjectFT allows efficient handling of direction
00085   // dependent effects due to the primary beam and antenna pointing
00086   // offsets using a <linkto class=VisBuffer>VisBuffer</linkto> which
00087   // encapsulates a chunk of visibility (typically all baselines for
00088   // one time) together with all the information needed for processing
00089   // (e.g. UVW coordinates).
00090   //
00091   // Using this FTMachine, errors due antenna pointing offsets can be
00092   // corrected during deconvolution.  One form of antenna pointing
00093   // error which is known a-priori is the VLA polarization squint
00094   // (about 6% of the Primary beam width at any frequency).  For
00095   // Stokes imaging, using this FTMachine, the VLA polarization squint
00096   // and beam polarization can also be corrected.  Also since the
00097   // effects of antenna pointing errors is strongest in the range of
00098   // 1-2GHz band (where the sky is not quite empty while the beams are
00099   // not too large either), this FTMachine can also be setup to
00100   // correct for the w-term.
00101   //
00102   // Switches are provided in the get() method to compute the
00103   // derivatives with respect to the parameters of the primary beam
00104   // (only pointing offsets for now).  This is used in the pointing
00105   // offset solver.
00106   //
00107   // See the documentation of other FTMachines for details about the
00108   // design of the FTMachines in general.
00109   //
00110   // </synopsis> 
00111   //
00112   // <example>
00113   // See the example for <linkto class=SkyModel>SkyModel</linkto>.
00114   // </example>
00115   //
00116   // <motivation>
00117   //
00118   // Encapsulate the correction of direction dependent effects via
00119   // visibility plane convolutions with a potentially different
00120   // convolution function for each baseline.
00121   //
00122   // </motivation>
00123   //
00124   // <todo asof="2005/07/21">
00125   //
00126   // <ul> Include the antenna based complex gain term as well since
00127   // that can interfere with the effects of pointing offsets.  
00128   //
00129   // <ul> Factor out the actual convolution functions as a separate
00130   // class making FTMachines for various direction dependent effects
00131   // generic.
00132   //
00133   // </todo>
00134   
00135   //  class EPJones;
00136   class SolvableVisJones;
00137   class nPBWProjectFT : public FTMachine {
00138   public:
00139     
00140     // Constructor: cachesize is the size of the cache in words
00141     // (e.g. a few million is a good number), tilesize is the
00142     // size of the tile used in gridding (cannot be less than
00143     // 12, 16 works in most cases). 
00144     // <group>
00145     nPBWProjectFT(Int nFacets, Long cachesize, String& cfCacheDirName,
00146                   Bool applyPointingOffset=True,
00147                   Bool doPBCorr=True,
00148                   Int tilesize=16, 
00149                   Float paSteps=5.0, Float pbLimit=5e-2,
00150                   Bool usezero=False);
00151     // </group>
00152     
00153     // Construct from a Record containing the nPBWProjectFT state
00154     nPBWProjectFT(const RecordInterface& stateRec);
00155     
00156     // Copy constructor
00157     nPBWProjectFT(const nPBWProjectFT &other);
00158     
00159     // Assignment operator
00160     nPBWProjectFT &operator=(const nPBWProjectFT &other);
00161     
00162     ~nPBWProjectFT();
00163     
00164     //   void setEPJones(EPJones* ep_j) {epJ = ep_j;}
00165     void setEPJones(SolvableVisJones* ep_j) {epJ = ep_j;}
00166     
00167     void setDOPBCorrection(Bool doit=True) {doPBCorrection=doit;};
00168     // Initialize transform to Visibility plane using the image
00169     // as a template. The image is loaded and Fourier transformed.
00170     
00171     virtual void initializeToVis(ImageInterface<Complex>& image,
00172                          const VisBuffer& vb);
00173     // This version returns the gridded vis...should be used in conjunction 
00174     // with the version of 'get' that needs the gridded visdata 
00175     virtual void initializeToVis(ImageInterface<Complex>& image,
00176                          const VisBuffer& vb, Array<Complex>& griddedVis,
00177                          Vector<Double>& uvscale);
00178     
00179     // Finalize transform to Visibility plane: flushes the image
00180     // cache and shows statistics if it is being used.
00181     virtual void finalizeToVis();
00182     
00183     // Initialize transform to Sky plane: initializes the image
00184     virtual void initializeToSky(ImageInterface<Complex>& image,  Matrix<Float>& weight,
00185                          const VisBuffer& vb);
00186     
00187     // Finalize transform to Sky plane: flushes the image
00188     // cache and shows statistics if it is being used. DOES NOT
00189     // DO THE FINAL TRANSFORM!
00190     virtual void finalizeToSky();
00191     
00192     virtual void initVisBuffer(VisBuffer& vb, Type whichVBColumn);
00193     void initVisBuffer(VisBuffer& vb, Type whichVBColumn, Int row);
00194 
00195     // Get actual coherence from grid by degridding
00196     void get(VisBuffer& vb, Int row=-1);
00197     
00198     // Get the coherence from grid return it in the degrid 
00199     // is used especially when scratch columns are not 
00200     // present in ms.
00201     void get(VisBuffer& vb, Cube<Complex>& degrid, 
00202              Array<Complex>& griddedVis, Vector<Double>& scale, 
00203              Int row=-1);
00204     
00205     void get(VisBuffer& vb, Cube<Float>& pointingOffsets, Int row=-1,
00206              Type whichVBColumn=FTMachine::MODEL,Int Conj=0)
00207     {
00208       get(vb,vb,vb,pointingOffsets,row,whichVBColumn,whichVBColumn,Conj,0);
00209     }
00210     
00211     void get(VisBuffer& vb, VisBuffer& gradAzVB,VisBuffer& gradElVB,
00212              Cube<Float>& pointingOffsets,Int row=-1,
00213              Type whichVBColumn=FTMachine::MODEL,
00214              Type whichGradVBColumn=FTMachine::MODEL,
00215              Int Conj=0, Int doGrad=1) ;
00216   void nget(VisBuffer& vb,
00217             // These offsets should be appropriate for the VB
00218             Array<Float>& l_off, Array<Float>& m_off,
00219             Cube<Complex>& Mout,
00220             Cube<Complex>& dMout1,
00221             Cube<Complex>& dMout2,
00222             Int Conj=0, Int doGrad=1);
00223     // Get the coherence from grid return it in the degrid 
00224     // is used especially when scratch columns are not 
00225     // present in ms.
00226     void get(VisBuffer& vb, Cube<Complex>& degrid, 
00227              Array<Complex>& griddedVis, Vector<Double>& scale, 
00228              Cube<Float>& pointingOffsets,Int row=-1);
00229     
00230     
00231     
00232     
00233     
00234     
00235     // Put coherence to grid by gridding.
00236     void put(const VisBuffer&,
00237              TempImage<Complex>&, Vector<Double>&, int,
00238              UVWMachine*, Bool) 
00239     {
00240       //    throw(AipsError("nPBWProjectFT::put is not implemented"));
00241     }
00242     void put(const VisBuffer& vb, Int row=-1, Bool dopsf=False,
00243              FTMachine::Type type=FTMachine::OBSERVED);
00244     
00245     // Make the entire image
00246     void makeImage(FTMachine::Type type,
00247                    VisSet& vs,
00248                    ImageInterface<Complex>& image,
00249                    Matrix<Float>& weight);
00250     
00251     // Get the final image: do the Fourier transform and
00252     // grid-correct, then optionally normalize by the summed weights
00253     virtual ImageInterface<Complex>& getImage(Matrix<Float>&, Bool normalize=True);
00254     virtual void normalizeImage(Lattice<Complex>& /*skyImage*/,
00255                               const Matrix<Double>& /*sumOfWts*/,
00256                               Lattice<Float>& /*sensitivityImage*/,
00257                               Bool /*fftNorm*/)
00258     {throw(AipsError("nPBWProjectFT::normalizeImage() called"));}
00259     
00260     // Get the final weights image
00261     void getWeightImage(ImageInterface<Float>&, Matrix<Float>&);
00262     
00263     // Save and restore the nPBWProjectFT to and from a record
00264     Bool toRecord(String& error, RecordInterface& outRec, 
00265                   Bool withImage=False);
00266     Bool fromRecord(String& error, const RecordInterface& inRec);
00267     
00268     // Can this FTMachine be represented by Fourier convolutions?
00269     Bool isFourier() {return True;}
00270     
00271     //  Bool changed(const VisBuffer& vb) {return vpSJ->changed(vb,1);};
00272     Bool changed(const VisBuffer& ) {return False;}
00273     
00274     virtual Int findPointingOffsets(const VisBuffer&, Array<Float>&, Array<Float>&,
00275                                     Bool Evaluate=True);
00276     virtual Int findPointingOffsets(const VisBuffer&, Cube<Float>&,
00277                             Array<Float>&, Array<Float>&,
00278                             Bool Evaluate=True);
00279     virtual Double getVBPA(const VisBuffer& vb) 
00280     {
00281       // if (!rotateAperture_p) return currentCFPA;
00282       // else return getPA(vb);
00283       return getPA(vb);
00284     };
00285     MDirection::Convert makeCoordinateMachine(const VisBuffer&,
00286                                               const MDirection::Types&,
00287                                               const MDirection::Types&,
00288                                               MEpoch& last);
00289     /*
00290       void makePB(const VisBuffer& vb,
00291       TempImage<Float>& PB,
00292       IPosition& shape,CoordinateSystem& coord);
00293       
00294       void makeAveragePB(const VisBuffer& vb, 
00295       const ImageInterface<Complex>& image,
00296       Int& polInUse,
00297       TempImage<Float>& PB,
00298       TempImage<Float>& avgPB);
00299     */
00300     //
00301     // Make a sensitivity image (sensitivityImage), given the gridded
00302     // weights (wtImage).  These are related to each other by a
00303     // Fourier transform and normalization by the sum-of-weights
00304     // (sumWt) and normalization by the product of the 2D FFT size
00305     // along each axis.  If doFFTNorm=False, normalization by the FFT
00306     // size is not done.  If sumWt is not provided, normalization by
00307     // the sum of weights is also not done.
00308     //
00309     virtual void makeSensitivityImage(Lattice<Complex>& wtImage,
00310                                       ImageInterface<Float>& sensitivityImage,
00311                                       const Matrix<Float>& sumWt=Matrix<Float>(),
00312                                       const Bool& doFFTNorm=True);
00313     virtual Bool makeAveragePB0(const VisBuffer& vb, 
00314                        const ImageInterface<Complex>& image,
00315                        Int& polInUse,
00316                        TempImage<Float>& avgPB);
00317     /*
00318     void makeAveragePB(const VisBuffer& vb, 
00319                        const ImageInterface<Complex>& image,
00320                        Int& polInUse,
00321                        TempImage<Float>& avgPB);
00322     */
00323     void makeConjPolMap(const VisBuffer& vb, const Vector<Int> cfPolMap, Vector<Int>& conjPolMap);
00324     //    Vector<Int> makeConjPolMap(const VisBuffer& vb);
00325     void makeCFPolMap(const VisBuffer& vb, Vector<Int>& polM);
00326     //    void reset() {vpSJ->reset();}
00327     void reset() {paChangeDetector.reset();}
00328 
00329     void setPAIncrement(const Quantity &paIncrement);
00330 
00331     Vector<Int>& getPolMap() {return polMap;};
00332     virtual String name() const { return "PBWProjectFT";};
00333     virtual Bool verifyAvgPB(ImageInterface<Float>& pb, ImageInterface<Float>& sky)
00334     {return verifyShapes(pb.shape(),sky.shape());}
00335     virtual Bool verifyAvgPB(ImageInterface<Float>& pb, ImageInterface<Complex>& sky)
00336     {return verifyShapes(pb.shape(),sky.shape());}
00337     virtual Bool verifyShapes(IPosition shape0, IPosition shape1);
00338     Bool findSupport(Array<Complex>& func, Float& threshold, Int& origin, Int& R);
00339     void makeAntiAliasingOp(Vector<Complex>& val, const Int len);
00340     void makeAntiAliasingCorrection(Vector<Complex>& correction, 
00341                                     const Vector<Complex>& op, 
00342                                     const Int nx);
00343     void applyAntiAliasingOp(ImageInterface<Complex>& cf, 
00344                              Vector<IPosition>& offset,
00345                              Int op=0, 
00346                              Bool Square=False);
00347     void applyAntiAliasingOp(ImageInterface<Float>& cf, 
00348                              Vector<IPosition>& offset,
00349                              Int op=0, 
00350                              Bool Square=False);
00351     void correctAntiAliasing(Lattice<Complex>& cf);
00352     virtual void setMiscInfo(const Int qualifier){(void)qualifier;};
00353     virtual void ComputeResiduals(VisBuffer&/*vb*/, Bool /*useCorrected*/) {};
00354 
00355   protected:
00356     
00357     // Padding in FFT
00358     Float padding_p;
00359     
00360     Int nint(Double val){return Int(floor(val+0.5));};
00361     
00362     // Make the PB part of the convolution function
00363     Int makePBPolnCoords(//const ImageInterface<Complex>& image,
00364                          CoordinateSystem& coord, const VisBuffer& vb);
00365     // Locate convolution functions on the disk
00366     Int locateConvFunction(Int Nw, Int polInUse, const VisBuffer& vb, Float &pa);
00367     void cacheConvFunction(Int which, Array<Complex>& cf, CoordinateSystem& coord);
00368     // Find the convolution function
00369     void findConvFunction(const ImageInterface<Complex>& image,
00370                           const VisBuffer& vb);
00371     void makeConvFunction(const ImageInterface<Complex>& image,
00372                           const VisBuffer& vb, Float pa);
00373     
00374     Int nWPlanes_p;
00375     
00376     // Get the appropriate data pointer
00377     Array<Complex>* getDataPointer(const IPosition&, Bool);
00378     
00379     void ok();
00380     
00381     void init();
00382     //    Int getVisParams();
00383     Int getVisParams(const VisBuffer& vb);
00384     // Is this record on Grid? check both ends. This assumes that the
00385     // ends bracket the middle
00386     Bool recordOnGrid(const VisBuffer& vb, Int rownr) const;
00387     
00388     // Image cache
00389     LatticeCache<Complex> * imageCache;
00390     
00391     // Sizes
00392     Long cachesize;
00393     Int tilesize;
00394     
00395     // Gridder
00396     ConvolveGridder<Double, Complex>* gridder;
00397     
00398     // Is this tiled?
00399     Bool isTiled;
00400     
00401     // Array lattice
00402     //Lattice<Complex> * arrayLattice;
00403     CountedPtr<Lattice<Complex> > arrayLattice;
00404     
00405     // Lattice. For non-tiled gridding, this will point to arrayLattice,
00406     //  whereas for tiled gridding, this points to the image
00407     //Lattice<Complex>* lattice;
00408     CountedPtr<Lattice<Complex> > lattice;
00409     
00410     Float maxAbsData;
00411     
00412     // Useful IPositions
00413     IPosition centerLoc, offsetLoc;
00414     
00415     // Image Scaling and offset
00416     Vector<Double> uvScale, uvOffset;
00417     
00418     // Array for non-tiled gridding
00419     Array<Complex> griddedData;
00420     
00421     // Pointing columns
00422     MSPointingColumns* mspc;
00423     
00424     // Antenna columns
00425     MSAntennaColumns* msac;
00426     
00427     DirectionCoordinate directionCoord;
00428     
00429     MDirection::Convert* pointingToImage;
00430     
00431     Vector<Double> xyPos;
00432     
00433     MDirection worldPosMeas;
00434     
00435     Int priorCacheSize;
00436     
00437     // Grid/degrid zero spacing points?
00438     Bool usezero_p;
00439     
00440     Array<Complex> convFunc;
00441     Array<Complex> convWeights;
00442     CoordinateSystem convFuncCS_p;
00443     Int convSize;
00444     //
00445     // Vector to hold the support size info. for the convolution
00446     // functions pointed to by the elements of convFunctions_p.  The
00447     // co-ordinates of this array are (W-term, Poln, PA).
00448     //
00449     Int convSampling;
00450     Cube<Int> convSupport, convWtSupport;
00451     //
00452     // Holder for the pointers to the convolution functions. Each
00453     // convolution function itself is a complex 3D array (U,V,W) per
00454     // PA.
00455     //
00456     PtrBlock < Array<Complex> *> convFuncCache, convWeightsCache;
00457     //    Array<Complex>* convFunc_p;
00458 
00459     //
00460     // The index into the conv. func. cache for the current conv. func.
00461     // 
00462     Int PAIndex;
00463     //
00464     // If true, all convolution functions are in the cache.
00465     //
00466     Bool convFuncCacheReady;
00467 
00468     Int wConvSize;
00469     
00470     Int lastIndex_p;
00471     
00472     Int getIndex(const ROMSPointingColumns& mspc, const Double& time,
00473                  const Double& interval);
00474     
00475     Bool getXYPos(const VisBuffer& vb, Int row);
00476     //    VPSkyJones *vpSJ;
00477     //
00478     // The PA averaged (and potentially antenna averaged) PB for
00479     // normalization
00480     //
00481     TempImage<Float> avgPB;
00482     //
00483     // No. of vis. polarization planes used in making the user defined
00484     // Stokes images
00485     //
00486     Int polInUse, bandID_p;
00487     Int maxConvSupport;
00488     //
00489     // Percentage of the peak of the PB after which the image is set
00490     // to zero.
00491     //
00492     Float pbLimit_p;
00493 
00494     //    EPJones *epJ;
00495     SolvableVisJones *epJ;
00496     Double HPBW, Diameter_p, sigma;
00497     Int Nant_p;
00498     Int doPointing;
00499     Bool doPBCorrection;
00500     Bool makingPSF;
00501     
00502     Unit Second, Radian, Day;
00503     Array<Float> l_offsets,m_offsets;
00504     Int noOfPASteps;
00505     Vector<Float> pbPeaks;
00506     Bool pbNormalized,resetPBs,rotateAperture_p;
00507     Vector<Float> paList;
00508     ConvFuncDiskCache cfCache;
00509     Double currentCFPA;
00510     ParAngleChangeDetector paChangeDetector;
00511     Vector<Int> cfStokes;
00512     Vector<Complex> Area;
00513     Double cfRefFreq_p;
00514     Bool avgPBSaved;
00515     Bool avgPBReady;
00516     Vector<Complex> antiAliasingOp,antiAliasingCorrection;
00517     Float lastPAUsedForWtImg;
00518     //    VLACalcIlluminationConvFunc vlaPB;
00519     //
00520     //----------------------------------------------------------------------
00521     //
00522     virtual void normalizeAvgPB();
00523     virtual void runFortranGet(Matrix<Double>& uvw,Vector<Double>& dphase,
00524                        Cube<Complex>& visdata,
00525                        IPosition& s,
00526                        //Cube<Complex>& gradVisAzData,
00527                        //Cube<Complex>& gradVisElData,
00528                        //IPosition& gradS,
00529                        Int& Conj,
00530                        Cube<Int>& flags,Vector<Int>& rowFlags,
00531                        Int& rownr,Vector<Double>& actualOffset,
00532                        Array<Complex>* dataPtr,
00533                        Int& aNx, Int& aNy, Int& npol, Int& nchan,
00534                        VisBuffer& vb,Int& Nant_p, Int& scanNo,
00535                        Double& sigma,
00536                        Array<Float>& raoffsets,
00537                        Array<Float>& decoffsets,
00538                        Double area,
00539                        Int& doGrad,Int paIndex);
00540     virtual void runFortranPut(Matrix<Double>& uvw,Vector<Double>& dphase,
00541                        const Complex& visdata_p,
00542                        IPosition& s,
00543                        //Cube<Complex>& gradVisAzData,
00544                        //Cube<Complex>& gradVisElData,
00545                        //IPosition& gradS,
00546                        Int& Conj,
00547                        Cube<Int>& flags,Vector<Int>& rowFlags,
00548                        const Matrix<Float>& weight,
00549                        Int& rownr,Vector<Double>& actualOffset,
00550                        Array<Complex>& dataPtr,
00551                        Int& aNx, Int& aNy, Int& npol, Int& nchan,
00552                        const VisBuffer& vb,Int& Nant_p, Int& scanNo,
00553                        Double& sigma,
00554                        Array<Float>& raoffsets,
00555                        Array<Float>& decoffsets,
00556                        Matrix<Double>& sumWeight,
00557                        Double& area,
00558                        Int& doGrad,
00559                        Int& doPSF,Int paIndex);
00560   void runFortranGetGrad(Matrix<Double>& uvw,Vector<Double>& dphase,
00561                          Cube<Complex>& visdata,
00562                          IPosition& s,
00563                          Cube<Complex>& gradVisAzData,
00564                          Cube<Complex>& gradVisElData,
00565                          //                      IPosition& gradS,
00566                          Int& Conj,
00567                          Cube<Int>& flags,Vector<Int>& rowFlags,
00568                          Int& rownr,Vector<Double>& actualOffset,
00569                          Array<Complex>* dataPtr,
00570                          Int& aNx, Int& aNy, Int& npol, Int& nchan,
00571                          VisBuffer& vb,Int& Nant_p, Int& scanNo,
00572                          Double& sigma,
00573                          Array<Float>& l_off,
00574                          Array<Float>& m_off,
00575                          Double area,
00576                          Int& doGrad,
00577                          Int paIndex);
00578   };
00579   
00580   //void saveImmage(TempImage<Complex>& convFunc, Int wConvSize);
00581 } //# NAMESPACE CASA - END
00582 
00583 #endif