HetArrayConvFunc.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 #ifndef SYNTHESIS_TRANSFORM2_HETARRAYCONVFUNC_H
00029 #define SYNTHESIS_TRANSFORM2_HETARRAYCONVFUNC_H
00030
00031 #include <synthesis/TransformMachines2/SimplePBConvFunc.h>
00032
00033 namespace casa{
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 template<class T> class ImageInterface;
00054 template<class T> class Matrix;
00055 namespace vi{class VisBuffer2;}
00056 namespace refim{
00057
00058 class HetArrayConvFunc : public SimplePBConvFunc
00059
00060 {
00061 public:
00062 HetArrayConvFunc();
00063 HetArrayConvFunc(const PBMathInterface::PBClass
00064 typeToUse, const String vpTable="");
00065
00066
00067 HetArrayConvFunc(const RecordInterface& rec, Bool calcFluxscale);
00068 virtual ~HetArrayConvFunc();
00069
00070
00071
00072
00073 virtual void findConvFunction(const ImageInterface<Complex>& iimage,
00074 const vi::VisBuffer2& vb,
00075 const Int& convSampling,
00076 const Vector<Double>& visFreq,
00077 Array<Complex>& convFunc,
00078 Array<Complex>& weightConvFunc,
00079 Vector<Int>& convsize,
00080 Vector<Int>& convSupport,
00081 Vector<Int>& polMap, Vector<Int>& chanMap, Vector<Int>& rowMap);
00082
00083 virtual ImageInterface<Float>& getFluxScaleImage();
00084
00085 virtual void sliceFluxScale(const Int npol);
00086
00087 virtual Bool toRecord(RecordInterface& rec);
00088 virtual Bool fromRecord(String& err, const RecordInterface& rec, Bool calcFluxscale=False);
00089 virtual void reset();
00090
00091
00092
00093 private:
00094 void applyGradientToYLine(const Int iy, Complex*& convFunctions,
00095 Complex*& convWeights, const Double pixXdir, const Double pixYdir,
00096 Int convSize, const Int ndishpair, const Int nchan, const Int nPol);
00097 Int factorial(Int n);
00098
00099
00100
00101
00102 Int checkPBOfField(const vi::VisBuffer2& vb, Vector<Int>& rowMap);
00103 void findAntennaSizes(const vi::VisBuffer2& vb);
00104 void supportAndNormalize(Int plane, Int convSampling);
00105 void supportAndNormalizeLatt(Int plane, Int convSampling, TempLattice<Complex>& convFuncLat,
00106 TempLattice<Complex>& weightConvFuncLat);
00107 void init(const PBMathInterface::PBClass typeToUse);
00108 void makerowmap(const vi::VisBuffer2& vb, Vector<Int>& rowMap);
00109 PBMathInterface::PBClass pbClass_p;
00110
00111 Vector<Int64> convFunctionMap_p;
00112 Int64 nDefined_p;
00113 SimpleOrderedMap <String, Int> antDiam2IndexMap_p;
00114 Vector<Int> antIndexToDiamIndex_p;
00115 Block<CountedPtr<PBMathInterface> > antMath_p;
00116 Int msId_p;
00117 Int actualConvIndex_p;
00118 Array<Complex> convFunc_p;
00119 Array<Complex> weightConvFunc_p;
00120 Array<Complex> convSave_p;
00121 Array<Complex> weightSave_p;
00122 Int convSize_p;
00123 String vpTable_p;
00124 Vector<Int> convSupport_p;
00125 Block <CountedPtr<Array<Complex> > > convFunctions_p;
00126 Block <CountedPtr<Array<Complex> > > convWeights_p;
00127 Block<CountedPtr<Vector<Int> > > convSizes_p;
00128 Block <CountedPtr<Vector<Int> > > convSupportBlock_p;
00129
00130 };
00131 };
00132 };
00133 #endif