DJones.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_DJONES_H
00029 #define SYNTHESIS_DJONES_H
00030
00031 #include <casa/aips.h>
00032 #include <casa/Containers/Record.h>
00033 #include <casa/BasicSL/Complex.h>
00034 #include <synthesis/MeasurementComponents/VisCal.h>
00035 #include <synthesis/MeasurementComponents/SolvableVisCal.h>
00036 #include <synthesis/MeasurementComponents/StandardVisCal.h>
00037 #include <synthesis/MeasurementComponents/CalCorruptor.h>
00038
00039 namespace casa {
00040
00041
00042 class VisEquation;
00043
00044
00045
00046
00047
00048 class DJones : public SolvableVisJones {
00049 public:
00050
00051
00052 DJones(VisSet& vs);
00053 DJones(String msname,Int MSnAnt,Int MSnSpw);
00054 DJones(const MSMetaInfoForCal& msmc);
00055 DJones(const Int& nAnt);
00056
00057 virtual ~DJones();
00058
00059
00060 using SolvableVisJones::setApply;
00061 virtual void setApply(const Record& apply);
00062
00063
00064 using SolvableVisJones::setSolve;
00065 void setSolve(const Record& solvepar);
00066
00067
00068 virtual Type type() { return VisCal::D; };
00069
00070
00071 virtual String typeName() { return "Dgen Jones"; };
00072 virtual String longTypeName() { return "Dgen Jones (instrumental polarization"; };
00073
00074
00075
00076 virtual Jones::JonesType jonesType() { return Jones::General; };
00077
00078
00079 virtual Int solvePol() { return solvePol_; };
00080
00081
00082 virtual void guessPar(VisBuffer& vb);
00083
00084
00085
00086 virtual void updatePar(const Vector<Complex> dCalPar,
00087 const Vector<Complex> dSrcPar);
00088
00089
00090 virtual void formSolveSNR();
00091
00092
00093 virtual void globalPostSolveTinker();
00094
00095
00096
00097 virtual void reReference() { cout << "reReference!" << endl;};
00098
00099 virtual void applyRefAnt();
00100
00101
00102 virtual void logResults();
00103
00104 virtual void createCorruptor(const VisIter& vi,
00105 const Record& simpar,
00106 const Int nSim);
00107 protected:
00108
00109
00110 virtual Int nPar() { return 2; };
00111
00112
00113
00114 virtual Bool trivialJonesElem() { return (jonesType()==Jones::GenLinear); };
00115
00116 virtual Bool trivialDJ() { return True; };
00117
00118
00119 virtual void calcOneJones(Vector<Complex>& mat, Vector<Bool>& mOk,
00120 const Vector<Complex>& par, const Vector<Bool>& pOk);
00121
00122
00123 virtual void initTrivDJ();
00124
00125 private:
00126
00127 Int solvePol_;
00128 DJonesCorruptor *dcorruptor_p;
00129
00130
00131
00132 };
00133
00134
00135
00136
00137
00138 class DfJones : public DJones {
00139 public:
00140
00141
00142 DfJones(VisSet& vs);
00143 DfJones(String msname,Int MSnAnt,Int MSnSpw);
00144 DfJones(const MSMetaInfoForCal& msmc);
00145 DfJones(const Int& nAnt);
00146
00147 virtual ~DfJones();
00148
00149
00150 virtual String typeName() { return "Dfgen Jones"; };
00151 virtual String longTypeName() { return "Dfgen Jones (frequency-dependent instrumental polarization"; };
00152
00153
00154
00155 virtual Bool freqDepPar() { return True; };
00156
00157 };
00158
00159
00160
00161
00162
00163
00164
00165 class DlinJones : public DJones {
00166 public:
00167
00168
00169 DlinJones(VisSet& vs);
00170 DlinJones(String msname,Int MSnAnt,Int MSnSpw);
00171 DlinJones(const MSMetaInfoForCal& msmc);
00172 DlinJones(const Int& nAnt);
00173
00174 virtual ~DlinJones();
00175
00176
00177 virtual String typeName() { return "D Jones"; };
00178 virtual String longTypeName() { return "D Jones (instrumental polarization"; };
00179
00180
00181
00182 virtual Jones::JonesType jonesType() { return Jones::GenLinear; };
00183
00184 };
00185
00186
00187
00188
00189
00190 class DflinJones : public DlinJones {
00191 public:
00192
00193
00194 DflinJones(VisSet& vs);
00195 DflinJones(String msname,Int MSnAnt,Int MSnSpw);
00196 DflinJones(const MSMetaInfoForCal& msmc);
00197 DflinJones(const Int& nAnt);
00198
00199 virtual ~DflinJones();
00200
00201
00202 virtual String typeName() { return "Df Jones"; };
00203 virtual String longTypeName() { return "Df Jones (frequency-dependent instrumental polarization"; };
00204
00205
00206
00207 virtual Bool freqDepPar() { return True; };
00208
00209 };
00210
00211
00212
00213
00214
00215 class DllsJones : public DJones {
00216 public:
00217
00218
00219 DllsJones(VisSet& vs);
00220 DllsJones(String msname,Int MSnAnt,Int MSnSpw);
00221 DllsJones(const MSMetaInfoForCal& msmc);
00222 DllsJones(const Int& nAnt);
00223
00224 virtual ~DllsJones();
00225
00226
00227 virtual String typeName() { return "DLLS Jones"; };
00228 virtual String longTypeName() { return "DLLS Jones (instrumental polarization)"; };
00229
00230
00231 virtual Jones::JonesType jonesType() { return Jones::General; };
00232
00233
00234 virtual Bool useGenericGatherForSolve() { return True; };
00235 virtual Bool useGenericSolveOne() { return False; }
00236
00237 protected:
00238
00239
00240
00241 virtual void selfSolveOne(VisBuffGroupAcc& vbga) { this->solveOneVB(vbga(0)); };
00242
00243
00244 virtual void solveOneVB(const VisBuffer& vb);
00245
00246
00247 };
00248
00249
00250
00251
00252
00253 class DfllsJones : public DllsJones {
00254 public:
00255
00256
00257 DfllsJones(VisSet& vs);
00258 DfllsJones(String msname,Int MSnAnt,Int MSnSpw);
00259 DfllsJones(const MSMetaInfoForCal& msmc);
00260 DfllsJones(const Int& nAnt);
00261
00262 virtual ~DfllsJones();
00263
00264
00265 virtual String typeName() { return "DfLLS Jones"; };
00266 virtual String longTypeName() { return "DfLLS Jones (frequency-dependent instrumental polarization"; };
00267
00268
00269
00270 virtual Bool freqDepPar() { return True; };
00271
00272 };
00273
00274
00275
00276
00277
00278
00279 class XMueller : public SolvableVisMueller {
00280 public:
00281
00282
00283 XMueller(VisSet& vs);
00284 XMueller(String msname,Int MSnAnt,Int MSnSpw);
00285 XMueller(const MSMetaInfoForCal& msmc);
00286 XMueller(const Int& nAnt);
00287
00288 virtual ~XMueller();
00289
00290
00291 virtual Type type() { return VisCal::X; };
00292
00293
00294 virtual String typeName() { return "X Mueller"; };
00295 virtual String longTypeName() { return "X Mueller (baseline-based)"; };
00296
00297
00298 virtual Mueller::MuellerType muellerType() { return Mueller::Diagonal; };
00299
00300
00301 using SolvableVisCal::setApply;
00302 virtual void setApply(const Record& apply);
00303
00304
00305 using SolvableVisCal::setSolve;
00306 void setSolve(const Record& solvepar);
00307
00308
00309 virtual Bool normalizable() { return False; };
00310
00311
00312 virtual Bool useGenericGatherForSolve() { return False; };
00313
00314
00315 virtual void selfGatherAndSolve(VisSet& vs, VisEquation& ve) { newselfSolve(vs,ve); };
00316 virtual void newselfSolve(VisSet& vs, VisEquation& ve);
00317
00318
00319 protected:
00320
00321
00322 virtual Int nPar() { return 1; };
00323
00324
00325 virtual Bool trivialMuellerElem() { return False; };
00326
00327
00328 virtual void calcAllMueller();
00329
00330
00331 virtual void solveOneVB(const VisBuffer& vb);
00332
00333 private:
00334
00335
00336
00337 };
00338
00339
00340
00341
00342
00343
00344 class XJones : public SolvableVisJones {
00345 public:
00346
00347
00348 XJones(VisSet& vs);
00349 XJones(String msname,Int MSnAnt,Int MSnSpw);
00350 XJones(const MSMetaInfoForCal& msmc);
00351 XJones(const Int& nAnt);
00352
00353 virtual ~XJones();
00354
00355
00356 virtual Type type() { return VisCal::X; };
00357
00358
00359 virtual String typeName() { return "X Jones"; };
00360 virtual String longTypeName() { return "X Jones (antenna-based)"; };
00361
00362
00363 virtual Jones::JonesType jonesType() { return Jones::Diagonal; };
00364
00365
00366 using SolvableVisCal::setApply;
00367 virtual void setApply(const Record& apply);
00368
00369
00370 using SolvableVisCal::setSolve;
00371 void setSolve(const Record& solvepar);
00372
00373
00374 virtual Bool normalizable() { return True; };
00375
00376
00377 virtual Bool useGenericGatherForSolve() { return True; };
00378 virtual Bool useGenericSolveOne() { return False; }
00379
00380
00381 virtual void selfGatherAndSolve(VisSet& vs, VisEquation& ve) { newselfSolve(vs,ve); };
00382 virtual void newselfSolve(VisSet& vs, VisEquation& ve);
00383
00384
00385 virtual void selfSolveOne(VisBuffGroupAcc& vbga) { this->solveOneVB(vbga(0)); };
00386
00387
00388 protected:
00389
00390
00391 virtual Int nPar() { return 1; };
00392
00393
00394 virtual Bool trivialJonesElem() { return False; };
00395
00396
00397 virtual void calcAllJones();
00398
00399
00400 virtual void solveOneVB(const VisBuffer& vb);
00401
00402 private:
00403
00404
00405
00406 };
00407
00408
00409
00410
00411
00412 class XfJones : public XJones {
00413 public:
00414
00415
00416 XfJones(VisSet& vs);
00417 XfJones(String msname,Int MSnAnt,Int MSnSpw);
00418 XfJones(const MSMetaInfoForCal& msmc);
00419 XfJones(const Int& nAnt);
00420
00421 virtual ~XfJones();
00422
00423
00424 virtual Type type() { return VisCal::X; };
00425
00426
00427 virtual String typeName() { return "Xf Jones"; };
00428 virtual String longTypeName() { return "Xf Jones (antenna-based)"; };
00429
00430
00431
00432 virtual Bool freqDepPar() { return True; };
00433
00434 protected:
00435
00436
00437
00438 void initSolvePar();
00439
00440
00441 };
00442
00443
00444
00445 class GlinXphJones : public GJones {
00446 public:
00447
00448
00449 GlinXphJones(VisSet& vs);
00450 GlinXphJones(String msname,Int MSnAnt,Int MSnSpw);
00451 GlinXphJones(const MSMetaInfoForCal& msmc);
00452 GlinXphJones(const Int& nAnt);
00453
00454 virtual ~GlinXphJones();
00455
00456
00457 virtual Type type() { return VisCal::X; };
00458
00459
00460 virtual String typeName() { return "GlinXph Jones"; };
00461 virtual String longTypeName() { return "GlinXph Jones (X-Y phase)"; };
00462
00463
00464 using SolvableVisJones::setApply;
00465 virtual void setApply(const Record& apply);
00466
00467
00468 virtual Bool freqDepPar() { return False; };
00469
00470
00471 virtual Bool phandonly() { return False; };
00472
00473
00474 virtual Bool useGenericGatherForSolve() { return True; };
00475 virtual Bool useGenericSolveOne() { return False; }
00476
00477
00478 virtual void selfGatherAndSolve(VisSet& vs, VisEquation& ve);
00479
00480 protected:
00481
00482
00483 virtual void selfSolveOne(VisBuffGroupAcc& vbga);
00484
00485
00486
00487 virtual void solveOneVB(const VisBuffer& vb);
00488
00489
00490 virtual void globalPostSolveTinker();
00491
00492
00493 Matrix<Float> QU_;
00494
00495
00496 };
00497
00498
00499
00500 class GlinXphfJones : public GlinXphJones {
00501 public:
00502
00503
00504 GlinXphfJones(VisSet& vs);
00505 GlinXphfJones(String msname,Int MSnAnt,Int MSnSpw);
00506 GlinXphfJones(const MSMetaInfoForCal& msmc);
00507 GlinXphfJones(const Int& nAnt);
00508
00509 virtual ~GlinXphfJones();
00510
00511
00512 virtual String typeName() { return "GlinXphf Jones"; };
00513 virtual String longTypeName() { return "GlinXphf Jones (X-Y phase)"; };
00514
00515
00516
00517 virtual Bool freqDepPar() { return True; };
00518
00519
00520 };
00521
00522
00523
00524
00525 }
00526
00527 #endif
00528