LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - ALMACalcIlluminationConvFunc.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 4 0.0 %
Date: 2024-10-10 19:51:30 Functions: 0 4 0.0 %

          Line data    Source code
       1             : //# ALMAIlluminationConvFunc.h: Definition for ALMAIlluminationConvFunc
       2             : //# Copyright (C) 1996,1997,1998,1999,2000,2002
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //# Copyright by ESO (in the framework of the ALMA collaboration)
       5             : //#
       6             : //# This library is free software; you can redistribute it and/or modify it
       7             : //# under the terms of the GNU Library General Public License as published by
       8             : //# the Free Software Foundation; either version 2 of the License, or (at your
       9             : //# option) any later version.
      10             : //#
      11             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      12             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      13             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      14             : //# License for more details.
      15             : //#
      16             : //# You should have received a copy of the GNU Library General Public License
      17             : //# along with this library; if not, write to the Free Software Foundation,
      18             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      19             : //#
      20             : //# Correspondence concerning AIPS++ should be adressed as follows:
      21             : //#        Internet email: casa-feedback@nrao.edu.
      22             : //#        Postal address: AIPS++ Project Office
      23             : //#                        National Radio Astronomy Observatory
      24             : //#                        520 Edgemont Road
      25             : //#                        Charlottesville, VA 22903-2475 USA
      26             : //#
      27             : //#
      28             : //# $Id$
      29             : 
      30             : #ifndef SYNTHESIS_ALMACALCILLUMINATIONCONVFUNC_H
      31             : #define SYNTHESIS_ALMACALCILLUMINATIONCONVFUNC_H
      32             : 
      33             : #include <synthesis/TransformMachines/IlluminationConvFunc.h>
      34             : #include <synthesis/TransformMachines/BeamCalc.h>
      35             : #include <synthesis/TransformMachines/ALMAAperture.h>
      36             : #include <synthesis/MeasurementComponents/CExp.new3.h>
      37             : #include <synthesis/MeasurementComponents/ExpCache.h>
      38             : #include <casacore/images/Images/TempImage.h>
      39             : #include <casacore/casa/Exceptions.h>
      40             : #include <msvis/MSVis/VisBuffer.h>
      41             : #include <sstream>
      42             : #include <synthesis/TransformMachines/Utils.h>
      43             : namespace casa{
      44             : 
      45             :   class ALMACalcIlluminationConvFunc: public IlluminationConvFunc
      46             :   {
      47             :   public:
      48             : 
      49             :     ALMACalcIlluminationConvFunc();
      50             :     ALMACalcIlluminationConvFunc(casacore::Int n):IlluminationConvFunc(n)
      51             :       {pbRead_p=false;};
      52           0 :     ~ALMACalcIlluminationConvFunc() 
      53           0 :       {delete ap.aperture;};
      54             : 
      55             :     void setBandID(casacore::Int /*bandID*/) {/*ap.band=(ALMABeamCalcBandCode)bandID;*/}
      56             : 
      57           0 :     void setAntRayPath(const casacore::String& antRayPath) {otherAntRayPath_p = antRayPath;}
      58             : 
      59             :     void loadFromImage(casacore::String &fileName);
      60             :     void getIdealConvFunc(casacore::Array<casacore::Complex>& buf);
      61             :     void ftAperture(casacore::ImageInterface<casacore::Complex>& uvgrid);
      62             :     void ftAperture() {ftAperture(convFunc_p); pbRead_p=true;};
      63             :     void storePB(casacore::String& fileName);
      64             : 
      65             :     casacore::Bool pbReady() {return pbRead_p;}
      66             : 
      67             :     casacore::CoordinateSystem makeUVCoords(casacore::CoordinateSystem& imageCoordSys,
      68             :                                   casacore::IPosition& shape, casacore::Double refFreq=-1.0);
      69             :     void regridAperture(casacore::CoordinateSystem& skyCS, 
      70             :                         casacore::IPosition& skyShape, 
      71             :                         casacore::TempImage<casacore::Complex>& uvGrid, 
      72             :                         const VisBuffer& vb,
      73             :                         casacore::Bool doSquint=true,casacore::Int bandID=-1);
      74             :     void regridAperture(casacore::CoordinateSystem& skyCS,
      75             :                         casacore::IPosition& skyShape,
      76             :                         casacore::TempImage<casacore::Complex>& uvGrid,
      77             :                         const VisBuffer &vb,
      78             :                         const casacore::Vector<casacore::Float>& paList,
      79             :                         casacore::Bool doSquint, casacore::Int bandID);
      80             : 
      81             :     void regridAperture(casacore::CoordinateSystem& skyCS, 
      82             :                         casacore::IPosition& skyShape, 
      83             :                         casacore::TempImage<casacore::Complex>& uvGrid, 
      84             :                         const casacore::String& telescope,
      85             :                         const casacore::MVFrequency& freqQ,
      86             :                         casacore::Float pa = 0.,
      87             :                         casacore::Bool doSquint=true,
      88             :                         casacore::Int bandID=-1);
      89             : 
      90             :     void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, 
      91             :                  const VisBuffer& vb, casacore::Bool doSquint=false, casacore::Int cfKey=0);
      92             : 
      93             :     void applyPB(casacore::ImageInterface<casacore::Complex>& pbImage, 
      94             :                  const VisBuffer& vb, casacore::Bool doSquint=true, casacore::Int cfKey=0);
      95             : 
      96             :     void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, 
      97             :                  const casacore::String& telescope, const casacore::MEpoch& obsTime, 
      98             :                  const casacore::String& antType0, const casacore::String& antType1,
      99             :                  const casacore::MVFrequency& freqQ, casacore::Double pa=0.,
     100             :                  casacore::Bool doSquint=false);
     101             : 
     102             :     void applyPB(casacore::ImageInterface<casacore::Complex>& pbImage, 
     103             :                  const casacore::String& telescope, const casacore::MEpoch& obsTime,
     104             :                  const casacore::String& antType0, const casacore::String& antType1,
     105             :                  const casacore::MVFrequency& freqQ, casacore::Double pa=0.,
     106             :                  casacore::Bool doSquint=true);
     107             : 
     108             :     void applyVP(casacore::ImageInterface<casacore::Complex>& pbImage, 
     109             :                  const casacore::String& telescope, const casacore::MEpoch& obsTime,
     110             :                  const casacore::String& antType0, const casacore::String& antType1,
     111             :                  const casacore::MVFrequency& freqQ, casacore::Double pa=0.,
     112             :                  casacore::Bool doSquint=true);
     113             : 
     114             :     void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones);
     115             : 
     116             :     //    casacore::Int getALMABandId(const casacore::Double& freq);
     117           0 :     virtual void prepareConvFunction(const VisBuffer& /*vb*/, CFStore& /*cfs*/){};
     118             : 
     119             :     
     120             : 
     121             :   private:
     122             :     
     123             :     void fillPB(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Float>& outImg, casacore::Bool Square=false);
     124             :     void fillPB(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Complex>& outImg, casacore::Bool Square=false);
     125             :     void fillVP(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Complex>& outImg, casacore::Bool Square=false);
     126             : 
     127             :     casacore::TempImage<casacore::Complex> convFunc_p;
     128             :     casacore::Vector<casacore::Double> resolution;
     129             :     casacore::Bool pbRead_p;
     130             :     casacore::Float freq_p,lastPA;
     131             :     ApertureCalcParams ap;
     132             : 
     133             :     casacore::Bool haveCannedResponses;
     134             : 
     135             :     casacore::String otherAntRayPath_p;
     136             :   };
     137             : 
     138             : };
     139             : #endif

Generated by: LCOV version 1.16