StandardVisCal.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_STANDARDVISCAL_H
00029 #define SYNTHESIS_STANDARDVISCAL_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/CalCorruptor.h>
00037
00038 namespace casa {
00039
00040
00041 class VisEquation;
00042 class TJonesCorruptor;
00043
00044
00045
00046
00047
00048
00049 class PJones : public VisJones {
00050 public:
00051
00052
00053 PJones(VisSet& vs);
00054 PJones(String msname,Int MSnAnt,Int MSnSpw);
00055 PJones(const MSMetaInfoForCal& msmc);
00056
00057
00058 virtual ~PJones();
00059
00060
00061 virtual Type type() { return VisCal::P; };
00062
00063
00064 virtual String typeName() { return "P Jones"; };
00065 virtual String longTypeName() { return "P Jones (parallactic angle phase)"; };
00066
00067
00068 Jones::JonesType jonesType() { return pjonestype_; };
00069
00070 protected:
00071
00072
00073 virtual Int nPar() { return 1; };
00074
00075 virtual Vector<Float>& pa() { return pa_; };
00076
00077
00078 virtual Bool trivialJonesElem() { return False; };
00079
00080
00081 virtual void calcPar();
00082
00083
00084 virtual void syncMeta(const VisBuffer& vb);
00085 virtual void syncMeta2(const vi::VisBuffer2& vb);
00086
00087
00088 virtual void calcOneJones(Vector<Complex>& mat, Vector<Bool>& mOk,
00089 const Vector<Complex>& par, const Vector<Bool>& pOk );
00090
00091 private:
00092
00093 Jones::JonesType pjonestype_;
00094
00095 Vector<Float> pa_;
00096
00097 };
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 class TJones : public SolvableVisJones {
00114 public:
00115
00116
00117 TJones(VisSet& vs);
00118 TJones(String msname,Int MSnAnt,Int MSnSpw);
00119 TJones(const MSMetaInfoForCal& msmc);
00120 TJones(const Int& nAnt);
00121
00122 virtual ~TJones();
00123
00124
00125 virtual Type type() { return VisCal::T; };
00126
00127
00128 virtual String typeName() { return "T Jones"; };
00129 virtual String longTypeName() { return "T Jones (polarization-independent troposphere"; };
00130
00131
00132 virtual Jones::JonesType jonesType() { return Jones::Scalar; };
00133
00134
00135 virtual Bool accumulatable() { return True; };
00136
00137
00138 virtual Bool smoothable() { return True; };
00139
00140
00141 virtual void guessPar(VisBuffer& vb);
00142 virtual void guessPar(SDBList& sdbs);
00143
00144
00145 virtual void createCorruptor(const VisIter& vi, const Record& simpar, const Int nSim);
00146
00147 protected:
00148
00149
00150 virtual Int nPar() { return 1; };
00151
00152
00153 virtual Bool trivialJonesElem() { return True; };
00154
00155
00156 virtual Bool trivialDJ() { return True; };
00157
00158
00159 virtual void initTrivDJ();
00160
00161 private:
00162
00163
00164
00165 AtmosCorruptor *tcorruptor_p;
00166
00167 };
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182 class TfJones : public TJones {
00183 public:
00184
00185
00186 TfJones(VisSet& vs);
00187 TfJones(String msname,Int MSnAnt,Int MSnSpw);
00188 TfJones(const MSMetaInfoForCal& msmc);
00189 TfJones(const Int& nAnt);
00190
00191 virtual ~TfJones();
00192
00193
00194 virtual Type type() { return VisCal::T; };
00195
00196
00197 virtual String typeName() { return "Tf Jones"; };
00198 virtual String longTypeName() { return "Tf Jones (frequency-dependent atmospheric complex gain"; };
00199
00200
00201
00202 virtual Bool freqDepPar() { return True; };
00203
00204 protected:
00205
00206
00207
00208 private:
00209
00210
00211
00212 };
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222 class GJones : public SolvableVisJones {
00223 public:
00224
00225
00226 GJones(VisSet& vs);
00227 GJones(String msname,Int MSnAnt,Int MSnSpw);
00228 GJones(const MSMetaInfoForCal& msmc);
00229 GJones(const Int& nAnt);
00230
00231 virtual ~GJones();
00232
00233
00234 virtual Type type() { return VisCal::G; };
00235
00236
00237 virtual String typeName() { return "G Jones"; };
00238 virtual String longTypeName() { return "G Jones (electronic Gain)"; };
00239
00240
00241 virtual Jones::JonesType jonesType() { return Jones::Diagonal; };
00242
00243
00244 virtual Bool accumulatable() { return True; };
00245
00246
00247 virtual Bool smoothable() { return True; };
00248
00249
00250 virtual Bool phandonly() { return True; };
00251
00252
00253 virtual void guessPar(VisBuffer& vb);
00254 virtual void guessPar(SDBList& sdbs);
00255
00256 virtual void createCorruptor(const VisIter& vi, const Record& simpar, const Int nSim);
00257
00258 protected:
00259
00260
00261 virtual Int nPar() { return 2; };
00262
00263
00264 virtual Bool trivialJonesElem() { return True; };
00265
00266
00267 virtual Bool trivialDJ() { return True; };
00268
00269
00270 virtual void initTrivDJ();
00271
00272 private:
00273
00274 GJonesCorruptor *gcorruptor_p;
00275
00276 };
00277
00278
00279
00280
00281
00282
00283
00284 class BJones : public GJones {
00285 public:
00286
00287
00288 BJones(VisSet& vs);
00289 BJones(String msname,Int MSnAnt,Int MSnSpw);
00290 BJones(const MSMetaInfoForCal& msmc);
00291 BJones(const Int& nAnt);
00292
00293 virtual ~BJones();
00294
00295
00296 virtual Type type() { return VisCal::B; };
00297
00298
00299 virtual String typeName() { return "B Jones"; };
00300 virtual String longTypeName() { return "B Jones (bandpass)"; };
00301
00302
00303 using GJones::setSolve;
00304 virtual void setSolve(const Record& solve);
00305
00306
00307
00308 virtual Bool freqDepPar() { return True; };
00309
00310 virtual void normalize();
00311
00312
00313 virtual void globalPostSolveTinker();
00314
00315
00316 virtual void fillChanGaps();
00317 virtual void fillChanGapArray(Array<Complex>& sol,
00318 Array<Bool>& solOK);
00319
00320 protected:
00321
00322
00323 virtual void calcWtScale();
00324
00325 private:
00326
00327
00328 Int maxchangap_p;
00329
00330
00331 };
00332
00333
00334
00335
00336
00337
00338
00339 class JJones : public SolvableVisJones {
00340 public:
00341
00342
00343 JJones(VisSet& vs);
00344 JJones(String msname,Int MSnAnt,Int MSnSpw);
00345 JJones(const MSMetaInfoForCal& msmc);
00346 JJones(const Int& nAnt);
00347
00348 virtual ~JJones();
00349
00350
00351 using SolvableVisJones::setSolve;
00352 void setSolve(const Record& solvepar);
00353
00354
00355 virtual Type type() { return VisCal::J; };
00356
00357
00358 virtual String typeName() { return "J Jones"; };
00359 virtual String longTypeName() { return "J Jones (generic polarized gain)"; };
00360
00361
00362 virtual Jones::JonesType jonesType() { return Jones::General; };
00363
00364
00365 virtual void guessPar(VisBuffer& vb);
00366
00367
00368
00369 virtual void reReference() {};
00370
00371 protected:
00372
00373
00374 virtual Int nPar() { return 4; };
00375
00376
00377 virtual Bool trivialJonesElem() { return True; };
00378
00379
00380 virtual Bool trivialDJ() { return True; };
00381
00382
00383 virtual void initTrivDJ();
00384
00385 private:
00386
00387
00388
00389 };
00390
00391
00392
00393
00394
00395
00396
00397 class MMueller : public SolvableVisMueller {
00398 public:
00399
00400
00401 MMueller(VisSet& vs);
00402 MMueller(String msname,Int MSnAnt,Int MSnSpw);
00403 MMueller(const MSMetaInfoForCal& msmc);
00404 MMueller(const Int& nAnt);
00405
00406 virtual ~MMueller();
00407
00408
00409 virtual Type type() { return VisCal::M; };
00410
00411
00412 virtual String typeName() { return "M Mueller"; };
00413 virtual String longTypeName() { return "M Mueller (baseline-based)"; };
00414
00415
00416 virtual Mueller::MuellerType muellerType() { return Mueller::Diag2; };
00417
00418
00419 using SolvableVisCal::setApply;
00420 virtual void setApply(const Record& apply);
00421
00422
00423 virtual Bool useGenericGatherForSolve() { return False; };
00424
00425
00426 virtual void selfGatherAndSolve(VisSet& vs, VisEquation& ve) { newselfSolve(vs,ve); };
00427 virtual void newselfSolve(VisSet& vs, VisEquation& ve);
00428
00429
00430 virtual void globalPostSolveTinker();
00431
00432 virtual void createCorruptor(const VisIter& vi, const Record& simpar, const Int nSim);
00433 protected:
00434
00435
00436 virtual Int nPar() { return 2; };
00437
00438
00439 virtual Bool trivialMuellerElem() { return True; };
00440
00441 private:
00442 AtmosCorruptor *atmcorruptor_p;
00443
00444 };
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455 class MfMueller : public MMueller {
00456 public:
00457
00458
00459 MfMueller(VisSet& vs);
00460 MfMueller(String msname,Int MSnAnt,Int MSnSpw);
00461 MfMueller(const MSMetaInfoForCal& msmc);
00462 MfMueller(const Int& nAnt);
00463
00464 virtual ~MfMueller();
00465
00466
00467 virtual Type type() { return VisCal::M; };
00468
00469
00470 virtual String typeName() { return "Mf Mueller"; };
00471 virtual String longTypeName() { return "Mf Mueller (closure bandpass)"; };
00472
00473
00474
00475 virtual Bool freqDepPar() { return True; };
00476
00477
00478 virtual void normalize();
00479
00480 protected:
00481
00482
00483
00484 private:
00485
00486
00487
00488 };
00489
00490
00491
00492
00493
00494
00495
00496
00497 class TOpac : public TJones {
00498 public:
00499
00500
00501 TOpac(VisSet& vs);
00502 TOpac(String msname,Int MSnAnt,Int MSnSpw);
00503 TOpac(const MSMetaInfoForCal& msmc);
00504
00505
00506 virtual ~TOpac();
00507
00508
00509 virtual Type type() { return VisCal::T; };
00510
00511
00512 virtual String typeName() { return "TOpac"; };
00513 virtual String longTypeName() { return "TOpac (Opacity corrections in amplitude)"; };
00514
00515
00516 Jones::JonesType jonesType() { return Jones::Scalar; };
00517
00518
00519 virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
00520
00521
00522 void setApply(const Record& applypar);
00523
00524
00525 String applyinfo();
00526
00527 protected:
00528
00529
00530 virtual Int nPar() { return 1; };
00531
00532
00533 virtual Bool trivialJonesElem() { return False; };
00534
00535
00536 Vector<Double>& za() { return za_; };
00537
00538
00539 virtual void syncMeta(const VisBuffer& vb);
00540 virtual void syncMeta2(const vi::VisBuffer2& vb);
00541
00542
00543 virtual void calcPar();
00544
00545
00546 virtual void calcAllJones();
00547
00548 private:
00549
00550
00551 using TJones::setApply;
00552
00553
00554 Vector<Double> opacity_;
00555
00556
00557 Vector<Double> za_;
00558
00559 };
00560
00561
00562
00563
00564
00565
00566 class TfOpac : public TOpac {
00567 public:
00568
00569
00570 TfOpac(VisSet& vs);
00571 TfOpac(String msname,Int MSnAnt,Int MSnSpw);
00572 TfOpac(const MSMetaInfoForCal& msmc);
00573
00574
00575 virtual ~TfOpac();
00576
00577
00578 virtual Type type() { return VisCal::T; };
00579
00580
00581 virtual String typeName() { return "TfOpac"; };
00582 virtual String longTypeName() { return "TfOpac (frequency-dependent opacity"; };
00583
00584
00585
00586 virtual Bool freqDepPar() { return True; };
00587
00588 protected:
00589
00590
00591 virtual void calcAllJones();
00592
00593 private:
00594
00595
00596 virtual void calcWtScale();
00597
00598 };
00599
00600
00601 }
00602
00603 #endif
00604