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

          Line data    Source code
       1             : //# PBMath1DPoly.h: Definitions of 1-D casacore::Polynomial PBMath objects
       2             : //# Copyright (C) 1996,1997,1998,2003
       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_PBMATH1DPOLY_H
      30             : #define SYNTHESIS_PBMATH1DPOLY_H
      31             : 
      32             : #include <casacore/casa/aips.h>
      33             : #include <synthesis/TransformMachines/PBMath1D.h>
      34             : #include <casacore/measures/Measures.h>
      35             : 
      36             : namespace casa { //# NAMESPACE CASA - BEGIN
      37             : 
      38             : //#forward
      39             :   class PBMath1DEVLA;
      40             : // <summary> 
      41             : // PBMath1DPoly is a 1-D casacore::Polynomial Expansion for a Primary Beam
      42             : // </summary>
      43             : 
      44             : // <use visibility=export>
      45             : 
      46             : // <reviewed reviewer="" date="" tests="" demos="">
      47             : 
      48             : // <prerequisite>
      49             : // <li> <linkto class="PBMathInterface">PBMathInterface</linkto> class
      50             : /// <li> <linkto class="PBMath1D">PBMath1D</linkto> class
      51             : // </prerequisite>
      52             : //
      53             : // <etymology>
      54             : // PBMath1DPoly: derived from  PBMath1D, implements an casacore::Polynomial PB and VP
      55             : // </etymology>
      56             : //
      57             : // <synopsis> 
      58             : // PBMath1DPoly: a voltage pattern expressed as a
      59             : // polynomial of even powers of x:
      60             : // 
      61             : // VP(x) = sum_i  coeff_i *  x ^{2i}
      62             : // out to maximumRadius (referenced to the reference frequency)
      63             : // 
      64             : // x is in arcminutes, referenced to the reference frequency
      65             : //
      66             : // This move may make me a bit unpopular: since the PBMath1D constructors
      67             : // construct a Voltage Pattern, the coeficienct for a polynomial type must
      68             : // be in terms of the VP, not the PB.  Hence, go back to the original PB
      69             : // data, take the square root, and fit the same type polynomial to the
      70             : // VP data.
      71             : // </synopsis> 
      72             : //
      73             : //
      74             : // <example>
      75             : // <srcblock>
      76             : // </srcblock>
      77             : // </example>
      78             : //
      79             : // <motivation>
      80             : // All of the 1-D PB types have everything in common except for the
      81             : // details of their parameterization.  This lightweight class
      82             : // deals with those differences: construction, filling the PBArray
      83             : // from construction parameters, and flushing to disk.  VLA and ATNF
      84             : // PBs are tabulated in terms of polynimials.
      85             : // </motivation>
      86             : //
      87             : // <todo asof="98/10/21">
      88             : // <li> constructor from a casacore::MS beam subtable
      89             : // <li> flush to casacore::MS beam subtable
      90             : // </todo>
      91             : 
      92             :  
      93             : class PBMath1DPoly : public PBMath1D {
      94             : public:
      95             : 
      96             :     PBMath1DPoly();
      97             : 
      98             :   // Instantiation from arguments; default = no squint
      99             :   // squint is the offset from pointing center if the casacore::Stokes R beam
     100             :   // useSymmetricBeam forces a fit to the squinted beam
     101             :   PBMath1DPoly(const casacore::Vector<casacore::Double>& coeff, casacore::Quantity maxRad, 
     102             :                casacore::Quantity refFreq, 
     103             :                casacore::Bool isThisVP=false,
     104             :                BeamSquint squint=BeamSquint(casacore::MDirection(casacore::Quantity(0.0, "deg"),
     105             :                                                        casacore::Quantity(0.0, "deg"),
     106             :                                                        casacore::MDirection::Ref(casacore::MDirection::AZEL)),
     107             :                                             casacore::Quantity(1.0, "GHz")),
     108             :                casacore::Bool useSymmetricBeam=false);
     109             : 
     110             :   // Instantiation from a row in the Beam subTable
     111             :   //PBMath1DPoly(const casacore::Table& BeamSubTable, casacore::Int row,
     112             :   //           casacore::Bool useSymmetricBeam=false);
     113             : 
     114             :   // Copy constructor
     115             :   // PBMath1DPoly(const PBMath1DPoly& other);
     116             : 
     117             :   // Assignment operator, by reference
     118             :   PBMath1DPoly& operator=(const PBMath1DPoly& other);
     119             : 
     120             :   // Clone the object
     121             :   //  casacore::CountedPtr<PBMathInterface> clone();
     122             : 
     123             :   // Destructor
     124             :   virtual ~PBMath1DPoly();  
     125             : 
     126             :   // Get the type of PB this is
     127           0 :   PBMathInterface::PBClass whichPBClass() { return PBMathInterface::POLY; }  
     128             : 
     129             :   // Flush the construction parameters to disk
     130             :   // casacore::Bool flushToTable(casacore::Table& beamSubTable, casacore::Int iRow);
     131             : 
     132             :   // Summarize the construction data for this primary beam
     133             :   void summary(casacore::Int nValues=0);
     134             : 
     135             : protected:
     136             :   friend class PBMath1DEVLA;
     137             :   // Fill in vp_p array from construction parameters
     138             :   virtual void fillPBArray();
     139             : 
     140             : private:    
     141             : 
     142             :   casacore::Vector<casacore::Double> coeff_p;
     143             : 
     144             : };
     145             : 
     146             : 
     147             : } //# NAMESPACE CASA - END
     148             : 
     149             : #endif

Generated by: LCOV version 1.16