casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HetArrayConvFunc.h
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 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 General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU 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 #ifndef SYNTHESIS_TRANSFORM2_HETARRAYCONVFUNC_H
29 #define SYNTHESIS_TRANSFORM2_HETARRAYCONVFUNC_H
30 
32 
33 namespace casacore{
34 
35  template<class T> class ImageInterface;
36  template<class T> class Matrix;
37 }
38 
39 namespace casa {
40 
41  // <summary> A class to support FTMachines get their convolution casacore::Function </summary>
42 
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  namespace vi{class VisBuffer2;}
60  namespace refim{
61 
63 
64  {
65  public:
68  typeToUse, const casacore::String vpTable="");
69  //Constructor from record
70  //if for prediction only no need to recover fluxscale
72  virtual ~HetArrayConvFunc();
73 
74  //Returns the convfunctions in the Arrays...the rowMap maps the vb.row
75  //to the plane of the convfunc appropriate...chanMap and polMap similarly
76 
78  const vi::VisBuffer2& vb,
79  const casacore::Int& convSampling,
82  casacore::Array<casacore::Complex>& weightConvFunc,
86  const casacore::Bool getConjConvFuncs=false,
87  const casacore::MVDirection& extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False
88  );
89 
91  // slice flux scale images
92  virtual void sliceFluxScale(const casacore::Int npol);
93  //Serialization
95  virtual casacore::Bool fromRecord(casacore::String& err, const casacore::RecordInterface& rec, casacore::Bool calcFluxscale=false);
96  virtual void reset();
97  virtual casacore::String name() {return casacore::String("HetArrayConvFunc");}
98  //----------------------------------------------
99 
100  private:
101  void applyGradientToYLine(const casacore::Int iy, casacore::Complex*& convFunctions,
102  casacore::Complex*& convWeights, const casacore::Double pixXdir, const casacore::Double pixYdir,
103  casacore::Int convSize, const casacore::Int ndishpair, const casacore::Int nchan, const casacore::Int nPol);
107  // the return value are -1 or false for not in cache yet but pointing direction
108  //seems to be inside image
109  // 1 if value is cached..we have stopped caching..so it should not return this value
110  // 2 pointing is off image ...thus valid but not useful
112  void findAntennaSizes(const vi::VisBuffer2& vb);
113  void supportAndNormalize(casacore::Int plane, casacore::Int convSampling);
115  casacore::TempLattice<casacore::Complex>& weightConvFuncLat);
116  void init(const PBMathInterface::PBClass typeToUse);
123  //std::map <casacore::String, casacore::Int> convFunctionMap_p;
126  std::map<casacore::String, casacore::Int> antDiam2IndexMap_p;
143 
144  };
145 }; //end of namespace refim
146 } // end namespace casa
147 #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
casacore::Array< casacore::Complex > convSave_p
casacore::Matrix< casacore::Complex > resample2(const casacore::Matrix< casacore::Complex > &inarray, const casacore::Double factor)
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)
casacore::Array< casacore::Complex > weightSave_p
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 factorial(casacore::Int n)
void init(const PBMathInterface::PBClass typeToUse)
casacore::Block< casacore::CountedPtr< casacore::Array< casacore::Complex > > > convFunctionsConjFreq_p
void supportAndNormalize(casacore::Int plane, casacore::Int convSampling)
PBClass
Allowed PBMath Classes.
virtual casacore::String name()
PBMathInterface::PBClass pbClass_p
casacore::Int conjSupport(const casacore::Vector< casacore::Double > &beamFreqs)
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
casacore::Vector< casacore::Int64 > convFunctionMap_p
std::map &lt;casacore::String, casacore::Int&gt; convFunctionMap_p;
std::map< casacore::String, casacore::Int > antDiam2IndexMap_p
casacore::Float sinc(const casacore::Float x)
casacore::Vector< casacore::Int > convSupport_p
virtual casacore::Bool toRecord(casacore::RecordInterface &rec)
Serialization.
void makerowmap(const vi::VisBuffer2 &vb, casacore::Vector< casacore::Int > &rowMap)
double Double
Definition: aipstype.h:55
casacore::Vector< casacore::Int > antIndexToDiamIndex_p
virtual void reset()
give possibility to erase history
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void supportAndNormalizeLatt(casacore::Int plane, casacore::Int convSampling, casacore::TempLattice< casacore::Complex > &convFuncLat, casacore::TempLattice< casacore::Complex > &weightConvFuncLat)
casacore::Int checkPBOfField(const vi::VisBuffer2 &vb, casacore::Vector< casacore::Int > &rowMap, const casacore::MVDirection &extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False)
the return value are -1 or false for not in cache yet but pointing direction seems to be inside ima...
float Float
Definition: aipstype.h:54
casacore::Array< casacore::Complex > weightConvFunc_p
const Bool False
Definition: aipstype.h:44
void findAntennaSizes(const vi::VisBuffer2 &vb)
casacore::Block< casacore::CountedPtr< casacore::Array< casacore::Complex > > > convWeights_p
simple 1-D array
casacore::Array< casacore::Complex > convFunc_p
casacore::Block< casacore::CountedPtr< casacore::Vector< casacore::Int > > > convSizes_p
virtual casacore::ImageInterface< casacore::Float > & getFluxScaleImage()
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
virtual void findConvFunction(const casacore::ImageInterface< casacore::Complex > &iimage, const vi::VisBuffer2 &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 getConjConvFuncs=false, const casacore::MVDirection &extraShift=casacore::MVDirection(0.0), const casacore::Bool useExtraShift=casacore::False)
Returns the convfunctions in the Arrays...the rowMap maps the vb.row to the plane of the convfunc app...
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Vector of three direction cosines.
Definition: MVDirection.h:106
Abstract base class for Record classes.
casacore::Array< casacore::Complex > resample(const casacore::Array< casacore::Complex > &inarray, const casacore::Double factor)
virtual void sliceFluxScale(const casacore::Int npol)
slice flux scale images
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.
void fillConjConvFunc(const casacore::Vector< casacore::Double > &beamFreqs)
casacore::Block< casacore::CountedPtr< casacore::Vector< casacore::Int > > > convSupportBlock_p
casacore::Block< casacore::CountedPtr< PBMathInterface > > antMath_p
casacore::Block< casacore::CountedPtr< casacore::Array< casacore::Complex > > > convFunctions_p
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42