KJones.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_KJONES_H
00029 #define SYNTHESIS_KJONES_H
00030
00031 #include <casa/aips.h>
00032 #include <synthesis/MeasurementComponents/StandardVisCal.h>
00033
00034 namespace casa {
00035
00036 class DelayFFT {
00037 public:
00038
00039
00040 DelayFFT(Double f0, Double df, Double padBW,
00041 Cube<Complex> V);
00042
00043
00044
00045 DelayFFT(Double f0, Double df, Double padBW,
00046 Int nCorr, Int nElem, Int refant, Complex v0);
00047
00048
00049 DelayFFT(const VisBuffer& vb,Double padBW,Int refant);
00050
00051
00052 void FFT();
00053
00054
00055 void shift(Double f);
00056
00057
00058 void add(const DelayFFT& other);
00059
00060
00061 void searchPeak();
00062
00063 const Cube<Complex>& Vpad() const { return Vpad_; };
00064
00065
00066 const Matrix<Float>& delay() const { return delay_; };
00067 const Matrix<Bool>& flag() const { return flag_; };
00068
00069
00070 void state();
00071
00072 private:
00073 Double f0_, df_, padBW_;
00074 Int nCorr_, nPadChan_, nElem_;
00075 Int refant_;
00076 Cube<Complex> Vpad_;
00077 Matrix<Float> delay_;
00078 Matrix<Bool> flag_;
00079
00080 };
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 class KJones : public GJones {
00091 public:
00092
00093
00094 KJones(VisSet& vs);
00095 KJones(String msname,Int MSnAnt,Int MSnSpw);
00096 KJones(const MSMetaInfoForCal& msmc);
00097 KJones(const Int& nAnt);
00098
00099 virtual ~KJones();
00100
00101
00102 virtual void setApply(const Record& apply);
00103 using GJones::setApply;
00104 virtual void setCallib(const Record& callib,
00105 const MeasurementSet& selms);
00106
00107
00108 virtual void setSolve(const Record& solve);
00109 using GJones::setSolve;
00110
00111
00112 virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
00113
00114
00115 virtual Type type() { return VisCal::K; };
00116
00117
00118 virtual String typeName() { return ( (isSolved() && combspw()) ?
00119 "KMBD Jones" :
00120 "K Jones" ); };
00121 virtual String longTypeName() { return ( (isSolved() && combspw()) ?
00122 "KMBD Jones (multi-band delay)" :
00123 "K Jones (single-band delay)" ); };
00124
00125
00126 virtual Jones::JonesType jonesType() { return Jones::Diagonal; };
00127
00128
00129 virtual Bool freqDepPar() { return False; };
00130 virtual Bool freqDepMat() { return True; };
00131
00132
00133 virtual Complex defaultPar() { return Complex(0.0); };
00134
00135
00136 virtual void specify(const Record& specify);
00137
00138
00139 virtual Bool accumulatable() { return False; };
00140
00141
00142 virtual Bool smoothable() { return True; };
00143
00144
00145 virtual void calcAllJones();
00146
00147
00148
00149
00150
00151
00152
00153 virtual void guessPar(VisBuffer& ) {};
00154
00155
00156 virtual Bool useGenericGatherForSolve() { return True; };
00157 virtual Bool useGenericSolveOne() { return False; }
00158
00159
00160 virtual void globalPostSolveTinker() {};
00161
00162
00163 protected:
00164
00165
00166 virtual Int nPar() { return 2; };
00167
00168
00169 virtual Bool trivialJonesElem() { return False; };
00170
00171
00172 virtual Bool trivialDJ() { return False; };
00173
00174
00175 virtual void initTrivDJ() {};
00176
00177
00178 virtual void selfSolveOne(VisBuffGroupAcc& vbga);
00179
00180
00181 virtual void solveOneVB(const VisBuffer& vb);
00182
00183
00184 virtual void solveOneVBmbd(VisBuffGroupAcc& vbga);
00185
00186
00187 Vector<Double> KrefFreqs_;
00188
00189 private:
00190
00191
00192 };
00193
00194
00195 class KcrossJones : public KJones {
00196 public:
00197
00198
00199 KcrossJones(VisSet& vs);
00200 KcrossJones(String msname,Int MSnAnt,Int MSnSpw);
00201 KcrossJones(const MSMetaInfoForCal& msmc);
00202 KcrossJones(const Int& nAnt);
00203
00204 virtual ~KcrossJones();
00205
00206
00207 virtual String typeName() { return "Kcross Jones"; };
00208 virtual String longTypeName() { return "Kcross Jones (single-band cross delay)"; };
00209
00210
00211 virtual Bool phandonly() { return False; };
00212
00213 protected:
00214
00215
00216
00217 virtual void selfSolveOne(VisBuffGroupAcc& vbga);
00218
00219
00220 virtual void solveOneVB(const VisBuffer& vb);
00221
00222 };
00223
00224
00225
00226 class KMBDJones : public KJones {
00227 public:
00228
00229
00230 KMBDJones(VisSet& vs);
00231 KMBDJones(String msname,Int MSnAnt,Int MSnSpw);
00232 KMBDJones(const MSMetaInfoForCal& msmc);
00233 KMBDJones(const Int& nAnt);
00234
00235 virtual ~KMBDJones();
00236
00237
00238 virtual Type type() { return VisCal::K; };
00239
00240
00241 virtual String typeName() { return "KMBD Jones"; };
00242 virtual String longTypeName() { return "KMBD Jones (multi-band delay)"; };
00243
00244
00245 virtual void setApply(const Record& apply);
00246
00247
00248 };
00249
00250
00251
00252 class KAntPosJones : public KJones {
00253 public:
00254
00255
00256 KAntPosJones(VisSet& vs);
00257 KAntPosJones(String msname,Int MSnAnt,Int MSnSpw);
00258 KAntPosJones(const MSMetaInfoForCal& msmc);
00259 KAntPosJones(const Int& nAnt);
00260
00261 virtual ~KAntPosJones();
00262
00263
00264 virtual Type type() { return VisCal::KAntPos; };
00265
00266
00267 virtual String typeName() { return "KAntPos Jones"; };
00268 virtual String longTypeName() { return "KAntPos Jones (antenna position errors)"; };
00269
00270
00271 virtual Jones::JonesType jonesType() { return Jones::Scalar; };
00272
00273 virtual Bool timeDepMat() { return True; };
00274
00275
00276 virtual Bool smoothable() { return False; };
00277
00278
00279 virtual void setApply(const Record& apply);
00280 using KJones::setApply;
00281 virtual void setCallib(const Record& callib,const MeasurementSet& selms);
00282
00283
00284 virtual void specify(const Record& specify);
00285
00286
00287 virtual void calcAllJones();
00288
00289 protected:
00290
00291
00292 virtual void syncMeta(const VisBuffer& vb);
00293 virtual void syncMeta2(const vi::VisBuffer2& vb);
00294
00295
00296 virtual Int nPar() { return 3; };
00297
00298
00299 virtual Bool trivialJonesElem() { return False; };
00300
00301
00302 virtual Bool trivialDJ() { return False; };
00303
00304
00305 virtual void initTrivDJ() {};
00306
00307 private:
00308
00309
00310 String epochref_p;
00311 MDirection phasedir_p;
00312 MPosition antpos0_p;
00313
00314 };
00315
00316 }
00317
00318 #endif