LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalInterpolation.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 17 0.0 %
Date: 2024-10-28 15:53:10 Functions: 0 14 0.0 %

          Line data    Source code
       1             : //# CalInterpolation.h: A class to hold calibration interpolation parameters
       2             : //# Copyright (C) 1996,1997,1998,1999,2001,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: 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 CALIBRATION_CALINTERPOLATION_H
      30             : #define CALIBRATION_CALINTERPOLATION_H
      31             : 
      32             : #include <casacore/casa/aips.h>
      33             : #include <casacore/casa/Arrays/Vector.h>
      34             : #include <casacore/casa/Quanta/Quantum.h>
      35             : #include <msvis/MSVis/MSCalEnums.h>
      36             : #include <casacore/ms/MSSel/MSSelection.h>
      37             : 
      38             : namespace casa { //# NAMESPACE CASA - BEGIN
      39             : 
      40             : // <summary> 
      41             : // CalInterpolation: a class to hold calibration interpolation parameters
      42             : // </summary>
      43             : 
      44             : // <use visibility=export>
      45             : 
      46             : // <reviewed reviewer="" date="" tests="" demos="">
      47             : 
      48             : // <prerequisite>
      49             : //   <li> <linkto class="MSCalEnums">MSCalEnums</linkto> module
      50             : //   <li> <linkto class="CalBuffer">CalBuffer</linkto> module
      51             : //   <li> <linkto class="casacore::MSSelection">casacore::MSSelection</linkto> module
      52             : // </prerequisite>
      53             : //
      54             : // <etymology>
      55             : // From "calibration" and "interpolation".
      56             : // </etymology>
      57             : //
      58             : // <synopsis>
      59             : // The CalInterpolation class holds calibration interpolation parameters 
      60             : // which define how calibration is to be applied. Specializations for 
      61             : // parametrized Jones matrices, which required sampling before 
      62             : // interpolation, are provided through inheritance.
      63             : // </etymology>
      64             : //
      65             : // <example>
      66             : // <srcblock>
      67             : // </srcblock>
      68             : // </example>
      69             : //
      70             : // <motivation>
      71             : // This class is used by the calibration interpolater classes.
      72             : // </motivation>
      73             : //
      74             : // <todo asof="2001/08/25">
      75             : // (i)
      76             : // </todo>
      77             : 
      78             : class CalInterpolation
      79             : {
      80             :  public:
      81             :   // Basic interpolation type
      82             :   enum Type {
      83             :     // Linear two-point
      84             :     LINEAR = 0,
      85             : 
      86             :     // Nearest calibration solution only
      87             :     NEAREST_NEIGHBOUR = 1,
      88             : 
      89             :     // Fit a polynomial and interpolate
      90             :     POLYNOMIAL = 2,
      91             : 
      92             :     // Use natural cubic splines to interpolate
      93             :     SPLINE = 3
      94             :   };
      95             : 
      96             :   // Interpolation weighting type
      97             :   enum Weighting {
      98             :     // Weight by the calibration solution weight
      99             :     WEIGHTED = 1,
     100             : 
     101             :     // Use unit weighting for all points 
     102             :     UNWEIGHTED = 0
     103             :   };
     104             : 
     105             :   // Default null constructor, and destructor
     106             :   CalInterpolation();
     107             :   virtual ~CalInterpolation();
     108             : 
     109             :   // Copy constructor and assignment operator
     110             :   CalInterpolation (const CalInterpolation& other);
     111             :   virtual CalInterpolation& operator= (const CalInterpolation& other);
     112             : 
     113             :   // Set interpolation axes
     114           0 :   virtual void setAxes (const casacore::Vector<casacore::Int>& axes) {axes_p = axes;}
     115             : 
     116             :   // Set interpolation type
     117           0 :   virtual void setType (const Type& type) {type_p = type;};
     118             : 
     119             :   // Set interpolation weighting
     120           0 :   virtual void setWeighting (const Weighting& weighting) 
     121           0 :     {weighting_p = weighting;};
     122             : 
     123             :   // Set interpolation window (per axis)
     124           0 :   virtual void setWindows (const casacore::Vector<casacore::Quantity>& windows) 
     125           0 :     {windows_p = windows;};
     126             : 
     127             :   // Set polynomial order
     128           0 :   virtual void setNpoly (const casacore::Int& npoly) {npoly_p = npoly;};
     129             : 
     130             :   // Set interpolation index mapping
     131           0 :   virtual void setIndexMap (const casacore::Vector<casacore::MSSelection>& msIndex,
     132             :                             const casacore::Vector<casacore::MSSelection>& calIndex)
     133           0 :     {msIndex_p = msIndex; calIndex_p = calIndex;};   
     134             : 
     135             :   // Get number and type of interpolation axes
     136           0 :   virtual casacore::Vector<casacore::Int> axes() {return axes_p;};
     137           0 :   virtual casacore::Int nAxes() {return axes_p.nelements();};
     138             : 
     139             :   // Get interpolation type
     140           0 :   virtual Type type() {return type_p;};
     141             : 
     142             :   // Get interpolation weighting type
     143           0 :   virtual Weighting weighting() {return weighting_p;};
     144             : 
     145             :   // Get interpolation windows for each axis
     146           0 :   virtual casacore::Vector<casacore::Quantity> windows() {return windows_p;};
     147             : 
     148             :   // Get polynomial order
     149           0 :   virtual casacore::Int nPoly() {return npoly_p;};
     150             : 
     151             :   // Get interpolation index mapping
     152           0 :   virtual casacore::Vector<casacore::MSSelection> msIndex() {return msIndex_p;};
     153           0 :   virtual casacore::Vector<casacore::MSSelection> calIndex() {return calIndex_p;};
     154             : 
     155             :  protected:
     156             : 
     157             :  private:
     158             :   // Interpolation axes
     159             :   casacore::Vector<casacore::Int> axes_p;
     160             : 
     161             :   // Interpolation type
     162             :   Type type_p;
     163             : 
     164             :   // Interpolation weighting type
     165             :   Weighting weighting_p;
     166             : 
     167             :   // Interpolation windows
     168             :   casacore::Vector<casacore::Quantity> windows_p;
     169             : 
     170             :   // casacore::Polynomial order
     171             :   casacore::Int npoly_p;
     172             : 
     173             :   // Interpolation index mapping
     174             :   casacore::Vector<casacore::MSSelection> msIndex_p, calIndex_p;
     175             :  };
     176             : 
     177             : 
     178             : } //# NAMESPACE CASA - END
     179             : 
     180             : #endif
     181             :    

Generated by: LCOV version 1.16