casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PBMath1DCosPoly.h
Go to the documentation of this file.
1 //# PBMath1DCosPoly.h: Definitions of 1-D CosPolynomial 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_PBMATH1DCOSPOLY_H
30 #define SYNTHESIS_PBMATH1DCOSPOLY_H
31 
32 #include <casa/aips.h>
34 #include <measures/Measures.h>
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38 // <summary>
39 // PBMath1DCosPoly is a 1-D casacore::Polynomial Cosine Expansion for a Primary Beam
40 // </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 // PBMath1DCosPoly: derived from PBMath1D, implements a polynomial of Cosines of different widths
53 // </etymology>
54 //
55 // <synopsis>
56 // PBMath1DCosPoly: a voltage pattern expressed as a
57 // polynomial of cosines (all powers of them):
58 //
59 // VP(x) = sum_i coeff_i * cos( scale_i * x )^{i}
60 //
61 // x is in arcminutes, referenced to 1GHz frequency;
62 // the argument of the cosines are in radians
63 // </synopsis>
64 //
65 //
66 // <example>
67 // <srcblock>
68 // casacore::Vector<casacore::Double> cosCoef(4);
69 // casacore::Vector<casacore::Double> cosScale(4);
70 // cosCoef.set(0.0);
71 // cosScale.set(0.0);
72 // cosCoef(3) = 1.0;
73 // cosScale(3) = 0.01891; // 0.01891 = 0.065 * 1000(MHz/GHz) /(60(arcm/deg)) * 2pi/180
74 // PBMath1DCosPoly cosPB(cosCoef, cosScale,
75 // casacore::Quantity(1.0, "deg"),
76 // casacore::Quantity(1.0, "GHz") );
77 // cosPB.applyPB( im3, im4, pointingDir);
78 // </srcblock>
79 // </example>
80 //
81 // <motivation>
82 // All of the 1-D PB types have everything in common except for the
83 // details of their parameterization. This lightweight class
84 // deals with those differences: construction, filling the PBArray
85 // from construction parameters, and flushing to disk.
86 // WSRT uses this model.
87 // </motivation>
88 //
89 // <todo asof="98/10/21">
90 // <li> constructor from a casacore::MS beam subtable
91 // <li> flush to casacore::MS beam subtable
92 // </todo>
93 
94 
95 class PBMath1DCosPoly : public PBMath1D {
96 public:
97 
99 
100  // Instantiation from arguments; default = no squint
101  // squint is the offset from pointing center if the casacore::Stokes R beam
102  // useSymmetricBeam forces a fit to the squinted beam
105  casacore::Quantity refFreq,
106  casacore::Bool isThisVP=false,
108  casacore::Quantity(0.0, "deg"),
110  casacore::Quantity(1.0, "GHz")),
111  casacore::Bool useSymmetricBeam=false);
112 
113  // Instantiation from a row in the Beam subTable
114  // PBMath1DCosPoly(const casacore::Table& BeamSubTable, casacore::Int row,
115  // casacore::Bool useSymmetricBeam=false);
116 
117  // Copy constructor
118  // PBMath1DCosPoly(const PBMath1DCosPoly& other);
119 
120  // Assignment operator, by reference
122 
123  // Clone the object
124  // casacore::CountedPtr<PBMathInterface> clone();
125 
126  // destructor
128 
129  // Get the type of PB this is
131 
132  // Flush the construction parameters to disk
133  // casacore::Bool flushToTable(casacore::Table& beamSubTable, casacore::Int iRow);
134 
135  // Summarize the construction data for this primary beam
136  void summary(casacore::Int nValues=0);
137 
138 
139 protected:
140 
141  // Fill in vp_p array from construction parameters
142  void fillPBArray();
143 
144 private:
145 
148 
149 };
150 
151 
152 } //# NAMESPACE CASA - END
153 
154 #endif
A Measure: astronomical direction.
Definition: MDirection.h:174
int Int
Definition: aipstype.h:50
encapsulates beam squint (RR and LL beams at different directions)
Definition: BeamSquint.h:101
base class for 1D PBMath objects
Definition: PBMath1D.h:154
~PBMath1DCosPoly()
Clone the object casacore::CountedPtr&lt;PBMathInterface&gt; clone();.
PBMath1DCosPoly is a 1-D casacore::Polynomial Cosine Expansion for a Primary Beam.
PBClass
Allowed PBMath Classes.
casacore::Vector< casacore::Double > cosScale_p
PBMath1DCosPoly & operator=(const PBMath1DCosPoly &other)
Instantiation from a row in the Beam subTable PBMath1DCosPoly(const casacore::Table&amp; BeamSubTable...
void summary(casacore::Int nValues=0)
Flush the construction parameters to disk casacore::Bool flushToTable(casacore::Table&amp; beamSubTable...
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void fillPBArray()
Fill in vp_p array from construction parameters.
casacore::Vector< casacore::Double > coeff_p
PBMathInterface::PBClass whichPBClass()
Get the type of PB this is.