LCOV - code coverage report
Current view: top level - synthesis/TransformMachines - PBMath1DNumeric.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 4 0.0 %
Date: 2024-11-06 17:42:47 Functions: 0 1 0.0 %

          Line data    Source code
       1             : //# PBMath1DNumeric.h: Definitions of 1-D Numeric PBMath objects
       2             : //# Copyright (C) 1996,1997,1998,2000,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: 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_PBMATH1DNUMERIC_H
      30             : #define SYNTHESIS_PBMATH1DNUMERIC_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             : 
      40             : // <summary> 1-D Numeric Primary Beam Model </summary>
      41             : 
      42             : // <use visibility=export>
      43             : 
      44             : // <reviewed reviewer="" date="" tests="" demos="">
      45             : 
      46             : // <prerequisite>
      47             : // <li> <linkto class="PBMathInterface">PBMathInterface</linkto> class
      48             : // <li> <linkto class="PBMath1D">PBMath1D</linkto> class
      49             : // </prerequisite>
      50             : //
      51             : // <etymology>
      52             : //  PBMath1DNumeric: derived from  PBMath1D, implements a numeric PB and VP
      53             : // </etymology>
      54             : //
      55             : // <synopsis> 
      56             : // See PBMath1D for a general synopsis of the 1D PB types.
      57             : // 
      58             : // The user supplies a vector which is a numerical representation
      59             : // of a voltage [attern (hey, if you have a PB, just take the square
      60             : // root, and look out for sidelobes which could be negative).
      61             : // The first element in the vector needs to be 1.0, the center of the
      62             : // voltage pattern.  The last element of the vector is the value of the
      63             : // VP at the maximumRadius.  The maximumRadius and the reference frequency at
      64             : // which the tabulated VP is intended are also required for construction.
      65             : // The PBMath1DNumeric constructor proceeds by performing SINC interpolation
      66             : // on the input vector to generate the highly oversampled lookup vector.
      67             : // 
      68             : // </synopsis> 
      69             : //
      70             : //
      71             : // <example>
      72             : // <srcblock>
      73             : //    casacore::Vector<casacore::Float> vp(10);
      74             : //    vp(0) = 1.0f;
      75             : //    vp(1) = 0.932f;
      76             : //    vp(2) = 0.7462f;
      77             : //    vp(3) = 0.4914f;
      78             : //    vp(4) = 0.2308f;
      79             : //    vp(5) = 0.02183f;   // first null
      80             : //    vp(6) = -0.1005f;
      81             : //    vp(7) = -0.1318f;
      82             : //    vp(8) = -0.09458f;
      83             : //    vp(9) = -0.0269f;
      84             : //    casacore::Quantity maxRad(1.032,"deg");  
      85             : //    casacore::Quantity refFreq(1.414, "GHz");
      86             : //    PBMath1DNumeric numPB (vp, maxRad, refFreq);
      87             : //    numPB.applyPB( im1, im2, pointingDir);
      88             : // </srcblock>
      89             : // </example>
      90             : //
      91             : // <motivation>
      92             : // All of the 1-D PB types have everything in common except for the
      93             : // details of their parameterization.  This lightweight class
      94             : // deals with those differences: construction, filling the PBArray
      95             : // from construction parameters, and flushing to disk.
      96             : // The Numeric type is very handy: someone can take a sample
      97             : // illumination pattern, FT, and take a slice of the resulting voltage
      98             : // pattern and construct a Numerical VP from that slice.
      99             : // </motivation>
     100             : //
     101             : // <todo asof="98/10/21">
     102             : // <li> constructor from a casacore::MS beam subtable
     103             : // <li> flush to casacore::MS beam subtable
     104             : // </todo>
     105             : 
     106             :  
     107             : class PBMath1DNumeric : public PBMath1D {
     108             : public:
     109             : 
     110             :   PBMath1DNumeric();
     111             : 
     112             :   // Instantiation from arguments; default = no squint
     113             :   // squint is the offset from pointing center if the casacore::Stokes R beam
     114             :   // useSymmetricBeam forces a fit to the squinted beam
     115             :   PBMath1DNumeric(const casacore::Vector<casacore::Float>& numericArray, casacore::Quantity maxRad, casacore::Quantity refFreq, 
     116             :                   casacore::Bool isThisVP=false,
     117           0 :                   BeamSquint squint=BeamSquint(casacore::MDirection(casacore::Quantity(0.0, "deg"),
     118           0 :                                                           casacore::Quantity(0.0, "deg"),
     119             :                                                           casacore::MDirection::Ref(casacore::MDirection::AZEL)),
     120           0 :                                                casacore::Quantity(1.0, "GHz")),
     121             :                   casacore::Bool useSymmetricBeam=false);
     122             : 
     123             :   // Instantiation from a row in the Beam subTable
     124             :   // PBMath1DNumeric(const casacore::Table& BeamSubTable, casacore::Int row, 
     125             :   //    casacore::Bool useSymmetricBeam=false);
     126             : 
     127             :   // Copy constructor
     128             :   // PBMath1DGNumeric(const PBMath1DNumeric& other);
     129             : 
     130             :   // Assignment operator, by reference
     131             :   PBMath1DNumeric& operator=(const PBMath1DNumeric& other);
     132             : 
     133             :   //destructor
     134             :  ~PBMath1DNumeric();  
     135             : 
     136             :   // Get the type of PB this is
     137           0 :   PBMathInterface::PBClass whichPBClass() { return PBMathInterface::NUMERIC; }  
     138             :   
     139             :   // Flush the construction parameters to disk
     140             :   // casacore::Bool flushToTable(casacore::Table& beamSubTable, casacore::Int iRow);
     141             : 
     142             :   // Summarize the construction data for this primary beam
     143             :   void summary(casacore::Int nValues=0);
     144             : 
     145             :   virtual casacore::Int support (const casacore::CoordinateSystem& cs);
     146             : 
     147             : protected:
     148             : 
     149             :   // Fill in vp_p array from construction parameters
     150             :   void fillPBArray();
     151             : 
     152             : private:    
     153             : 
     154             :  casacore::Vector<casacore::Float> numericArray_p;
     155             : 
     156             : };
     157             : 
     158             : 
     159             : } //# NAMESPACE CASA - END
     160             : 
     161             : #endif

Generated by: LCOV version 1.16