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_CONVOLUTIONFUNCTION_H
00030 #define SYNTHESIS_CONVOLUTIONFUNCTION_H
00031
00032 #include <synthesis/TransformMachines/CFStore.h>
00033 #include <synthesis/TransformMachines/CFStore2.h>
00034 #include <synthesis/TransformMachines/CFTerms.h>
00035 #include <synthesis/TransformMachines/PolOuterProduct.h>
00036 #include <synthesis/TransformMachines/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
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 class ConvolutionFunction
00078 {
00079 public:
00080 ConvolutionFunction():logIO_p(), computeCFAngleRad_p(360.0*M_PI/180.0), rotateCFOTFAngleRad_p(0.1) {};
00081 ConvolutionFunction(Int dim): computeCFAngleRad_p(360.0*M_PI/180.0), rotateCFOTFAngleRad_p(0.1) {nDim=dim;};
00082 virtual ~ConvolutionFunction();
00083
00084
00085 virtual void setDimension(Int n){nDim = n;};
00086
00087
00088
00089
00090
00091 virtual CF_TYPE getValue(Vector<CF_TYPE>& , Vector<CF_TYPE>& ) {return 0.0;};
00092
00093
00094
00095 virtual int getVisParams(const VisBuffer& vb,const CoordinateSystem& skyCoord=CoordinateSystem())=0;
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 virtual void makeConvFunction(const ImageInterface<Complex>& image,
00106 const VisBuffer& vb,
00107 const Int wConvSize,
00108 const CountedPtr<PolOuterProduct>& pop,
00109 const Float pa,
00110 const Float dpa,
00111 const Vector<Double>& uvScale, const Vector<Double>& uvOffset,
00112 const Matrix<Double>& vbFreqSelection,
00113 CFStore2& cfs,
00114 CFStore2& cfwts,
00115 Bool fillCF=True) = 0;
00116
00117
00118
00119
00120 virtual Bool makeAverageResponse(const VisBuffer& vb,
00121 const ImageInterface<Complex>& image,
00122 ImageInterface<Float>& theavgPB,
00123 Bool reset=True) = 0;
00124 virtual Bool makeAverageResponse(const VisBuffer& vb,
00125 const ImageInterface<Complex>& image,
00126 ImageInterface<Complex>& theavgPB,
00127 Bool reset=True) = 0;
00128
00129
00130 virtual void setPolMap(const Vector<Int>& polMap) = 0;
00131 virtual void setSpwSelection(const Cube<Int>& spwChanSelFlag) {spwChanSelFlag_p.assign(spwChanSelFlag);}
00132 virtual void setSpwFreqSelection(const Matrix<Double>& spwFreqSel) {spwFreqSelection_p.assign(spwFreqSel);}
00133 virtual void setRotateCF(const Double& computeCFAngleRad, const Double& rotateOTF)
00134 {computeCFAngleRad_p=computeCFAngleRad; rotateCFOTFAngleRad_p = rotateOTF;};
00135
00136
00137 virtual Bool findSupport(Array<Complex>& func, Float& threshold,Int& origin, Int& R)=0;
00138 virtual Vector<Double> findPointingOffset(const ImageInterface<Complex>& image,
00139 const VisBuffer& vb) = 0;
00140
00141
00142
00143
00144
00145 virtual void prepareConvFunction(const VisBuffer& vb, VBRow2CFBMapType& theMap)=0;
00146 virtual Matrix<Int> makeBaselineList(const Vector<Int>& antList);
00147 virtual Int mapAntIDToAntType(const Int& ) {return 0;};
00148 virtual void setMiscInfo(const RecordInterface& ) {};
00149 virtual CountedPtr<CFTerms> getTerm(const String& ) {return NULL;}
00150 private:
00151 Int nDim;
00152 protected:
00153 LogIO& logIO() {return logIO_p;}
00154 LogIO logIO_p;
00155 Cube<Int> spwChanSelFlag_p;
00156 Matrix<Double> spwFreqSelection_p;
00157 Double computeCFAngleRad_p, rotateCFOTFAngleRad_p;
00158 };
00159
00160 };
00161
00162 #endif