00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SYNTHESIS_TRANSFORM2_ILLUMINATIONCONVFUNC_H
00030 #define SYNTHESIS_TRANSFORM2_ILLUMINATIONCONVFUNC_H
00031
00032 #include <casa/Exceptions.h>
00033 #include <synthesis/TransformMachines2/TabulatedConvFunc.h>
00034 #include <synthesis/MeasurementComponents/ExpCache.h>
00035 #include <synthesis/MeasurementComponents/CExp.new3.h>
00036 #include <synthesis/TransformMachines2/PolOuterProduct.h>
00037 using namespace casa::vi;
00038 namespace casa{
00039 namespace refim{
00040 class IlluminationConvFunc: public TabulatedConvFunc
00041 {
00042 public:
00043 IlluminationConvFunc():
00044 TabulatedConvFunc(), ExpTable(), CExpTable(),sigma(0), pa_p(0)
00045 {expTableReady=cexpTableReady=sigmaReady=False;pa_p=1000.0;};
00046 IlluminationConvFunc(Int n):
00047 TabulatedConvFunc(n), ExpTable(), CExpTable(),sigma(0), pa_p(0)
00048 {expTableReady=cexpTableReady=sigmaReady=False;pa_p=1000.0;};
00049 ~IlluminationConvFunc() {};
00050
00051 IlluminationConvFunc& operator=(const IlluminationConvFunc& )
00052 {
00053 return *this;
00054 }
00055 IlluminationConvFunc& operator=(const ConvolutionFunction& )
00056 {
00057 return *this;
00058 }
00059 void initExpTable(Int n, CF_TYPE step) {ExpTable.build(n,step);expTableReady=True;};
00060 void initCExpTable(Int n) {CExpTable.build(n);cexpTableReady=True;};
00061 void setSigma(Double s) {sigma = s;sigmaReady=True;}
00062
00063 Bool isReady() {return (expTableReady & cexpTableReady & sigmaReady);}
00064
00065 CF_TYPE area(Vector<Int>& convSupport, Vector<Double>& uvScale);
00066 Vector<Int> supportSize(Vector<Double>& uvScale);
00067
00068 CF_TYPE getValue(Vector<CF_TYPE>& coord, Vector<CF_TYPE>& offset)
00069 {
00070 (void)coord;(void)offset;
00071 throw(AipsError("This version of IlluminationConvFunc::getValue() is not useful."));
00072 return 0;
00073 };
00074 virtual CF_TYPE getValue(Double *coord,
00075 Double *raoff1, Double *raoff2,
00076 Double *decoff1, Double *decoff2,
00077 Double *area,
00078 Int *doGrad,
00079 Complex& weight,
00080 Complex& dweight1,
00081 Complex& dweight2,
00082 Double& currentCFPA
00083
00084 );
00085 int getVisParams(const VisBuffer2& vb, const CoordinateSystem& skyCoord=CoordinateSystem())
00086 {(void)vb;(void)skyCoord;return 0;};
00087 void makeConvFunction(const casa::ImageInterface<std::complex<float> >&,
00088 const VisBuffer2&, casa::Int,
00089 const CountedPtr<PolOuterProduct>& ,
00090 casa::Float, casa::Float,
00091 const Vector<Double>& , const Vector<Double>& ,
00092 const Matrix<Double>& ,
00093 CFStore2&, CFStore2&, Bool ) {};
00094 void setPolMap(const casa::Vector<int>&polMap) {(void)polMap;};
00095 void setFeedStokes(const casa::Vector<int>&feedStokes) {(void)feedStokes;};
00096 void setParams(const casa::Vector<int>& polMap, const casa::Vector<int>& feedStokes)
00097 {(void)polMap;(void)feedStokes;};
00098
00099 Bool findSupport(Array<Complex>&, Float& ,Int&, Int&)
00100 {throw(AipsError("IlluminationConvFunc::findSupport() not implemented"));};
00101 virtual Vector<Double> findPointingOffset(const ImageInterface<Complex>& ,
00102 const VisBuffer2& )
00103 {throw(AipsError("IlluminationConvFunc::findPointingOffset() not implemented"));};
00104 virtual void prepareConvFunction(const VisBuffer2& , VBRow2CFBMapType& )
00105 {throw(AipsError("IlluminationConvFunc::prepareConvFunction() not implemented"));};
00106
00107 virtual Bool makeAverageResponse(const VisBuffer2&,
00108 const ImageInterface<Complex>&,
00109 ImageInterface<Float>&,
00110 Bool)
00111 {throw(AipsError("IlluminationConvFunc::makeAverageRes() called"));};
00112
00113 virtual Bool makeAverageResponse(const VisBuffer2&,
00114 const ImageInterface<Complex>&,
00115 ImageInterface<Complex>&,
00116 Bool)
00117 {throw(AipsError("IlluminationConvFunc::makeAverageRes() called"));};
00118
00119
00120 private:
00121 ExpCache<CF_TYPE> ExpTable;
00122 CExp3<CF_TYPE> CExpTable;
00123 Double sigma, pa_p;
00124 Bool expTableReady,cexpTableReady,sigmaReady;
00125 };
00126 };
00127 };
00128 #endif