ConvolutionFunction.h
Go to the documentation of this file.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_CONVOLUTIONFUNCTION_H
00030 #define SYNTHESIS_TRANSFORM2_CONVOLUTIONFUNCTION_H
00031
00032 #include <synthesis/TransformMachines2/CFTerms.h>
00033 #include <synthesis/TransformMachines2/CFStore.h>
00034 #include <synthesis/TransformMachines2/CFStore2.h>
00035 #include <synthesis/TransformMachines2/PolOuterProduct.h>
00036 #include <synthesis/TransformMachines2/Utils.h>
00037 #include <images/Images/ImageInterface.h>
00038 #include <images/Images/TempImage.h>
00039 #include <casa/Logging/LogOrigin.h>
00040 #include <casa/Logging/LogSink.h>
00041 #include <casa/Logging/LogIO.h>
00042 #include <casa/Arrays/Vector.h>
00043 #define CF_TYPE Double
00044
00045 namespace casa{
00046 namespace refim{
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 class ConvolutionFunction
00079 {
00080 public:
00081 ConvolutionFunction():
00082 nDim(2),logIO_p(), spwChanSelFlag_p(), spwFreqSelection_p(),
00083 computeCFAngleRad_p(360.0*M_PI/180.0), rotateCFOTFAngleRad_p(0.1)
00084 {};
00085 ConvolutionFunction(Int dim):
00086 nDim(dim),logIO_p(), spwChanSelFlag_p(), spwFreqSelection_p(),
00087 computeCFAngleRad_p(360.0*M_PI/180.0), rotateCFOTFAngleRad_p(0.1)
00088 {nDim=dim;};
00089 virtual ~ConvolutionFunction();
00090
00091
00092 virtual void setDimension(Int n){nDim = n;};
00093
00094
00095
00096
00097
00098 virtual CF_TYPE getValue(Vector<CF_TYPE>& , Vector<CF_TYPE>& ) {return 0.0;};
00099
00100
00101
00102 virtual int getVisParams(const VisBuffer2& vb,const CoordinateSystem& skyCoord=CoordinateSystem())=0;
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 virtual void makeConvFunction(const ImageInterface<Complex>& image,
00113 const VisBuffer2& vb,
00114 const Int wConvSize,
00115 const CountedPtr<PolOuterProduct>& pop,
00116 const Float pa,
00117 const Float dpa,
00118 const Vector<Double>& uvScale, const Vector<Double>& uvOffset,
00119 const Matrix<Double>& vbFreqSelection,
00120 CFStore2& cfs,
00121 CFStore2& cfwts,
00122 Bool fillCF=True) = 0;
00123
00124
00125
00126
00127 virtual Bool makeAverageResponse(const VisBuffer2& vb,
00128 const ImageInterface<Complex>& image,
00129 ImageInterface<Float>& theavgPB,
00130 Bool reset=True) = 0;
00131 virtual Bool makeAverageResponse(const VisBuffer2& vb,
00132 const ImageInterface<Complex>& image,
00133 ImageInterface<Complex>& theavgPB,
00134 Bool reset=True) = 0;
00135
00136
00137 virtual void setPolMap(const Vector<Int>& polMap) = 0;
00138 virtual void setSpwSelection(const Cube<Int>& spwChanSelFlag) {spwChanSelFlag_p.assign(spwChanSelFlag);}
00139 virtual void setSpwFreqSelection(const Matrix<Double>& spwFreqSel) {spwFreqSelection_p.assign(spwFreqSel);}
00140 virtual void setRotateCF(const Double& computeCFAngleRad, const Double& rotateOTF)
00141 {computeCFAngleRad_p=computeCFAngleRad; rotateCFOTFAngleRad_p = rotateOTF;};
00142
00143
00144 virtual Bool findSupport(Array<Complex>& func, Float& threshold,Int& origin, Int& R)=0;
00145 virtual Vector<Double> findPointingOffset(const ImageInterface<Complex>& image,
00146 const VisBuffer2& vb) = 0;
00147
00148
00149
00150
00151
00152 virtual void prepareConvFunction(const VisBuffer2& vb, VBRow2CFBMapType& theMap)=0;
00153 virtual Matrix<Int> makeBaselineList(const Vector<Int>& antList);
00154 virtual Int mapAntIDToAntType(const Int& ) {return 0;};
00155 virtual void setMiscInfo(const RecordInterface& ) {};
00156 virtual CountedPtr<CFTerms> getTerm(const String& ) {return NULL;}
00157 private:
00158 Int nDim;
00159 protected:
00160 LogIO& logIO() {return logIO_p;}
00161 LogIO logIO_p;
00162 Cube<Int> spwChanSelFlag_p;
00163 Matrix<Double> spwFreqSelection_p;
00164 Double computeCFAngleRad_p, rotateCFOTFAngleRad_p;
00165 };
00166 };
00167 };
00168
00169 #endif