casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IlluminationConvFunc.h
Go to the documentation of this file.
1 //# IlluminationConvFunc.h: Definition for IlluminationConvFunc
2 //# Copyright (C) 1996,1997,1998,1999,2000,2002
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_ILLUMINATIONCONVFUNC_H
30 #define SYNTHESIS_TRANSFORM2_ILLUMINATIONCONVFUNC_H
31 
32 #include <casa/Exceptions.h>
38 using namespace casa::vi;
39 namespace casa{
40  namespace refim{
42  {
43  public:
45  TabulatedConvFunc(), ExpTable(), CExpTable(),sigma(0), pa_p(0)
46  {expTableReady=cexpTableReady=sigmaReady=false;pa_p=1000.0;};
48  TabulatedConvFunc(n), ExpTable(), CExpTable(),sigma(0), pa_p(0)
49  {expTableReady=cexpTableReady=sigmaReady=false;pa_p=1000.0;};
51 
53  {
54  return *this;
55  }
57  {
58  return *this;
59  }
60  void initExpTable(casacore::Int n, CF_TYPE step) {ExpTable.build(n,step);expTableReady=true;};
61  void initCExpTable(casacore::Int n) {CExpTable.build(n);cexpTableReady=true;};
62  void setSigma(casacore::Double s) {sigma = s;sigmaReady=true;}
63 
64  casacore::Bool isReady() {return (expTableReady & cexpTableReady & sigmaReady);}
65 
68 
70  {
71  (void)coord;(void)offset;
72  throw(casacore::AipsError("This version of IlluminationConvFunc::getValue() is not useful."));
73  return 0;
74  };
75  virtual CF_TYPE getValue(casacore::Double *coord,
76  casacore::Double *raoff1, casacore::Double *raoff2,
77  casacore::Double *decoff1, casacore::Double *decoff2,
78  casacore::Double *area,
79  casacore::Int *doGrad,
80  casacore::Complex& weight,
81  casacore::Complex& dweight1,
82  casacore::Complex& dweight2,
83  casacore::Double& currentCFPA
84  // ,casacore::Double lsigma
85  );
87  {(void)vb;(void)skyCoord;return 0;};
88  void makeConvFunction(const casacore::ImageInterface<std::complex<float> >&,
89  const VisBuffer2&, casacore::Int,
92  const casacore::Vector<casacore::Double>& /*uvScale*/, const casacore::Vector<casacore::Double>& /*uvOffset*/,
93  const casacore::Matrix<casacore::Double>& /*freqSelection*/,
94  CFStore2&, CFStore2&, casacore::Bool /*fillCF=true*/ ) {};
95  void setPolMap(const casacore::Vector<int>&polMap) {(void)polMap;};
96  void setFeedStokes(const casacore::Vector<int>&feedStokes) {(void)feedStokes;};
97  void setParams(const casacore::Vector<int>& polMap, const casacore::Vector<int>& feedStokes)
98  {(void)polMap;(void)feedStokes;};
99 
101  {throw(casacore::AipsError("IlluminationConvFunc::findSupport() not implemented"));};
103  const VisBuffer2& /*vb*/)
104  {throw(casacore::AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
105  //virtual void prepareConvFunction(const VisBuffer2& /*vb*/, VBRow2CFBMapType& /*theMap*/)
106  virtual void prepareConvFunction(const VisBuffer2& /*vb*/, VB2CFBMap& /*theMap*/)
107  {throw(casacore::AipsError("IlluminationConvFunc::prepareConvFunction() not implemented"));};
108 
113  {throw(casacore::AipsError("IlluminationConvFunc::makeAverageRes() called"));};
114 
119  {throw(casacore::AipsError("IlluminationConvFunc::makeAverageRes() called"));};
120 
121 
123  const VisBuffer2& /*vb*/, const casacore::Bool& /*doPointing*/)
124  {throw(casacore::AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
125 
126  private:
127  ExpCache<CF_TYPE> ExpTable;
130  casacore::Bool expTableReady,cexpTableReady,sigmaReady;
131  };
132  };
133 };
134 #endif
virtual casacore::Vector< casacore::Double > findPointingOffset(const casacore::ImageInterface< casacore::Complex > &, const VisBuffer2 &)
int Int
Definition: aipstype.h:50
void setFeedStokes(const casacore::Vector< int > &feedStokes)
void initExpTable(casacore::Int n, CF_TYPE step)
The base class to compute convolution functions for convolutional gridding.
void makeConvFunction(const casacore::ImageInterface< std::complex< float > > &, const VisBuffer2 &, casacore::Int, const casacore::CountedPtr< PolOuterProduct > &, casacore::Float, casacore::Float, const casacore::Vector< casacore::Double > &, const casacore::Vector< casacore::Double > &, const casacore::Matrix< casacore::Double > &, CFStore2 &, CFStore2 &, casacore::Bool)
CF_TYPE getValue(casacore::Vector< CF_TYPE > &coord, casacore::Vector< CF_TYPE > &offset)
Given the pixel co-ordinates and an offset values, this returns the value of the convolution function...
virtual casacore::Bool makeAverageResponse(const VisBuffer2 &, const casacore::ImageInterface< casacore::Complex > &, casacore::ImageInterface< casacore::Float > &, casacore::Bool)
This method computes the average response function.
virtual casacore::Bool makeAverageResponse(const VisBuffer2 &, const casacore::ImageInterface< casacore::Complex > &, casacore::ImageInterface< casacore::Complex > &, casacore::Bool)
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
A base class for astronomical images.
IlluminationConvFunc & operator=(const IlluminationConvFunc &)
int getVisParams(const VisBuffer2 &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...
double Double
Definition: aipstype.h:55
virtual casacore::Vector< casacore::Vector< casacore::Double > > findPointingOffset(const casacore::ImageInterface< casacore::Complex > &, const VisBuffer2 &, const casacore::Bool &)
VBRow2CFBMapType &*virtual void prepareConvFunction(const VisBuffer2 &, VB2CFBMap &)
virtual void setParams(const casacore::Vector&lt;casacore::Int&gt;&amp; polMap, const casacore::Vector&lt;casacore...
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void setPolMap(const casacore::Vector< int > &polMap)
void setParams(const casacore::Vector< int > &polMap, const casacore::Vector< int > &feedStokes)
float Float
Definition: aipstype.h:54
IlluminationConvFunc & operator=(const ConvolutionFunction &)
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
Base class for all Casacore library errors.
Definition: Error.h:134
#define CF_TYPE
casacore::Bool findSupport(casacore::Array< casacore::Complex > &, casacore::Float &, casacore::Int &, casacore::Int &)
virtual void setFeedStokes(const casacore::Vector&lt;casacore::Int&gt;&amp; feedStokes) = 0; ...
Interconvert pixel and world coordinates.