casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AWConvFunc.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //# AWConvFunc.h: Definition of the AWConvFunc class
3 //# Copyright (C) 1997,1998,1999,2000,2001,2002,2003
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be addressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 //# $Id$
28 //
29 #ifndef SYNTHESIS_AWCONVFUNC_H
30 #define SYNTHESIS_AWCONVFUNC_H
31 
43 #include <casa/Logging/LogIO.h>
44 #include <casa/Logging/LogSink.h>
45 #include <casa/Logging/LogOrigin.h>
46 
47 namespace casacore{
48 
49  template<class T> class ImageInterface;
50  template<class T> class Matrix;
51 }
52 
53 namespace casa { //# NAMESPACE CASA - BEGIN
54  class VisBuffer;
55  //
56  //-------------------------------------------------------------------------------------------
57  //
59  {
60  public:
62  const casacore::CountedPtr<PSTerm> psTerm,
63  const casacore::CountedPtr<WTerm> wTerm,
64  const casacore::Bool wbAWP=false,
65  const casacore::Bool conjPB=casacore::True);
66 
68  AWConvFunc& operator=(const AWConvFunc& other);
70  const VisBuffer& vb,
71  const casacore::Int wConvSize,
73  const casacore::Float pa,
74  const casacore::Float dpa,
76  const casacore::Vector<casacore::Double>& uvOffset,
77  const casacore::Matrix<casacore::Double>& vbFreqSelection,
78  CFStore2& cfs,
79  CFStore2& cfwts,
80  casacore::Bool fillCF=true);
81  virtual void fillConvFuncBuffer(CFBuffer& cfb, CFBuffer& cfWtb,
82  const casacore::Int& nx, const casacore::Int& ny,
83  const casacore::Vector<casacore::Double>& freqValues,
85  const casacore::Double& wScale,
86  const casacore::Double& vbPA, const casacore::Double& freqHi,
87  const PolMapType& muellerElements,
88  const PolMapType& muellerElementsIndex,
89  const VisBuffer& vb, const casacore::Float& psScale,
90  PSTerm& psTerm, WTerm& wTerm, ATerm& aTerm,
91  casacore::Bool isDryRun=false);
92  static void makeConvFunction2(const casacore::String& uvGridDiskimage,
94  const casacore::Vector<casacore::Double>& uvOffset,
95  const casacore::Matrix<casacore::Double>& vbFreqSelection,
96  CFStore2& cfs,
97  CFStore2& cfwts,
98  const casacore::Bool psTermOn,
99  const casacore::Bool aTermOn,
100  const casacore::Bool conjBeams);
101  static void fillConvFuncBuffer2(CFBuffer& cfb, CFBuffer& cfWtb,
102  const casacore::Int& nx, const casacore::Int& ny,
104  //const CoordinateSystem& skyCoords,
105  const CFCStruct& miscInfo,
106  PSTerm& psTerm, WTerm& wTerm, ATerm& aTerm,
107  casacore::Bool conjPB);
108 
109  virtual casacore::Bool makeAverageResponse(const VisBuffer& vb,
112  casacore::Bool reset=true);
113  virtual casacore::Bool makeAverageResponse(const VisBuffer& vb,
116  casacore::Bool reset=true);
117 
119  {return aTerm_p->getVisParams(vb,skyCoord);};
120 
121  virtual void setPolMap(const casacore::Vector<casacore::Int>& polMap) {aTerm_p->setPolMap(polMap);};
122  // virtual void setFeedStokes(const casacore::Vector<casacore::Int>& feedStokes) {aTerm_p->setFeedStokes(feedStokes);};
123 
125 
127  const VisBuffer& /*vb*/)
128  {casacore::Vector<casacore::Double> tt(2); tt=0;return tt;};
129 
130  virtual void prepareConvFunction(const VisBuffer& vb, VBRow2CFBMapType& cfs);
131  casacore::Int mapAntIDToAntType(const casacore::Int& ant) {return aTerm_p->mapAntIDToAntType(ant);};
132 
135  casacore::Vector<String>& bandNames);
137 
138  virtual void setMiscInfo(const casacore::RecordInterface& params);
139 
141 
142 
143 
144  //
145  // Global methods (services)
146  //
147  static void makeConjPolAxis(casacore::CoordinateSystem& cs, casacore::Int conjStokes_in=-1);
149  const casacore::Int& ySupport, const casacore::Float& sampling);
153  casacore::Int& ySupport,const casacore::Float& sampling, const casacore::Complex& peak);
155  casacore::Int& ySupport, const casacore::Int& supportBuffer, const casacore::Float& sampling,
156  const casacore::Complex& peak);
157  static int getOversampling(PSTerm& psTerm, WTerm& wTerm, ATerm& aTerm);
159  {if (name=="ATerm") return aTerm_p; else return NULL;}
160 
161 
165 
166  protected:
172  casacore::Bool reset=true);
174 
175 
180  };
181  //
182  //-------------------------------------------------------------------------------------------
183  //
184 };
185 #endif
casacore::Bool makeAverageResponse_org(const VisBuffer &vb, const casacore::ImageInterface< casacore::Complex > &image, casacore::ImageInterface< casacore::Float > &theavgPB, casacore::Bool reset=true)
static casacore::Complex cfArea(casacore::Matrix< casacore::Complex > &cf, const casacore::Int &xSupport, const casacore::Int &ySupport, const casacore::Float &sampling)
int Int
Definition: aipstype.h:50
static void makeConjPolAxis(casacore::CoordinateSystem &cs, casacore::Int conjStokes_in=-1)
Global methods (services)
casacore::Vector< casacore::Double > pixFieldGrad_p
Definition: AWConvFunc.h:176
virtual void makeConvFunction(const casacore::ImageInterface< casacore::Complex > &image, const VisBuffer &vb, const casacore::Int wConvSize, const casacore::CountedPtr< PolOuterProduct > &pop, const casacore::Float pa, const casacore::Float dpa, const casacore::Vector< casacore::Double > &uvScale, const casacore::Vector< casacore::Double > &uvOffset, const casacore::Matrix< casacore::Double > &vbFreqSelection, CFStore2 &cfs, CFStore2 &cfwts, casacore::Bool fillCF=true)
This method computes the convolution function and the convolution function used for gridding the weig...
virtual void reset()
Overrides PlotTool::reset().
static casacore::Bool setUpCFSupport(casacore::Array< casacore::Complex > &func, casacore::Int &xSupport, casacore::Int &ySupport, const casacore::Float &sampling, const casacore::Complex &peak)
static casacore::Bool awFindSupport(casacore::Array< casacore::Complex > &func, casacore::Float &threshold, casacore::Int &origin, casacore::Int &radius)
virtual void setMiscInfo(const casacore::RecordInterface &params)
virtual casacore::Bool makeAverageResponse(const VisBuffer &vb, const casacore::ImageInterface< casacore::Complex > &image, casacore::ImageInterface< casacore::Float > &theavgPB, casacore::Bool reset=true)
This method computes the average response function.
virtual casacore::Bool findSupport(casacore::Array< casacore::Complex > &func, casacore::Float &threshold, casacore::Int &origin, casacore::Int &R)
virtual void setFeedStokes(const casacore::Vector&lt;casacore::Int&gt;&amp; feedStokes) {aTerm_p-&gt;setFeedStokes...
casacore::CountedPtr< PSTerm > psTerm_p
Definition: AWConvFunc.h:163
A 2-D Specialization of the Array class.
The base class to compute convolution functions for convolutional gridding.
casacore::Int mapAntIDToAntType(const casacore::Int &ant)
Definition: AWConvFunc.h:131
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::Double imRefFreq_p
Definition: AWConvFunc.h:177
A class to apply the W-Term to the given image.
Definition: PSTerm.h:55
static casacore::Bool resizeCF(casacore::Array< casacore::Complex > &func, casacore::Int &xSupport, casacore::Int &ySupport, const casacore::Int &supportBuffer, const casacore::Float &sampling, const casacore::Complex &peak)
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
static void makeConvFunction2(const casacore::String &uvGridDiskimage, const casacore::Vector< casacore::Double > &uvScale, const casacore::Vector< casacore::Double > &uvOffset, const casacore::Matrix< casacore::Double > &vbFreqSelection, CFStore2 &cfs, CFStore2 &cfwts, const casacore::Bool psTermOn, const casacore::Bool aTermOn, const casacore::Bool conjBeams)
A base class for astronomical images.
double Double
Definition: aipstype.h:55
static int getOversampling(PSTerm &psTerm, WTerm &wTerm, ATerm &aTerm)
virtual casacore::Matrix< casacore::Double > getFreqRangePerSpw(const VisBuffer &vb)
virtual casacore::Vector< casacore::Double > findPointingOffset(const casacore::ImageInterface< casacore::Complex > &, const VisBuffer &)
Definition: AWConvFunc.h:126
void normalizeAvgPB(casacore::ImageInterface< casacore::Complex > &inImage, casacore::ImageInterface< casacore::Float > &outImage)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
float Float
Definition: aipstype.h:54
virtual casacore::Vector< casacore::Double > makeFreqValList(casacore::Double &freqScale, const VisBuffer &vb, const casacore::ImageInterface< casacore::Complex > &uvGrid, casacore::Vector< String > &bandNames)
virtual Origin origin() const =0
ABSTRACT METHODS //.
A class to apply the W-Term to the given image.
Definition: WTerm.h:54
void makePBSq(casacore::ImageInterface< casacore::Complex > &inImage)
casacore::CountedPtr< ATerm > aTerm_p
Definition: AWConvFunc.h:162
AWConvFunc(const casacore::CountedPtr< ATerm > ATerm, const casacore::CountedPtr< PSTerm > psTerm, const casacore::CountedPtr< WTerm > wTerm, const casacore::Bool wbAWP=false, const casacore::Bool conjPB=casacore::True)
virtual void setPolMap(const casacore::Vector< casacore::Int > &polMap)
Definition: AWConvFunc.h:121
virtual void prepareConvFunction(const VisBuffer &vb, VBRow2CFBMapType &cfs)
virtual void setParams(const casacore::Vector&lt;casacore::Int&gt;&amp; polMap, const casacore::Vector&lt;casacore...
The base class to represent the Aperture-Term of the Measurement Equation.
Definition: ATerm.h:63
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Bool conjPB_p
Definition: AWConvFunc.h:178
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
casacore::CountedPtr< WTerm > wTerm_p
Definition: AWConvFunc.h:164
Abstract base class for Record classes.
static void fillConvFuncBuffer2(CFBuffer &cfb, CFBuffer &cfWtb, const casacore::Int &nx, const casacore::Int &ny, const casacore::ImageInterface< casacore::Complex > &skyImage, const CFCStruct &miscInfo, PSTerm &psTerm, WTerm &wTerm, ATerm &aTerm, casacore::Bool conjPB)
casacore::Vector< casacore::Double > thePix_p
Definition: AWConvFunc.h:176
virtual casacore::Vector< casacore::Double > makeWValList(const casacore::Double &dW, const casacore::Int &nW)
const Bool True
Definition: aipstype.h:43
AWConvFunc & operator=(const AWConvFunc &other)
casacore::CountedPtr< CFBuffer > baseCFB_p
Definition: AWConvFunc.h:179
virtual casacore::CountedPtr< CFTerms > getTerm(const casacore::String &name)
Definition: AWConvFunc.h:158
Interconvert pixel and world coordinates.
virtual int getVisParams(const VisBuffer &vb, const casacore::CoordinateSystem &skyCoord=casacore::CoordinateSystem())
A support function which, for now, returns and integer ID corresponding to the on-sky frequency of th...
Definition: AWConvFunc.h:118
casacore::Bool wbAWP_p
Definition: AWConvFunc.h:178
virtual void fillConvFuncBuffer(CFBuffer &cfb, CFBuffer &cfWtb, const casacore::Int &nx, const casacore::Int &ny, const casacore::Vector< casacore::Double > &freqValues, const casacore::Vector< casacore::Double > &wValues, const casacore::Double &wScale, const casacore::Double &vbPA, const casacore::Double &freqHi, const PolMapType &muellerElements, const PolMapType &muellerElementsIndex, const VisBuffer &vb, const casacore::Float &psScale, PSTerm &psTerm, WTerm &wTerm, ATerm &aTerm, casacore::Bool isDryRun=false)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42