casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Go to the documentation of this file.
1 //# HetArrayConvFunc.h: Definition for HetArrayConvFunc
2 //# Copyright (C) 2008
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:
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$
33 namespace casacore{
35  template<class T> class ImageInterface;
36  template<class T> class Matrix;
37 }
39 namespace casa{
41  // <summary> A class to support FTMachines get their convolution casacore::Function </summary>
43  // <use visibility=export>
44  // <prerequisite>
45  // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
46  // </prerequisite>
47  // <etymology>
48  // "HetArray" for Heterogeneous casacore::Array => different dish sizes
49  // "ConvFunc" for Convolution Functions
50  // appropriate convfunctions for each pair of antenna generated and cached
51  // </etymology>
52  //
53  // <synopsis>
54  // FTMachines like WProjection and MosaicFT need convolution functions to
55  // deal with directional dependent issues...
56  // this class and related ones provide and cache such functions for re-use
57  //</synopsis>
58  //Forward declarations
59  class VisBuffer;
60  class MosaicFT;
63  {
64  public:
67  typeToUse, const casacore::String vpTable="");
68  //Constructor from record
69  //if for prediction only no need to recover fluxscale
71  virtual ~HetArrayConvFunc();
73  //Returns the convfunctions in the Arrays...the rowMap maps the vb.row
74  //to the plane of the convfunc appropriate...chanMap and polMap similarly
77  const VisBuffer& vb,
78  const casacore::Int& convSampling,
81  casacore::Array<casacore::Complex>& weightConvFunc,
88  // slice flux scale images
89  virtual void sliceFluxScale(const casacore::Int npol);
90  //Serialization
92  virtual casacore::Bool fromRecord(casacore::String& err, const casacore::RecordInterface& rec, casacore::Bool calcFluxscale=false);
93  virtual void reset();
94  virtual casacore::String name() {return casacore::String("HetArrayConvFunc");}
95  //----------------------------------------------
97  private:
98  void applyGradientToYLine(const casacore::Int iy, casacore::Complex*& convFunctions,
99  casacore::Complex*& convWeights, const casacore::Double pixXdir, const casacore::Double pixYdir,
100  casacore::Int convSize, const casacore::Int ndishpair, const casacore::Int nchan, const casacore::Int nPol);
102  // the return value are -1 or false for not in cache yet but pointing direction
103  //seems to be inside image
104  // 1 if value is cached..we have stopped it should not return this value
105  // 2 pointing is off image ...thus valid but not useful
107  void findAntennaSizes(const VisBuffer& vb);
108  void supportAndNormalize(casacore::Int plane, casacore::Int convSampling);
110  casacore::TempLattice<casacore::Complex>& weightConvFuncLat);
111  void init(const PBMathInterface::PBClass typeToUse);
112  void makerowmap(const VisBuffer& vb, casacore::Vector<casacore::Int>& rowMap);
117  //std::map <casacore::String, casacore::Int> convFunctionMap_p;
120  std::map <casacore::String, casacore::Int> antDiam2IndexMap_p;
137  };
139 } // end namespace casa
140 #endif
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
int Int
Definition: aipstype.h:50
void supportAndNormalizeLatt(casacore::Int plane, casacore::Int convSampling, casacore::TempLattice< casacore::Complex > &convFuncLat, casacore::TempLattice< casacore::Complex > &weightConvFuncLat)
void applyGradientToYLine(const casacore::Int iy, casacore::Complex *&convFunctions, casacore::Complex *&convWeights, const casacore::Double pixXdir, const casacore::Double pixYdir, casacore::Int convSize, const casacore::Int ndishpair, const casacore::Int nchan, const casacore::Int nPol)
casacore::Int checkPBOfField(const VisBuffer &vb, casacore::Vector< casacore::Int > &rowMap)
the return value are -1 or false for not in cache yet but pointing direction seems to be inside ima...
casacore::Float interpLanczos(const casacore::Double &x, const casacore::Double &y, const casacore::Double &nx, const casacore::Double &ny, const casacore::Float *data, const casacore::Float a=3)
void supportAndNormalize(casacore::Int plane, casacore::Int convSampling)
casacore::Int factorial(casacore::Int n)
casacore::Array< casacore::Complex > weightConvFunc_p
casacore::Int64 nDefined_p
casacore::Array< casacore::Complex > resample(const casacore::Array< casacore::Complex > &inarray, const casacore::Double factor)
casacore::Array< casacore::Complex > convFunc_p
A 2-D Specialization of the Array class.
virtual casacore::String name()
virtual casacore::Bool fromRecord(casacore::String &err, const casacore::RecordInterface &rec, casacore::Bool calcFluxscale=false)
From record set calcfluxneeded to true if flux scale need to be computed.
Allowed PBMath Classes.
std::map< casacore::String, casacore::Int > antDiam2IndexMap_p
casacore::Int actualConvIndex_p
casacore::Block< casacore::CountedPtr< casacore::Array< casacore::Complex > > > convFunctions_p
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
virtual void reset()
give possibility to erase history
virtual casacore::ImageInterface< casacore::Float > & getFluxScaleImage()
double Double
Definition: aipstype.h:55
casacore::Float sinc(const casacore::Float x)
Returns the convfunctions in the Cubes the casacore::Matrix rowChanMap maps the vb row and channel to the plane of the convfunc appropriate when conjugateFreqFuncs
virtual void findConvFunction(const casacore::ImageInterface< casacore::Complex > &iimage, const VisBuffer &vb, const casacore::Int &convSampling, const casacore::Vector< casacore::Double > &visFreq, casacore::Array< casacore::Complex > &convFunc, casacore::Array< casacore::Complex > &weightConvFunc, casacore::Vector< casacore::Int > &convsize, casacore::Vector< casacore::Int > &convSupport, casacore::Vector< casacore::Int > &polMap, casacore::Vector< casacore::Int > &chanMap, casacore::Vector< casacore::Int > &rowMap, const casacore::Bool conjugateFreqFuncs=false)
Returns the convfunctions in the Arrays...the rowMap maps the vb.row to the plane of the convfunc app...
casacore::Block< casacore::CountedPtr< casacore::Array< casacore::Complex > > > convWeights_p
casacore::Block< casacore::CountedPtr< casacore::Vector< casacore::Int > > > convSupportBlock_p
virtual casacore::Bool toRecord(casacore::RecordInterface &rec)
casacore::Block< casacore::CountedPtr< PBMathInterface > > antMath_p
casacore::Vector< casacore::Int > convSupport_p
void findAntennaSizes(const VisBuffer &vb)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Block< casacore::CountedPtr< casacore::Vector< casacore::Int > > > convSizes_p
casacore::Vector< casacore::Int64 > convFunctionMap_p
std::map &lt;casacore::String, casacore::Int&gt; convFunctionMap_p;
void makerowmap(const VisBuffer &vb, casacore::Vector< casacore::Int > &rowMap)
float Float
Definition: aipstype.h:54
simple 1-D array
casacore::Array< casacore::Complex > convSave_p
casacore::Vector< casacore::Int > antIndexToDiamIndex_p
casacore::Array< casacore::Complex > weightSave_p
void init(const PBMathInterface::PBClass typeToUse)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual void sliceFluxScale(const casacore::Int npol)
slice flux scale images
casacore::String vpTable_p
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
Abstract base class for Record classes.
PBMathInterface::PBClass pbClass_p
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42