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