casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CFTerms.h
Go to the documentation of this file.
1 //# CFTerms.h: Definition for CFTerms
2 //# Copyright (C) 2007
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_CFTERMS_H
30 #define SYNTHESIS_CFTERMS_H
31 
32 
33 #include <casa/Arrays/Vector.h>
37 #include <msvis/MSVis/VisBuffer.h>
38 #include <casa/Containers/Block.h>
39 
40 namespace casa{
41  // <summary>
42  // The base class to represent the Aperture-Term of the Measurement Equation.
43  // </summary>
44 
45  // <use visibility=export>
46  // <prerequisite>
47  // </prerequisite>
48  // <etymology>
49  // A-Term to account for the effects of the antenna primary beam(s).
50  // </etymology>
51  //
52  // <synopsis>
53  //
54  //</synopsis>
55  class CFTerms
56  {
57  public:
58  enum OpCodes {NOOP=0,NORMAL};
60  virtual ~CFTerms () {};
61 
62  virtual void setOpCode(OpCodes code) {opCode_p = code;}
63  virtual casacore::Bool isNoOp() {return opCode_p==NOOP;};
64 
65  virtual casacore::String name() = 0;
66 
67  virtual void applySky(casacore::ImageInterface<casacore::Float>& outputImages,
68  const VisBuffer& vb,
69  const casacore::Bool doSquint=true,
70  const casacore::Int& cfKey=0,
71  const casacore::Int& muellerTerms=0,
72  const casacore::Double freqVal=-1) = 0;
73  virtual void applySky(casacore::ImageInterface<casacore::Complex>& outputImages,
74  const VisBuffer& vb,
75  const casacore::Bool doSquint=true,
76  const casacore::Int& cfKey=0,
77  const casacore::Int& muellerTerms=0,
78  const casacore::Double freqVal=-1) = 0;
79  //
80  // Not sure if the following method is requried. Leaving it in
81  // the code for now with an implementation that does nothing.
82  //
83  // virtual void applySky(casacore::Matrix<casacore::Complex>& screen, const casacore::Int wPixel,
84  // const casacore::Vector<casacore::Double>& sampling,
85  // const casacore::Int wConvSize, const casacore::Double wScale,
86  // const casacore::Int inner)
87  // {(void)screen; (void)wPixel; (void)sampling; (void)wConvSize; (void)wScale; (void)inner;};
88 
89  //
90  // Returns a vector of integers that map each row in the given
91  // VisBuffer to an index that is used to pick the appropriate
92  // convolution function plane. It also returns the number of
93  // unique baselines in the nUnique parameter (unique baselines are
94  // defined as the number of baselines each requiring a unique
95  // convolution function).
96  //
97  // This is required for Heterogeneous antenna arrays (like ALMA)
98  // and for all arrays where not all antenna aperture illuminations
99  // can be treated as identical.
100  //
102  virtual casacore::Int makePBPolnCoords(const VisBuffer& vb,
103  const casacore::Int& convSize,
104  const casacore::Int& convSampling,
105  const casacore::CoordinateSystem& skyCoord,
106  const casacore::Int& skyNx, const casacore::Int& skyNy,
107  casacore::CoordinateSystem& feedCoord) = 0;
108 
109  virtual casacore::Int getConvSize() = 0;
110  virtual casacore::Int getOversampling() = 0;
112  virtual casacore::Float getSupportThreshold() = 0;
113 
115  const casacore::Matrix<casacore::Float>& weights) = 0;
116 
117  virtual int getVisParams(const VisBuffer& vb, const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem()) = 0;
118  //
119  // The mapping from VisBuffer polarizations map to the Image plane
120  // polarization. The latter is determined by the user input,
121  // which is passed to the FTMachine in Imager.cc
122  //
123  // The map is available in the FTMachine which uses this method to
124  // set the map for the CFTerms object.
125  //
127  virtual void getPolMap(casacore::Vector<casacore::Int>& polMap) {polMap.resize(0); polMap = polMap_p_base;};
128 
130 
131  protected:
136  };
137 
138 };
139 
140 #endif
virtual casacore::Bool rotationallySymmetric()=0
int Int
Definition: aipstype.h:50
casacore::Vector< casacore::Int > polMap_p_base
Definition: CFTerms.h:134
The base class to represent the Aperture-Term of the Measurement Equation.
Definition: CFTerms.h:55
virtual casacore::Int getOversampling()=0
virtual void getPolMap(casacore::Vector< casacore::Int > &polMap)
Definition: CFTerms.h:127
ostream-like interface to creating log messages.
Definition: LogIO.h:167
virtual void normalizeImage(casacore::Lattice< casacore::Complex > &skyImage, const casacore::Matrix< casacore::Float > &weights)=0
virtual void applySky(casacore::ImageInterface< casacore::Float > &outputImages, const VisBuffer &vb, const casacore::Bool doSquint=true, const casacore::Int &cfKey=0, const casacore::Int &muellerTerms=0, const casacore::Double freqVal=-1)=0
virtual casacore::Float getSupportThreshold()=0
virtual casacore::Int makePBPolnCoords(const VisBuffer &vb, const casacore::Int &convSize, const casacore::Int &convSampling, const casacore::CoordinateSystem &skyCoord, const casacore::Int &skyNx, const casacore::Int &skyNy, casacore::CoordinateSystem &feedCoord)=0
OpCodes opCode_p
Definition: CFTerms.h:135
casacore::LogIO logIO_p
Definition: CFTerms.h:133
double Double
Definition: aipstype.h:55
virtual casacore::Vector< casacore::Int > vbRow2CFKeyMap(const VisBuffer &vb, casacore::Int &nUnique)=0
Not sure if the following method is requried.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual ~CFTerms()
Definition: CFTerms.h:60
virtual int getVisParams(const VisBuffer &vb, const casacore::CoordinateSystem &skyCoord=casacore::CoordinateSystem())=0
float Float
Definition: aipstype.h:54
virtual casacore::Float getConvWeightSizeFactor()=0
virtual casacore::Bool isNoOp()
Definition: CFTerms.h:63
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual casacore::String name()=0
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
void resize(size_t len, Bool copyValues=False)
Definition: Vector.h:167
virtual void setPolMap(const casacore::Vector< casacore::Int > &polMap)
The mapping from VisBuffer polarizations map to the Image plane polarization.
Definition: CFTerms.h:126
virtual void setOpCode(OpCodes code)
Definition: CFTerms.h:62
Interconvert pixel and world coordinates.
virtual casacore::Int getConvSize()=0
casacore::LogIO & logIO()
Definition: CFTerms.h:132