LCOV - code coverage report
Current view: top level - synthesis/TransformMachines2 - PointingOffsets.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 11 0.0 %
Date: 2024-10-29 13:38:20 Functions: 0 9 0.0 %

          Line data    Source code
       1             : // -*- C++ -*-
       2             : //# PointingOffsets.h: Definition of the PointingOffsets class
       3             : //# Copyright (C) 1997,1998,1999,2000,2001,2002,2003
       4             : //# Associated Universities, Inc. Washington DC, USA.
       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 addressed 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             : //# $Id$
      28             : //
      29             : #ifndef SYNTHESIS_TRANSFORM2_POINTINGOFFSETS_H
      30             : #define SYNTHESIS_TRANSFORM2_POINTINGOFFSETS_H
      31             : 
      32             : #include <synthesis/MeasurementComponents/SolvableVisCal.h>
      33             : #include <synthesis/TransformMachines2/Utils.h>
      34             : #include <casacore/coordinates/Coordinates/DirectionCoordinate.h>
      35             : #include <casacore/images/Images/ImageInterface.h>
      36             : #include <msvis/MSVis/VisBufferUtil.h>
      37             : #include <casacore/images/Images/TempImage.h>
      38             : #include <msvis/MSVis/VisBuffer2.h>
      39             : 
      40             : class SolvableVisJones;
      41             : namespace casa { //# NAMESPACE CASA - BEGIN
      42             :   namespace refim{
      43             :   //
      44             :   //-------------------------------------------------------------------------------------------
      45             :   //
      46             :   class PointingOffsets 
      47             :   {
      48             :   public:
      49             : 
      50           0 :     PointingOffsets():thePix_p(), pixFieldGrad_p(), imageObsInfo_p(), nx_p(0), ny_p(0), nchan_p(0), npol_p(0), directionIndex_p(0), csys_p(), dc_p(), pointFrame_p(), timeMType_p(), timeUnit_p(), direction1_p(), direction2_p(), doPointing_p(false), vbUtils_p(), cachedAntGridPointingOffsets_p()
      51             :     {
      52           0 :       PO_DEBUG_P = SynthesisUtils::getenv("PO_DEBUG",0);
      53             :       //cerr << "PO_DEBUG = " << PO_DEBUG_P << endl;
      54           0 :    }
      55           0 :     ~PointingOffsets() {};
      56             :     PointingOffsets& operator=(const PointingOffsets& other);
      57             : 
      58             :     void setEPJones(SolvableVisJones* epJ) {epJ_p = epJ;};
      59             :     virtual casacore::Vector<casacore::Vector<casacore::Double> >findMosaicPointingOffset(const casacore::ImageInterface<casacore::Complex>& image,
      60             :                                                                         const vi::VisBuffer2& vb, const casacore::Bool& doPointing=false);
      61             : 
      62             :     virtual casacore::Vector<casacore::Vector<casacore::Double> >findAntennaPointingOffset(const casacore::ImageInterface<casacore::Complex>& image,
      63             :                                                                          const vi::VisBuffer2& vb, const casacore::Bool& doPointing=true);
      64             : 
      65             :     virtual void fetchPointingOffset(const casacore::ImageInterface<casacore::Complex>& image,
      66             :                                      const vi::VisBuffer2& vb, const casacore::Bool doPointing=false);
      67             : 
      68             :     casacore::Vector<double> gradPerPixel(const casacore::Vector<double>& p);
      69             :     casacore::Vector<casacore::Double>& toPix(const vi::VisBuffer2& vb, 
      70             :                                               const casacore::MDirection& dir1, const casacore::MDirection& dir2);
      71             : 
      72             :     std::vector<std::vector<double> > fetchAntOffsetToPix(const vi::VisBuffer2& vb, const casacore::Bool doPointing);
      73             : 
      74             :     void storeImageParams(const casacore::ImageInterface<casacore::Complex>& iimage, const vi::VisBuffer2& vb);
      75             : 
      76           0 :     void setDoPointing(const bool& dop=false) {doPointing_p = dop;}
      77           0 :     bool getDoPointing(){return doPointing_p;};
      78             : 
      79           0 :     void setOverSampling(const int& os) {convOversampling_p=os;}
      80             : 
      81           0 :     void setAntGridPointingOffsets(const casacore::Vector<casacore::Vector<casacore::Double> >& antGridPointingOffsets){cachedAntGridPointingOffsets_p.reference(antGridPointingOffsets);};
      82             : 
      83           0 :     casacore::Vector<casacore::Vector<casacore::Double> > pullPointingOffsets(){return cachedPointingOffsets_p;};
      84           0 :     casacore::Vector<casacore::Vector<casacore::Double> > pullAntGridPointingOffsets(){return cachedAntGridPointingOffsets_p;};
      85             :     // casacore::Vector<casacore::Vector<casacore::Double> > pullAntGridPointingOffsets(const int& row){return cachedAntGridPointingOffsets_p(row);};
      86           0 :     casacore::Vector<casacore::Double> getIncrement(){return dc_p.increment();}
      87             : 
      88             :   private:
      89             : 
      90             :     casacore::Vector<double> thePix_p, pixFieldGrad_p;
      91             :     casacore::DirectionCoordinate imageDC_p;
      92             :     casacore::ObsInfo imageObsInfo_p;
      93             :     int nx_p, ny_p, nchan_p, npol_p, convOversampling_p, directionIndex_p;
      94             :     casacore::CoordinateSystem csys_p;
      95             :     casacore::DirectionCoordinate dc_p;
      96             :     casacore::MDirection::Convert pointToPix_p;
      97             :     casacore::MeasFrame pointFrame_p;
      98             :     casacore::MEpoch::Types timeMType_p;
      99             :     casacore::Unit timeUnit_p;
     100             :     casacore::MDirection direction1_p;
     101             :     casacore::MDirection direction2_p;
     102             :     casacore::CountedPtr<SolvableVisJones> epJ_p;
     103             :     bool doPointing_p;
     104             :     VisBufferUtil vbUtils_p;
     105             :     casacore::Vector<casacore::Vector<casacore::Double> > cachedPointingOffsets_p, cachedAntGridPointingOffsets_p;
     106             : 
     107             :     int PO_DEBUG_P;
     108             :   };
     109             :   //
     110             :   //-------------------------------------------------------------------------------------------
     111             :   //
     112             : };
     113             : };
     114             : #endif

Generated by: LCOV version 1.16