//# nPBWProjectFT.h: Definition for nPBWProjectFT //# Copyright (C) 1996,1997,1998,1999,2000,2002 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 of the License, or (at your //# option) any later version. //# //# This library is distributed in the hope that it will be useful, but WITHOUT //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be adressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# //# $Id$ #ifndef SYNTHESIS_PBMOSAICFT_H #define SYNTHESIS_PBMOSAICFT_H // #include // #include // #include // #include // #include // #include // #include // #include // #include // #include // #include #include namespace casa { //# NAMESPACE CASA - BEGIN class EPJones; // class nPBWProjectFT; class PBMosaicFT : public nPBWProjectFT { public: // Constructor: cachesize is the size of the cache in words // (e.g. a few million is a good number), tilesize is the // size of the tile used in gridding (cannot be less than // 12, 16 works in most cases). // PBMosaicFT(casacore::MeasurementSet& ms, casacore::Int nFacets, casacore::Long cachesize, casacore::String& cfCacheDirName, casacore::Bool applyPointingOffset=true, casacore::Bool doPBCorr=true, casacore::Int tilesize=16, casacore::Float paSteps=5.0, casacore::Float pbLimit=5e-2, casacore::Bool usezero=false); // // Construct from a casacore::Record containing the PBMosaicFT state PBMosaicFT(const casacore::RecordInterface& stateRec); // Copy constructor // PBMosaicFT(const PBMosaicFT &other); // Assignment operator PBMosaicFT &operator=(const PBMosaicFT &othher); ~PBMosaicFT() {}; casacore::Bool makeAveragePB0(const VisBuffer& vb, const casacore::ImageInterface& image, casacore::Int& polInUse, casacore::TempImage& avgPB); casacore::Int findPointingOffsets(const VisBuffer& vb, casacore::Array &l_off, casacore::Array &m_off, casacore::Bool Evaluate); void normalizeAvgPB(); void normalizePB(casacore::ImageInterface &pb,const casacore::Float& nSamp=1); virtual casacore::ImageInterface& getImage(casacore::Matrix&, casacore::Bool normalize=true); inline virtual casacore::Float pbFunc(casacore::Float& a) {return (a);}; void setObservatoryLocation(const casacore::MPosition& mLocation) {mLocation_p=mLocation;}; virtual void finalizeToSky(); virtual void initializeToSky(casacore::ImageInterface& image, casacore::Matrix& weight, const VisBuffer& vb); virtual casacore::String name() {return "PBMosaicFT";}; virtual casacore::Bool verifyShapes(casacore::IPosition , casacore::IPosition ) {return true;}; private: casacore::Complex nApertures; casacore::Vector fieldIds_p; casacore::TempImage griddedWeights; //casacore::Float pbNorm; virtual void runFortranGet(casacore::Matrix& uvw,casacore::Vector& dphase, casacore::Cube& visdata, casacore::IPosition& s, //casacore::Cube& gradVisAzData, //casacore::Cube& gradVisElData, //casacore::IPosition& gradS, casacore::Int& Conj, casacore::Cube& flags,casacore::Vector& rowFlags, casacore::Int& rownr,casacore::Vector& actualOffset, casacore::Array* dataPtr, casacore::Int& aNx, casacore::Int& aNy, casacore::Int& npol, casacore::Int& nchan, VisBuffer& vb,casacore::Int& Nant_p, casacore::Int& scanNo, casacore::Double& sigma, casacore::Array& raoffsets, casacore::Array& decoffsets, casacore::Double area, casacore::Int& doGrad,casacore::Int paIndex); virtual void runFortranPut(casacore::Matrix& uvw,casacore::Vector& dphase, const casacore::Complex& visdata_p, casacore::IPosition& s, //casacore::Cube& gradVisAzData, //casacore::Cube& gradVisElData, //casacore::IPosition& gradS, casacore::Int& Conj, casacore::Cube& flags,casacore::Vector& rowFlags, const casacore::Matrix& weight, casacore::Int& rownr,casacore::Vector& actualOffset, casacore::Array& dataPtr, casacore::Int& aNx, casacore::Int& aNy, casacore::Int& npol, casacore::Int& nchan, const VisBuffer& vb,casacore::Int& Nant_p, casacore::Int& scanNo, casacore::Double& sigma, casacore::Array& raoffsets, casacore::Array& decoffsets, casacore::Matrix& sumWeight, casacore::Double& area, casacore::Int& doGrad, casacore::Int& doPSF,casacore::Int paIndex); virtual void runFortranGetGrad(casacore::Matrix& uvw,casacore::Vector& dphase, casacore::Cube& visdata, casacore::IPosition& s, casacore::Cube& gradVisAzData, casacore::Cube& gradVisElData, // casacore::IPosition& gradS, casacore::Int& Conj, casacore::Cube& flags,casacore::Vector& rowFlags, casacore::Int& rownr,casacore::Vector& actualOffset, casacore::Array* dataPtr, casacore::Int& aNx, casacore::Int& aNy, casacore::Int& npol, casacore::Int& nchan, VisBuffer& vb,casacore::Int& Nant_p, casacore::Int& scanNo, casacore::Double& sigma, casacore::Array& l_off, casacore::Array& m_off, casacore::Double area, casacore::Int& doGrad, casacore::Int paIndex); }; } //# NAMESPACE CASA - END #endif