Line data Source code
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: casa-feedback@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 <casacore/casa/Exceptions.h>
33 : #include <synthesis/TransformMachines2/TabulatedConvFunc.h>
34 : #include <synthesis/MeasurementComponents/ExpCache.h>
35 : #include <synthesis/MeasurementComponents/CExp.new3.h>
36 : #include <synthesis/TransformMachines2/PolOuterProduct.h>
37 : #include <synthesis/TransformMachines2/VB2CFBMap.h>
38 : using namespace casa::vi;
39 : namespace casa{
40 : namespace refim{
41 : class IlluminationConvFunc: public TabulatedConvFunc
42 : {
43 : public:
44 5 : IlluminationConvFunc():
45 5 : TabulatedConvFunc(), ExpTable(), CExpTable(),sigma(0), pa_p(0)
46 5 : {expTableReady=cexpTableReady=sigmaReady=false;pa_p=1000.0;};
47 : IlluminationConvFunc(casacore::Int n):
48 : TabulatedConvFunc(n), ExpTable(), CExpTable(),sigma(0), pa_p(0)
49 : {expTableReady=cexpTableReady=sigmaReady=false;pa_p=1000.0;};
50 5 : ~IlluminationConvFunc() {};
51 :
52 : IlluminationConvFunc& operator=(const IlluminationConvFunc& /*other*/)
53 : {
54 : return *this;
55 : }
56 : IlluminationConvFunc& operator=(const ConvolutionFunction& /*other*/)
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 :
66 : CF_TYPE area(casacore::Vector<casacore::Int>& convSupport, casacore::Vector<casacore::Double>& uvScale);
67 : casacore::Vector<casacore::Int> supportSize(casacore::Vector<casacore::Double>& uvScale);
68 :
69 0 : CF_TYPE getValue(casacore::Vector<CF_TYPE>& coord, casacore::Vector<CF_TYPE>& offset)
70 : {
71 : (void)coord;(void)offset;
72 0 : 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 : );
86 0 : int getVisParams(const VisBuffer2& vb, const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem())
87 0 : {(void)vb;(void)skyCoord;return 0;};
88 0 : void makeConvFunction(const casacore::ImageInterface<std::complex<float> >&,
89 : const VisBuffer2&, casacore::Int,
90 : const casacore::CountedPtr<PolOuterProduct>& ,//pop,
91 : casacore::Float, casacore::Float,
92 : const casacore::Vector<casacore::Double>& /*uvScale*/, const casacore::Vector<casacore::Double>& /*uvOffset*/,
93 : const casacore::Matrix<casacore::Double>& /*freqSelection*/,
94 0 : CFStore2&, CFStore2&, casacore::Bool /*fillCF=true*/ ) {};
95 0 : 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 :
100 0 : casacore::Bool findSupport(casacore::Array<casacore::Complex>&, casacore::Float& ,casacore::Int&, casacore::Int&)
101 0 : {throw(casacore::AipsError("IlluminationConvFunc::findSupport() not implemented"));};
102 0 : virtual casacore::Vector<casacore::Double> findPointingOffset(const casacore::ImageInterface<casacore::Complex>& /*image*/,
103 : const VisBuffer2& /*vb*/)
104 0 : {throw(casacore::AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
105 : //virtual void prepareConvFunction(const VisBuffer2& /*vb*/, VBRow2CFBMapType& /*theMap*/)
106 0 : virtual void prepareConvFunction(const VisBuffer2& /*vb*/, VB2CFBMap& /*theMap*/)
107 0 : {throw(casacore::AipsError("IlluminationConvFunc::prepareConvFunction() not implemented"));};
108 :
109 0 : virtual casacore::Bool makeAverageResponse(const VisBuffer2&,
110 : const casacore::ImageInterface<casacore::Complex>&,
111 : casacore::ImageInterface<casacore::Float>&,
112 : casacore::Bool)
113 0 : {throw(casacore::AipsError("IlluminationConvFunc::makeAverageRes() called"));};
114 :
115 0 : virtual casacore::Bool makeAverageResponse(const VisBuffer2&,
116 : const casacore::ImageInterface<casacore::Complex>&,
117 : casacore::ImageInterface<casacore::Complex>&,
118 : casacore::Bool)
119 0 : {throw(casacore::AipsError("IlluminationConvFunc::makeAverageRes() called"));};
120 :
121 :
122 : // virtual casacore::Vector< casacore::Vector<casacore::Double> > findPointingOffset(const casacore::ImageInterface<casacore::Complex>& /*image*/,
123 : // const VisBuffer2& /*vb*/, const casacore::Bool& /*doPointing*/)
124 : // {throw(casacore::AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
125 :
126 : private:
127 : ExpCache<CF_TYPE> ExpTable;
128 : CExp3<CF_TYPE> CExpTable;
129 : casacore::Double sigma, pa_p;
130 : casacore::Bool expTableReady,cexpTableReady,sigmaReady;
131 : };
132 : };
133 : };
134 : #endif
|