casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BeamSquint.h
Go to the documentation of this file.
1 //# BeamSquint.h: Defines the BeamSquint class
2 //# Copyright (C) 1996,1997,1998,1999,2000
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_BEAMSQUINT_H
30 #define SYNTHESIS_BEAMSQUINT_H
31 
32 #include <casa/aips.h>
33 #include <measures/Measures.h>
36 
37 namespace casa { //# NAMESPACE CASA - BEGIN
38 
39 // <summary> encapsulates beam squint (RR and LL beams at different directions) </summary>
40 
41 // <use visibility=export>
42 
43 // <reviewed reviewer="" date="" tests="" demos="">
44 
45 // <prerequisite>
46 // <li> <linkto class="casacore::MDirection">casacore::MDirection</linkto> class
47 // </prerequisite>
48 //
49 // <etymology>
50 // BeamSquint = Beam Squint. Obviously so.
51 // </etymology>
52 //
53 // <synopsis>
54 // Beam squint is when the RR and LL circular polarization beams
55 // are located in different places on the sky. The effect is due
56 // to the RR and LL feeds being off-axis. The VLA has particularly bad
57 // beam squint. Some instruments like the AT or WSRT have essentially
58 // no beam squint. The nominal pointing position is taken to be
59 // right in between the RR and LL beam centers/
60 //
61 // BeamSquint has an casacore::MDirection which represents the angular offset from the nominal
62 // pointing position at Parallactic angle = 0 (ie, observing a source south of zenith
63 // at transit) and the actual RR beam. BeamSquint also has a reference frequency,
64 // and the magnitude of the squint angular offset is inversely proportional with
65 // frequency. The squint offset is a true angular displacement.
66 //
67 // The main thing that BeamSquint does is: given the nominal
68 // pointing position and the parallactic angle, calculate the
69 // actual squinted beam position for the RR or LL beams.
70 // If BeamSquint::NONE is requested, the nominal pointing position
71 // is returned.
72 // </synopsis>
73 //
74 //
75 // <example>
76 // <srcblock>
77 // casacore::MDirection oldPointing;
78 // casacore::MDirection newPointing;
79 // casacore::Quantity parallacticAngle(C::pi/2, "rad");
80 // casacore::Quantity observingFreq(1.4142, "GHz");
81 // BeamSquint oneBS( casacore::MDirection( casacore::Quantity(1.0, "'"), casacore::Quantity(1.0, "'"),
82 // casacore::MDirection::Ref(casacore::MDirection::AZEL)),
83 // casacore::Quantity(1.0, "GHz") );
84 // oneBS.getPointingDirection(oldPointing, parallacticAngle,
85 // observingFreq, BeamSquint::RR, newPointing);
86 //
87 // </srcblock>
88 // </example>
89 //
90 // <motivation>
91 // Boy, is this UGLY. We do that UGLY stuff just once, though,
92 // so you never have to look at it AGAIN (see getPointingDirection
93 // if you still don't believe me).
94 // </motivation>
95 //
96 // <todo asof="98/10/21">
97 // <li> Hmmm?
98 // </todo>
99 
100 
101 class BeamSquint {
102 public:
103 
104  // Allowed Squints: NONE = no squint: PB is centered on the pointing center
105  // RR = PB is shifted from pointing center by amount in PBMathInterface's squint_p
106  // LL = PB is shifted from pointing center by the NEGATIVE of the
107  // amount in PBMathInterface's squint_p
108  // GOFIGURE = do the appropriate thing based on the STOKES of the Image
110 
111  // Default constructor initializes to zero
112  BeamSquint();
113 
114  //Smart constructor to initialize the casacore::MDirection and reference freq
115  BeamSquint(const casacore::MDirection& squint, const casacore::Quantity& refFreq);
116 
117  //Copy constructor
118  BeamSquint(const BeamSquint& other);
119 
120  //Operator=
121  BeamSquint& operator= (const BeamSquint& other);
122 
123  //Destructor
124  ~BeamSquint();
125 
126  //Show to Logger
127  void show();
128 
129  //Is BeamSquint nonNull?
131 
132  //Return the squint's casacore::MDirection scaled to a particular frequency
134 
135  //Return the squinted pointing position
136  void getPointingDirection (const casacore::MDirection& pointDir,
137  const casacore::Quantity parAngle,
138  const casacore::Quantity obsFreq,
139  const SquintType doSquint,
140  casacore::MDirection& newPointingDir);
141 
142 protected:
143 
145 
147 
148 };
149 
150 
151 } //# NAMESPACE CASA - END
152 
153 #endif
A Measure: astronomical direction.
Definition: MDirection.h:174
void getPointingDirection(const casacore::MDirection &pointDir, const casacore::Quantity parAngle, const casacore::Quantity obsFreq, const SquintType doSquint, casacore::MDirection &newPointingDir)
Return the squinted pointing position.
encapsulates beam squint (RR and LL beams at different directions)
Definition: BeamSquint.h:101
~BeamSquint()
Destructor.
casacore::Bool isNonNull()
Is BeamSquint nonNull?
casacore::Quantity refFreq_p
Definition: BeamSquint.h:146
casacore::MDirection & scale(const casacore::Quantity &refFreq)
Return the squint&#39;s casacore::MDirection scaled to a particular frequency.
SquintType
Allowed Squints: NONE = no squint: PB is centered on the pointing center RR = PB is shifted from poin...
Definition: BeamSquint.h:109
BeamSquint & operator=(const BeamSquint &other)
Operator=.
BeamSquint()
Default constructor initializes to zero.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::MDirection squint_p
Definition: BeamSquint.h:144
void show()
Show to Logger.