LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - DBeamSkyJones.cc (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 0 20 0.0 %
Date: 2023-11-02 14:27:30 Functions: 0 2 0.0 %

          Line data    Source code
       1             : //# DBeamSkyJones.cc: Implementation for DBeamSkyJones
       2             : //# Copyright (C) 1996,1997,1998,2000,2001
       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             : #include <casacore/casa/aips.h>
      30             : #include <casacore/casa/BasicSL/Complex.h>
      31             : #include <synthesis/TransformMachines/VPSkyJones.h>
      32             : 
      33             : #include <casacore/ms/MeasurementSets/MeasurementSet.h>
      34             : #include <casacore/ms/MeasurementSets/MSColumns.h>
      35             : 
      36             : #include <casacore/measures/Measures/Stokes.h>
      37             : 
      38             : #include <casacore/casa/BasicSL/Constants.h>
      39             : 
      40             : #include <components/ComponentModels/Flux.h>
      41             : #include <components/ComponentModels/ComponentShape.h>
      42             : 
      43             : #include <msvis/MSVis/VisBuffer.h>
      44             : #include <casacore/images/Images/ImageInterface.h>
      45             : #include <casacore/lattices/Lattices/LatticeStepper.h>
      46             : #include <casacore/lattices/Lattices/LatticeIterator.h>
      47             : 
      48             : #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
      49             : #include <casacore/coordinates/Coordinates/DirectionCoordinate.h>
      50             : #include <casacore/coordinates/Coordinates/SpectralCoordinate.h>
      51             : #include <casacore/coordinates/Coordinates/StokesCoordinate.h>
      52             : #include <casacore/coordinates/Coordinates/Projection.h>
      53             : 
      54             : #include <synthesis/TransformMachines/DBeamSkyJones.h>
      55             : #include <casacore/casa/Utilities/Assert.h>
      56             : 
      57             : using namespace casacore;
      58             : namespace casa { //# NAMESPACE CASA - BEGIN
      59             : 
      60           0 : DBeamSkyJones::DBeamSkyJones(MeasurementSet& ms,
      61             :                              Bool makePBs,
      62             :                              const Quantity &parAngleInc,
      63           0 :                              BeamSquint::SquintType doSquint) 
      64           0 :   : BeamSkyJones(parAngleInc, doSquint)
      65             : {
      66           0 :   LogIO os(LogOrigin("DBeamSkyJones", "DBeamSkyJones"));
      67             : 
      68           0 :   if (makePBs) {
      69           0 :     MSColumns msc(ms);
      70           0 :     ScalarColumn<String> telescopesCol(msc.observation().telescopeName());
      71             :         
      72           0 :     for (uInt i=0; i < telescopesCol.nrow(); i++) {
      73           0 :       String telescope_p = telescopesCol(i); // access to protected member of
      74             :                           // the base class (not a good style, but left as is)
      75             :       // if operator condition checks that the names are not redundant
      76           0 :       if (indexTelescope(telescope_p)<0) {
      77             :         // Ultimately, we need to get the Beam parameters from the MS.beamSubTable,
      78             :         // but until then we will use this: figure it out from Telescope and Freq
      79           0 :         String band;
      80             :         PBMath::CommonPB whichPB;
      81           0 :         String commonPBName;
      82             :         // This frequency is ONLY required to determine which PB model to use:
      83             :         // The VLA, the ATNF, and WSRT have frequency - dependent PB models
      84           0 :         Quantity freq( msc.spectralWindow().refFrequency()(0), "Hz");
      85             :         
      86             : 
      87             :         // We need different code here for the DBeam: this is waiting for PBMath2D
      88             :         // to be fully functional, including an HGEOM-like routine to scale and
      89             :         // rotate images
      90           0 :         PBMath::whichCommonPBtoUse( telescope_p, freq, band, whichPB, commonPBName );
      91             :       
      92             :         os << LogIO::DEBUGGING << "Telescope name is " << telescope_p 
      93           0 :            << LogIO::POST;
      94             :         os << LogIO::DEBUGGING << "Telescope band is " << band 
      95           0 :            << LogIO::POST;
      96             :         os << LogIO::DEBUGGING << "Common PB type is " << commonPBName
      97           0 :            << LogIO::POST;
      98             :      
      99           0 :         PBMath  myPBMath(whichPB);
     100           0 :         setPBMath (telescope_p, myPBMath);
     101             :       }
     102             :     }
     103             :   }
     104           0 : };
     105             : 
     106             :  
     107             : 
     108             : } //# NAMESPACE CASA - END
     109             : 

Generated by: LCOV version 1.16