casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalInterpolation.h
Go to the documentation of this file.
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: 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 CALIBRATION_CALINTERPOLATION_H
30 #define CALIBRATION_CALINTERPOLATION_H
31 
32 #include <casa/aips.h>
33 #include <casa/Arrays/Vector.h>
34 #include <casa/Quanta/Quantum.h>
35 #include <msvis/MSVis/MSCalEnums.h>
36 #include <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 
79 {
80  public:
81  // Basic interpolation type
82  enum Type {
83  // Linear two-point
84  LINEAR = 0,
85 
86  // Nearest calibration solution only
88 
89  // Fit a polynomial and interpolate
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
103  };
104 
105  // Default null constructor, and destructor
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
115 
116  // Set interpolation type
117  virtual void setType (const Type& type) {type_p = type;};
118 
119  // Set interpolation weighting
120  virtual void setWeighting (const Weighting& weighting)
121  {weighting_p = weighting;};
122 
123  // Set interpolation window (per axis)
125  {windows_p = windows;};
126 
127  // Set polynomial order
128  virtual void setNpoly (const casacore::Int& npoly) {npoly_p = npoly;};
129 
130  // Set interpolation index mapping
134 
135  // Get number and type of interpolation axes
137  virtual casacore::Int nAxes() {return axes_p.nelements();};
138 
139  // Get interpolation type
140  virtual Type type() {return type_p;};
141 
142  // Get interpolation weighting type
143  virtual Weighting weighting() {return weighting_p;};
144 
145  // Get interpolation windows for each axis
147 
148  // Get polynomial order
149  virtual casacore::Int nPoly() {return npoly_p;};
150 
151  // Get interpolation index mapping
154 
155  protected:
156 
157  private:
158  // Interpolation axes
160 
161  // Interpolation type
163 
164  // Interpolation weighting type
166 
167  // Interpolation windows
169 
170  // casacore::Polynomial order
172 
173  // Interpolation index mapping
175  };
176 
177 
178 } //# NAMESPACE CASA - END
179 
180 #endif
181 
int Int
Definition: aipstype.h:50
Nearest calibration solution only.
Weight by the calibration solution weight.
size_t nelements() const
How many elements does this array have? Product of all axis lengths.
Definition: ArrayBase.h:99
Fit a polynomial and interpolate.
virtual CalInterpolation & operator=(const CalInterpolation &other)
virtual casacore::Vector< casacore::MSSelection > msIndex()
Get interpolation index mapping.
virtual void setWeighting(const Weighting &weighting)
Set interpolation weighting.
Type type_p
Interpolation type.
virtual void setAxes(const casacore::Vector< casacore::Int > &axes)
Set interpolation axes.
casacore::Vector< casacore::Int > axes_p
Interpolation axes.
Type
Basic interpolation type.
Weighting
Interpolation weighting type.
CalInterpolation()
Default null constructor, and destructor.
virtual Weighting weighting()
Get interpolation weighting type.
CalInterpolation: a class to hold calibration interpolation parameters.
virtual void setNpoly(const casacore::Int &npoly)
Set polynomial order.
casacore::Vector< casacore::Quantity > windows_p
Interpolation windows.
casacore::Vector< casacore::MSSelection > calIndex_p
casacore::Vector< casacore::MSSelection > msIndex_p
Interpolation index mapping.
virtual casacore::Vector< casacore::Int > axes()
Get number and type of interpolation axes.
casacore::Int npoly_p
casacore::Polynomial order
virtual casacore::Vector< casacore::Quantity > windows()
Get interpolation windows for each axis.
virtual casacore::Vector< casacore::MSSelection > calIndex()
virtual Type type()
Get interpolation type.
virtual void setWindows(const casacore::Vector< casacore::Quantity > &windows)
Set interpolation window (per axis)
virtual void setIndexMap(const casacore::Vector< casacore::MSSelection > &msIndex, const casacore::Vector< casacore::MSSelection > &calIndex)
Set interpolation index mapping.
Use unit weighting for all points.
virtual casacore::Int nAxes()
Weighting weighting_p
Interpolation weighting type.
Use natural cubic splines to interpolate.
virtual void setType(const Type &type)
Set interpolation type.
virtual casacore::Int nPoly()
Get polynomial order.