LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - VLACalcIlluminationConvFunc.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 5 0.0 %
Date: 2024-12-11 20:54:31 Functions: 0 4 0.0 %

          Line data    Source code
       1             : //# VLAIlluminationConvFunc.h: Definition for VLAIlluminationConvFunc
       2             : //# Copyright (C) 1996,1997,1998,1999,2000,2002
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be adressed as follows:
      20             : //#        Internet email: casa-feedback@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //#
      27             : //# $Id$
      28             : 
      29             : #ifndef SYNTHESIS_VLACALCILLUMINATIONCONVFUNC_H
      30             : #define SYNTHESIS_VLACALCILLUMINATIONCONVFUNC_H
      31             : 
      32             : #include <synthesis/TransformMachines/IlluminationConvFunc.h>
      33             : //#include <synthesis/MeasurementComponents/BeamCalcConstants.h>
      34             : #include <synthesis/TransformMachines/BeamCalc.h>
      35             : //#include <synthesis/MeasurementComponents/BeamCalcAntenna.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             :   //  casacore::Int getVLABandID(casacore::Double& freq,casacore::String&telescopeName);
      46             :   class VLACalcIlluminationConvFunc: public IlluminationConvFunc
      47             :   {
      48             :   public:
      49             : 
      50             :     VLACalcIlluminationConvFunc();
      51             :     VLACalcIlluminationConvFunc(casacore::Int n):
      52             :       IlluminationConvFunc(n),
      53             :       convFunc_p(),resolution(),pbRead_p(false),freq_p(0),lastPA(0),ap()
      54             :     {pbRead_p=false;};
      55           0 :     ~VLACalcIlluminationConvFunc() {delete ap.aperture;};
      56             : 
      57             :     void setBandID(casacore::Int bandID) {ap.band=bandID;}
      58             :     // void storeImg(casacore::String &fileName,casacore::ImageInterface<casacore::Complex>& img);
      59             :     // void storeImg(casacore::String &fileName,casacore::ImageInterface<casacore::Float>& img);
      60             :     // void store(casacore::String &fileName);
      61             :     void loadFromImage(casacore::String &fileName);
      62             :     void getIdealConvFunc(casacore::Array<casacore::Complex>& buf);
      63             :     //void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid);
      64             :     void ftAperture(casacore::ImageInterface<casacore::Complex>& uvgrid, casacore::Bool makeMueller);
      65             :     void ftAperture(casacore::ImageInterface<casacore::Complex>& uvgrid, casacore::Int makeMuerller=0);
      66             :     void ftAperture() {ftAperture(convFunc_p); pbRead_p=true;};
      67             :     void storePB(casacore::String& fileName);
      68             : 
      69             :     casacore::Bool pbReady() {return pbRead_p;}
      70             : 
      71             :     casacore::CoordinateSystem makeUVCoords(casacore::CoordinateSystem& imageCoordSys,
      72             :                                   casacore::IPosition& shape, casacore::Double refFreq=-1.0);
      73             :     void regridAperture(casacore::CoordinateSystem& skyCS, 
      74             :                         casacore::IPosition& skyShape, 
      75             :                         casacore::TempImage<casacore::Complex>& uvGrid, 
      76             :                         //const VisBuffer& vb,
      77             :                         casacore::Double& pa,
      78             :                         casacore::Bool doSquint=true,casacore::Int bandID=-1,casacore::Int muellerTerm=0 ,casacore::Double freqVal=-1.0);
      79             :     void regridAperture(casacore::CoordinateSystem& skyCS,
      80             :                         casacore::IPosition& skyShape,
      81             :                         casacore::TempImage<casacore::Complex>& uvGrid,
      82             :                         const VisBuffer &vb,
      83             :                         const casacore::Vector<casacore::Float>& paList,
      84             :                         casacore::Bool doSquint, casacore::Int bandID);
      85             :     void regridApertureEngine(ApertureCalcParams& ap,
      86             :                               const casacore::Int& inStokes);
      87             :     void setApertureParams(ApertureCalcParams& ap,
      88             :                            const casacore::Float& Freq, const casacore::Float& pa, 
      89             :                            const casacore::Int& bandID,
      90             :                            const casacore::Int& inStokes,
      91             :                            const casacore::IPosition& skyShape,
      92             :                            const casacore::Vector<casacore::Double>& uvIncr);
      93             : 
      94             : 
      95             :     void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer& vb, 
      96             :                  const casacore::Vector<casacore::Float>& paList, casacore::Int bandID, casacore::Bool doSquint=false);
      97             :     void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer& vb, 
      98             :                  casacore::Int bandID=-1, casacore::Bool doSquint=false, casacore::Double freqVal=-1.0);
      99             :     void applyPB(casacore::ImageInterface<casacore::Complex>& pbImage, casacore::Double& pa,//const VisBuffer& vb, 
     100             :                  casacore::Bool doSquint=true,casacore::Int bandID=-1, casacore::Int muellerTerm=0, casacore::Double freqVal=-1.0);
     101             :     void applyPBSq(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer& vb, 
     102             :                    const casacore::Vector<casacore::Float>& paList, casacore::Int bandID, casacore::Bool doSquint=false);
     103             :     void applyPBSq(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer& vb, 
     104             :                    casacore::Int bandID=-1, casacore::Bool doSquint=false);
     105             :     void applyPBSq(casacore::ImageInterface<casacore::Complex>& pbImage, casacore::Double& pa,//const VisBuffer& vb, 
     106             :                    casacore::Int bandID=-1,  casacore::Bool doSquint=true);
     107             :     void makeFullJones(casacore::ImageInterface<casacore::Complex>& pbImage, const VisBuffer& vb, casacore::Bool doSquint, 
     108             :                casacore::Int bandID, casacore::Double freqVal=-1.0);
     109             :     void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones);
     110             :     void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones, casacore::Int muellerTerm=0);
     111             :     void skyMuller(casacore::Array<casacore::Complex>& skyJones, const casacore::IPosition& shape, const casacore::Int& inStokes);
     112             : 
     113           0 :     casacore::Bool findSupport(casacore::Array<casacore::Complex>& /*func*/, casacore::Float& /*threshold*/,casacore::Int& /*origin*/, casacore::Int& /*R*/)
     114           0 :     {throw(casacore::AipsError("VLACalcIlluminationConvFunc::findSupport() not implemented"));};
     115           0 :     virtual casacore::Bool makeAverageResponse(const VisBuffer& /*vb*/,
     116             :                                      const casacore::ImageInterface<casacore::Complex>& /*image*/,
     117             :                                      //                              casacore::TempImage<casacore::Float>& theavgPB,
     118             :                                      casacore::ImageInterface<casacore::Float>& /*theavgPB*/,
     119             :                                      casacore::Bool /*reset*/=true)
     120           0 :     {throw(casacore::AipsError("VLACalc::makeAverageRes() called"));};
     121             : 
     122             : 
     123             :   private:
     124             :     
     125             :     void fillPB(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Float>& outImg, casacore::Bool Square=false);
     126             :     void fillPB(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Complex>& outImg, casacore::Bool Square=false);
     127             : 
     128             :     casacore::TempImage<casacore::Complex> convFunc_p;
     129             :     //    casacore::TempImage<casacore::Float> reAperture_p, imAperture_p;
     130             :     casacore::Vector<casacore::Double> resolution;
     131             :     casacore::Bool pbRead_p;
     132             :     casacore::Float freq_p,lastPA;
     133             :     ApertureCalcParams ap;
     134             :   };
     135             : 
     136             : };
     137             : #endif

Generated by: LCOV version 1.16