casa
$Rev:20696$
|
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_PBMOSAICFT_H 00030 #define SYNTHESIS_PBMOSAICFT_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 <images/Images/ImageInterface.h> 00038 // #include <casa/Containers/Block.h> 00039 // #include <casa/Arrays/Array.h> 00040 // #include <casa/Arrays/Vector.h> 00041 // #include <casa/Arrays/Matrix.h> 00042 // #include <scimath/Mathematics/ConvolveGridder.h> 00043 #include <synthesis/MeasurementComponents/nPBWProjectFT.h> 00044 00045 namespace casa { //# NAMESPACE CASA - BEGIN 00046 00047 class EPJones; 00048 // class nPBWProjectFT; 00049 class PBMosaicFT : public nPBWProjectFT { 00050 00051 public: 00052 // Constructor: cachesize is the size of the cache in words 00053 // (e.g. a few million is a good number), tilesize is the 00054 // size of the tile used in gridding (cannot be less than 00055 // 12, 16 works in most cases). 00056 // <group> 00057 PBMosaicFT(MeasurementSet& ms, 00058 Int nFacets, Long cachesize, String& cfCacheDirName, 00059 Bool applyPointingOffset=True, 00060 Bool doPBCorr=True, 00061 Int tilesize=16, 00062 Float paSteps=5.0, Float pbLimit=5e-2, 00063 Bool usezero=False); 00064 // </group> 00065 00066 // Construct from a Record containing the PBMosaicFT state 00067 PBMosaicFT(const RecordInterface& stateRec); 00068 00069 // Copy constructor 00070 // PBMosaicFT(const PBMosaicFT &other); 00071 00072 // Assignment operator 00073 PBMosaicFT &operator=(const PBMosaicFT &othher); 00074 00075 ~PBMosaicFT() {}; 00076 00077 Bool makeAveragePB0(const VisBuffer& vb, 00078 const ImageInterface<Complex>& image, 00079 Int& polInUse, 00080 TempImage<Float>& avgPB); 00081 Int findPointingOffsets(const VisBuffer& vb, 00082 Array<Float> &l_off, 00083 Array<Float> &m_off, 00084 Bool Evaluate); 00085 void normalizeAvgPB(); 00086 void normalizePB(ImageInterface<Float> &pb,const Float& nSamp=1); 00087 virtual ImageInterface<Complex>& getImage(Matrix<Float>&, Bool normalize=True); 00088 inline virtual Float pbFunc(Float& a) {return (a);}; 00089 void setObservatoryLocation(const MPosition& mLocation) {mLocation_p=mLocation;}; 00090 virtual void finalizeToSky(); 00091 virtual void initializeToSky(ImageInterface<Complex>& image, Matrix<Float>& weight, 00092 const VisBuffer& vb); 00093 virtual String name() {return "PBMosaicFT";}; 00094 virtual Bool verifyShapes(IPosition , IPosition ) 00095 {return True;}; 00096 00097 private: 00098 Complex nApertures; 00099 Vector<Int> fieldIds_p; 00100 TempImage<Complex> griddedWeights; 00101 Float pbNorm; 00102 virtual void runFortranGet(Matrix<Double>& uvw,Vector<Double>& dphase, 00103 Cube<Complex>& visdata, 00104 IPosition& s, 00105 //Cube<Complex>& gradVisAzData, 00106 //Cube<Complex>& gradVisElData, 00107 //IPosition& gradS, 00108 Int& Conj, 00109 Cube<Int>& flags,Vector<Int>& rowFlags, 00110 Int& rownr,Vector<Double>& actualOffset, 00111 Array<Complex>* dataPtr, 00112 Int& aNx, Int& aNy, Int& npol, Int& nchan, 00113 VisBuffer& vb,Int& Nant_p, Int& scanNo, 00114 Double& sigma, 00115 Array<Float>& raoffsets, 00116 Array<Float>& decoffsets, 00117 Double area, 00118 Int& doGrad,Int paIndex); 00119 virtual void runFortranPut(Matrix<Double>& uvw,Vector<Double>& dphase, 00120 const Complex& visdata_p, 00121 IPosition& s, 00122 //Cube<Complex>& gradVisAzData, 00123 //Cube<Complex>& gradVisElData, 00124 //IPosition& gradS, 00125 Int& Conj, 00126 Cube<Int>& flags,Vector<Int>& rowFlags, 00127 const Matrix<Float>& weight, 00128 Int& rownr,Vector<Double>& actualOffset, 00129 Array<Complex>& dataPtr, 00130 Int& aNx, Int& aNy, Int& npol, Int& nchan, 00131 const VisBuffer& vb,Int& Nant_p, Int& scanNo, 00132 Double& sigma, 00133 Array<Float>& raoffsets, 00134 Array<Float>& decoffsets, 00135 Matrix<Double>& sumWeight, 00136 Double& area, 00137 Int& doGrad, 00138 Int& doPSF,Int paIndex); 00139 virtual void runFortranGetGrad(Matrix<Double>& uvw,Vector<Double>& dphase, 00140 Cube<Complex>& visdata, 00141 IPosition& s, 00142 Cube<Complex>& gradVisAzData, 00143 Cube<Complex>& gradVisElData, 00144 // IPosition& gradS, 00145 Int& Conj, 00146 Cube<Int>& flags,Vector<Int>& rowFlags, 00147 Int& rownr,Vector<Double>& actualOffset, 00148 Array<Complex>* dataPtr, 00149 Int& aNx, Int& aNy, Int& npol, Int& nchan, 00150 VisBuffer& vb,Int& Nant_p, Int& scanNo, 00151 Double& sigma, 00152 Array<Float>& l_off, 00153 Array<Float>& m_off, 00154 Double area, 00155 Int& doGrad, 00156 Int paIndex); 00157 00158 }; 00159 00160 } //# NAMESPACE CASA - END 00161 00162 #endif