LCOV - code coverage report
Current view: top level - synthesis/TransformMachines2 - VLACalcIlluminationConvFunc.h (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 1 5 20.0 %
Date: 2023-11-06 10:06:49 Functions: 1 4 25.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: aips2-request@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_TRANSFORM2_VLACALCILLUMINATIONCONVFUNC_H
      30             : #define SYNTHESIS_TRANSFORM2_VLACALCILLUMINATIONCONVFUNC_H
      31             : 
      32             : #include <synthesis/TransformMachines2/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/VisBuffer2.h>
      41             : #include <sstream>
      42             : #include <synthesis/TransformMachines2/Utils.h>
      43             : namespace casa{
      44             :   namespace refim{
      45             :     using namespace vi;
      46             :   //  casacore::Int getVLABandID(casacore::Double& freq,casacore::String&telescopeName);
      47             :   class VLACalcIlluminationConvFunc: public IlluminationConvFunc
      48             :   {
      49             :   public:
      50             : 
      51             :     VLACalcIlluminationConvFunc();
      52             :     VLACalcIlluminationConvFunc(casacore::Int n):
      53             :       IlluminationConvFunc(n),
      54             :       convFunc_p(),resolution(),pbRead_p(false),freq_p(0),lastPA(0),ap()
      55             :     {pbRead_p=false;};
      56         136 :     ~VLACalcIlluminationConvFunc() {delete ap.aperture;};
      57             : 
      58             :     void setBandID(casacore::Int bandID) {ap.band=bandID;}
      59             :     // void storeImg(casacore::String &fileName,casacore::ImageInterface<casacore::Complex>& img);
      60             :     // void storeImg(casacore::String &fileName,casacore::ImageInterface<casacore::Float>& img);
      61             :     // void store(casacore::String &fileName);
      62             :     void loadFromImage(casacore::String &fileName);
      63             :     void getIdealConvFunc(casacore::Array<casacore::Complex>& buf);
      64             :     //void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid);
      65             :     void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid, casacore::Bool makeMueller);
      66             :     void ftAperture(casacore::TempImage<casacore::Complex>& uvgrid, casacore::Int makeMuerller=0);
      67             :     void ftAperture() {ftAperture(convFunc_p); pbRead_p=true;};
      68             :     void storePB(casacore::String& fileName);
      69             : 
      70             :     casacore::Bool pbReady() {return pbRead_p;}
      71             : 
      72             :     casacore::CoordinateSystem makeUVCoords(casacore::CoordinateSystem& imageCoordSys,
      73             :                                   casacore::IPosition& shape, casacore::Double refFreq=-1.0);
      74             :     void regridAperture(casacore::CoordinateSystem& skyCS, 
      75             :                         casacore::IPosition& skyShape, 
      76             :                         casacore::TempImage<casacore::Complex>& uvGrid, 
      77             :                         //const VisBuffer2& vb,
      78             :                         casacore::Double& pa,
      79             :                         casacore::Bool doSquint=true,casacore::Int bandID=-1,casacore::Int muellerTerm=0 ,casacore::Double freqVal=-1.0);
      80             :     void regridAperture(casacore::CoordinateSystem& skyCS,
      81             :                         casacore::IPosition& skyShape,
      82             :                         casacore::TempImage<casacore::Complex>& uvGrid,
      83             :                         const VisBuffer2 &vb,
      84             :                         const casacore::Vector<casacore::Float>& paList,
      85             :                         casacore::Bool doSquint, casacore::Int bandID);
      86             :     void regridApertureEngine(ApertureCalcParams& ap,
      87             :                               const casacore::Int& inStokes);
      88             :     void setApertureParams(ApertureCalcParams& ap,
      89             :                            const casacore::Float& Freq, const casacore::Float& pa, 
      90             :                            const casacore::Int& bandID,
      91             :                            const casacore::Int& inStokes,
      92             :                            const casacore::IPosition& skyShape,
      93             :                            const casacore::Vector<casacore::Double>& uvIncr);
      94             : 
      95             : 
      96             :     void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb, 
      97             :                  const casacore::Vector<casacore::Float>& paList, casacore::Int bandID, casacore::Bool doSquint=false);
      98             :     void applyPB(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb, 
      99             :                  casacore::Int bandID=-1, casacore::Bool doSquint=false, casacore::Double freqVal=-1.0);
     100             :     void applyPB(casacore::ImageInterface<casacore::Complex>& pbImage, casacore::Double& pa,//const VisBuffer2& vb, 
     101             :                  casacore::Bool doSquint=true,casacore::Int bandID=-1, casacore::Int muellerTerm=0, casacore::Double freqVal=-1.0);
     102             :     void applyPBSq(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb, 
     103             :                    const casacore::Vector<casacore::Float>& paList, casacore::Int bandID, casacore::Bool doSquint=false);
     104             :     void applyPBSq(casacore::ImageInterface<casacore::Float>& pbImage, casacore::Double& pa,//const VisBuffer2& vb, 
     105             :                    casacore::Int bandID=-1, casacore::Bool doSquint=false);
     106             :     void applyPBSq(casacore::ImageInterface<casacore::Complex>& pbImage, casacore::Double& pa,//const VisBuffer2& vb, 
     107             :                    casacore::Int bandID=-1,  casacore::Bool doSquint=true);
     108             :     void makeFullJones(casacore::ImageInterface<casacore::Complex>& pbImage, const VisBuffer2& vb, casacore::Bool doSquint, 
     109             :                casacore::Int bandID, casacore::Double freqVal=-1.0);
     110             :     void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones);
     111             :     void skyMuller(casacore::ImageInterface<casacore::Complex>& skyJones, casacore::Int muellerTerm=0);
     112             :     void skyMuller(casacore::Array<casacore::Complex>& skyJones, const casacore::IPosition& shape, const casacore::Int& inStokes);
     113             : 
     114           0 :     casacore::Bool findSupport(casacore::Array<casacore::Complex>& /*func*/, casacore::Float& /*threshold*/,casacore::Int& /*origin*/, casacore::Int& /*R*/)
     115           0 :     {throw(casacore::AipsError("VLACalcIlluminationConvFunc::findSupport() not implemented"));};
     116           0 :     virtual casacore::Bool makeAverageResponse(const VisBuffer2& /*vb*/,
     117             :                                      const casacore::ImageInterface<casacore::Complex>& /*image*/,
     118             :                                      //                              casacore::TempImage<casacore::Float>& theavgPB,
     119             :                                      casacore::ImageInterface<casacore::Float>& /*theavgPB*/,
     120             :                                      casacore::Bool /*reset*/=true)
     121           0 :     {throw(casacore::AipsError("VLACalc::makeAverageRes() called"));};
     122             : 
     123             : 
     124             :   private:
     125             :     
     126             :     void fillPB(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Float>& outImg, casacore::Bool Square=false);
     127             :     void fillPB(casacore::ImageInterface<casacore::Complex>& inImg, casacore::ImageInterface<casacore::Complex>& outImg, casacore::Bool Square=false);
     128             : 
     129             :     casacore::TempImage<casacore::Complex> convFunc_p;
     130             :     //    casacore::TempImage<casacore::Float> reAperture_p, imAperture_p;
     131             :     casacore::Vector<casacore::Double> resolution;
     132             :     casacore::Bool pbRead_p;
     133             :     casacore::Float freq_p,lastPA;
     134             :     ApertureCalcParams ap;
     135             :   };
     136             :   };
     137             : };
     138             : #endif

Generated by: LCOV version 1.16