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_ILLUMINATIONCONVFUNC_H
30 : #define SYNTHESIS_ILLUMINATIONCONVFUNC_H
31 :
32 : #include <casacore/casa/Exceptions.h>
33 : #include <synthesis/MeasurementComponents/TabulatedConvFunc.h>
34 : #include <synthesis/MeasurementComponents/ExpCache.h>
35 : #include <synthesis/MeasurementComponents/CExp.new3.h>
36 : #include <synthesis/TransformMachines/PolOuterProduct.h>
37 :
38 : namespace casa{
39 :
40 : class IlluminationConvFunc: public TabulatedConvFunc
41 : {
42 : public:
43 24 : IlluminationConvFunc(): TabulatedConvFunc()
44 24 : {expTableReady=cexpTableReady=sigmaReady=false;pa_p=1000.0;};
45 : IlluminationConvFunc(casacore::Int n): TabulatedConvFunc(n)
46 : {expTableReady=cexpTableReady=sigmaReady=false;pa_p=1000.0;};
47 24 : ~IlluminationConvFunc() {};
48 :
49 : IlluminationConvFunc& operator=(const IlluminationConvFunc& /*other*/)
50 : {
51 : return *this;
52 : }
53 : IlluminationConvFunc& operator=(const ConvolutionFunction& /*other*/)
54 : {
55 : return *this;
56 : }
57 : void initExpTable(casacore::Int n, CF_TYPE step) {ExpTable.build(n,step);expTableReady=true;};
58 : void initCExpTable(casacore::Int n) {CExpTable.build(n);cexpTableReady=true;};
59 0 : void setSigma(casacore::Double s) {sigma = s;sigmaReady=true;}
60 :
61 : casacore::Bool isReady() {return (expTableReady & cexpTableReady & sigmaReady);}
62 :
63 : CF_TYPE area(casacore::Vector<casacore::Int>& convSupport, casacore::Vector<casacore::Double>& uvScale);
64 : casacore::Vector<casacore::Int> supportSize(casacore::Vector<casacore::Double>& uvScale);
65 :
66 0 : CF_TYPE getValue(casacore::Vector<CF_TYPE>& coord, casacore::Vector<CF_TYPE>& offset)
67 : {
68 : (void)coord;(void)offset;
69 0 : throw(casacore::AipsError("This version of IlluminationConvFunc::getValue() is not useful."));
70 : return 0;
71 : };
72 : virtual CF_TYPE getValue(casacore::Double *coord,
73 : casacore::Double *raoff1, casacore::Double *raoff2,
74 : casacore::Double *decoff1, casacore::Double *decoff2,
75 : casacore::Double *area,
76 : casacore::Int *doGrad,
77 : casacore::Complex& weight,
78 : casacore::Complex& dweight1,
79 : casacore::Complex& dweight2,
80 : casacore::Double& currentCFPA
81 : // ,casacore::Double lsigma
82 : );
83 0 : int getVisParams(const casa::VisBuffer& vb, const casacore::CoordinateSystem& skyCoord=casacore::CoordinateSystem())
84 0 : {(void)vb;(void)skyCoord;return 0;};
85 0 : void makeConvFunction(const casacore::ImageInterface<std::complex<float> >&,
86 : const casa::VisBuffer&, casacore::Int,
87 : const casacore::CountedPtr<PolOuterProduct>& ,//pop,
88 : casacore::Float, casacore::Float,
89 : const casacore::Vector<casacore::Double>& /*uvScale*/, const casacore::Vector<casacore::Double>& /*uvOffset*/,
90 : const casacore::Matrix<casacore::Double>& /*freqSelection*/,
91 0 : casa::CFStore2&, casa::CFStore2&, casacore::Bool /*fillCF=true*/ ) {};
92 0 : void setPolMap(const casacore::Vector<int>&polMap) {(void)polMap;};
93 : void setFeedStokes(const casacore::Vector<int>&feedStokes) {(void)feedStokes;};
94 : void setParams(const casacore::Vector<int>& polMap, const casacore::Vector<int>& feedStokes)
95 : {(void)polMap;(void)feedStokes;};
96 :
97 0 : casacore::Bool findSupport(casacore::Array<casacore::Complex>&, casacore::Float& ,casacore::Int&, casacore::Int&)
98 0 : {throw(casacore::AipsError("IlluminationConvFunc::findSupport() not implemented"));};
99 0 : virtual casacore::Vector<casacore::Double> findPointingOffset(const casacore::ImageInterface<casacore::Complex>& /*image*/,
100 : const VisBuffer& /*vb*/)
101 0 : {throw(casacore::AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
102 0 : virtual void prepareConvFunction(const VisBuffer& /*vb*/, VBRow2CFBMapType& /*theMap*/)
103 0 : {throw(casacore::AipsError("IlluminationConvFunc::prepareConvFunction() not implemented"));};
104 :
105 0 : virtual casacore::Bool makeAverageResponse(const VisBuffer&,
106 : const casacore::ImageInterface<casacore::Complex>&,
107 : casacore::ImageInterface<casacore::Float>&,
108 : casacore::Bool)
109 0 : {throw(casacore::AipsError("IlluminationConvFunc::makeAverageRes() called"));};
110 :
111 0 : virtual casacore::Bool makeAverageResponse(const VisBuffer&,
112 : const casacore::ImageInterface<casacore::Complex>&,
113 : casacore::ImageInterface<casacore::Complex>&,
114 : casacore::Bool)
115 0 : {throw(casacore::AipsError("IlluminationConvFunc::makeAverageRes() called"));};
116 :
117 :
118 : private:
119 : ExpCache<CF_TYPE> ExpTable;
120 : CExp3<CF_TYPE> CExpTable;
121 : casacore::Double sigma, pa_p;
122 : casacore::Bool expTableReady,cexpTableReady,sigmaReady;
123 : };
124 :
125 : };
126 : #endif
|